public static class ManagedTracerFunctions to create IManagedTracers.
Namespace
Google.Cloud.Diagnostics.CommonAssembly
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 | |
|---|---|
| Name | Description |
client |
TraceServiceClientThe trace client. Must not be null. |
options |
TraceOptionsTrace options. Must not be null. |
| Returns | |
|---|---|
| Type | Description |
IConsumer<Trace> |
|
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 | |
|---|---|
| Name | Description |
tracerFactory |
Func<IManagedTracer> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
projectId |
StringThe Google Cloud Platform project ID. Must not be null |
consumer |
IConsumer<Trace>The trace consumer. Must not be null. |
options |
TraceOptionsTrace options. Must not be null. |
| Returns | |
|---|---|
| Type | Description |
Func<ITraceContext, IManagedTracer> |
|