Class NullManagedTracer
A managed tracer that does not trace.
Inheritance
System.Object
NullManagedTracer
Implements
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 sealed class NullManagedTracer : IManagedTracer
Fields
Instance
Instance of NullManagedTracer
Declaration
public static readonly NullManagedTracer Instance
Field Value
| Type | Description |
|---|---|
| NullManagedTracer |
Methods
AnnotateSpan(Dictionary<String, String>)
Does nothing.
Declaration
public void AnnotateSpan(Dictionary<string, string> labels)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.Dictionary<System.String, System.String> | labels |
Implements
GetCurrentSpanId()
Always returns null.
Declaration
public ulong? GetCurrentSpanId()
Returns
| Type | Description |
|---|---|
| System.Nullable<System.UInt64> |
Implements
GetCurrentTraceId()
Always returns null.
Declaration
public string GetCurrentTraceId()
Returns
| Type | Description |
|---|---|
| System.String |
Implements
RunInSpan(Action, String, StartSpanOptions)
Calls action.
Declaration
public void RunInSpan(Action action, string name, StartSpanOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action | action | |
| System.String | name | |
| StartSpanOptions | options |
Implements
RunInSpan<T>(Func<T>, String, StartSpanOptions)
Calls func and returns the result.
Declaration
public T RunInSpan<T>(Func<T> func, string name, StartSpanOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Func<T> | func | |
| System.String | name | |
| StartSpanOptions | options |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T |
Implements
RunInSpanAsync<T>(Func<Task<T>>, String, StartSpanOptions)
Calls func asynchronously and returns the result.
Declaration
public Task<T> RunInSpanAsync<T>(Func<Task<T>> func, string name, StartSpanOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Func<System.Threading.Tasks.Task<T>> | func | |
| System.String | name | |
| StartSpanOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<T> |
Type Parameters
| Name | Description |
|---|---|
| T |
Implements
SetStackTrace(StackTrace)
Does nothing.
Declaration
public void SetStackTrace(StackTrace stackTrace)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Diagnostics.StackTrace | stackTrace |
Implements
StartSpan(String, StartSpanOptions)
Does nothing.
Declaration
public ISpan StartSpan(string name, StartSpanOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | |
| StartSpanOptions | options |
Returns
| Type | Description |
|---|---|
| ISpan | Returns an System.IDisposable that does nothing when disposed. |