public static class ContextTracerManager
Reference documentation and code samples for the Google.Cloud.Diagnostics.Common class ContextTracerManager.
Manages access to the current IManagedTracer.
Namespace
GoogleCloudGoogle.Cloud.DiagnosticsCommonAssembly
Google.Cloud.Diagnostics.Common.dll
Methods
GetCurrentTraceContext()
public static ITraceContext GetCurrentTraceContext()
Gets the current ITraceContext as defined by the GetCurrentTracer() or null if the current trace context is not known at the time.
Returns | |
---|---|
Type | Description |
ITraceContext |
GetCurrentTracer()
public static IManagedTracer GetCurrentTracer()
Gets the current IManagedTracer or a NullManagedTracer if none exists.
Returns | |
---|---|
Type | Description |
IManagedTracer |
SetCurrentTracer(IManagedTracer)
public static void SetCurrentTracer(IManagedTracer tracer)
Sets the current IManagedTracer. This is called for each new trace context.
Parameter | |
---|---|
Name | Description |
tracer | IManagedTracer |