Google.Cloud.Diagnostics.Common - Class ManagedTracer (5.1.0)

public static class ManagedTracer

Reference documentation and code samples for the Google.Cloud.Diagnostics.Common class ManagedTracer.

Functions to create IManagedTracers.

Inheritance

object > ManagedTracer

Namespace

GoogleCloudGoogle.Cloud.DiagnosticsCommon

Assembly

Google.Cloud.Diagnostics.Common.dll

Methods

CreateConsumer(TraceServiceClient, TraceOptions)

public static IConsumer<Trace> CreateConsumer(TraceServiceClient client, TraceOptions options)

Creates a trace consumer for a TraceServiceClient and options.

Parameters
NameDescription
clientTraceServiceClient

The trace client. Must not be null.

optionsTraceOptions

Trace options. Must not be null.

Returns
TypeDescription
IConsumerTrace

CreateDelegatingTracer(Func<IManagedTracer>)

public static IManagedTracer CreateDelegatingTracer(Func<IManagedTracer> tracerFactory)

Creates an IManagedTracer that delegates all calls to another IManagedTracer that is retrieved from the given function on each method call.

Parameter
NameDescription
tracerFactoryFuncIManagedTracer
Returns
TypeDescription
IManagedTracer

CreateFactory(string, IConsumer<Trace>, TraceOptions)

public static Func<ITraceContext, IManagedTracer> CreateFactory(string projectId, IConsumer<Trace> consumer, TraceOptions options)

Create a factory to generate an IManagedTracer from an ITraceContext.

Parameters
NameDescription
projectIdstring

The Google Cloud Platform project ID. Must not be null

consumerIConsumerTrace

The trace consumer. Must not be null.

optionsTraceOptions

Trace options. Must not be null.

Returns
TypeDescription
FuncITraceContextIManagedTracer