Class ManagedTracer
Functions to create IManagedTracers.
Inheritance
System.Object
ManagedTracer
Inherited Members
System.Object.ToString()
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Cloud.Diagnostics.Common
Assembly: Google.Cloud.Diagnostics.Common.dll
Syntax
public static class ManagedTracer
Methods
CreateConsumer(TraceServiceClient, TraceOptions)
Creates a trace consumer for a
Declaration
public static IConsumer<Trace.V1.Trace> CreateConsumer(TraceServiceClient client, TraceOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| TraceServiceClient | client | The trace client. Must not be null. |
| TraceOptions | options | Trace options. Must not be null. |
Returns
| Type | Description |
|---|---|
| IConsumer<Google.Cloud.Trace.V1.Trace> |
CreateDelegatingTracer(Func<IManagedTracer>)
Creates an IManagedTracer that delegates all calls to another IManagedTracer that is retrieved from the given function on each method call.
Declaration
public static IManagedTracer CreateDelegatingTracer(Func<IManagedTracer> tracerFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Func<IManagedTracer> | tracerFactory |
Returns
| Type | Description |
|---|---|
| IManagedTracer |
CreateTracerFactory(String, IConsumer<Trace.V1.Trace>, TraceOptions)
Create a factory to generate an IManagedTracer from a TraceHeaderContext.
Declaration
public static Func<TraceHeaderContext, IManagedTracer> CreateTracerFactory(string projectId, IConsumer<Trace.V1.Trace> consumer, TraceOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | projectId | The Google Cloud Platform project ID. Must not be null |
| IConsumer<Google.Cloud.Trace.V1.Trace> | consumer | The trace consumer. Must not be null. |
| TraceOptions | options | Trace options. Must not be null. |
Returns
| Type | Description |
|---|---|
| System.Func<TraceHeaderContext, IManagedTracer> |