[Obsolete("Inject a Google.Cloud.Diagnostics.Common.ITraceContext instead.")]
public interface IExternalTraceProvider
Provides external trace information to include in a log entry if there's no Google Trace available. Implement this interface when traces are being generated by your environment and sent to Google Cloud Tracing not via the Google.Cloud.Diagnostics library.
Namespace
Google.Cloud.Diagnostics.AspNetCoreAssembly
Google.Cloud.Diagnostics.AspNetCore.dll
Methods
GetCurrentTraceContext(IServiceProvider)
TraceContextForLogEntry GetCurrentTraceContext(IServiceProvider serviceProvider)
Returns the TraceContextForLogEntry that can be associated to a log entry or null if there's currently no trace context.
Parameter | |
---|---|
Name | Description |
serviceProvider | IServiceProvider The service provider to resolve services from. Must not be null. |
Returns | |
---|---|
Type | Description |
TraceContextForLogEntry | A TraceContextForLogEntry or null if there's no current trace. |