Class ContextTracerManager (4.3.1)

public static class ContextTracerManager

Manages access to the current IManagedTracer.

Inheritance

Object > ContextTracerManager

Namespace

Google.Cloud.Diagnostics.Common

Assembly

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
TypeDescription
ITraceContext

GetCurrentTracer()

public static IManagedTracer GetCurrentTracer()

Gets the current IManagedTracer or a NullManagedTracer if none exists.

Returns
TypeDescription
IManagedTracer

SetCurrentTracer(IManagedTracer)

public static void SetCurrentTracer(IManagedTracer tracer)

Sets the current IManagedTracer. This is called for each new trace context.

Parameter
NameDescription
tracerIManagedTracer