Show / Hide Table of Contents

Class NullManagedTracer

A managed tracer that does not trace.

Inheritance
System.Object
NullManagedTracer
Implements
IManagedTracer
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
IManagedTracer.AnnotateSpan(Dictionary<String, String>)

GetCurrentSpanId()

Always returns null.

Declaration
public ulong? GetCurrentSpanId()
Returns
Type Description
System.Nullable<System.UInt64>
Implements
IManagedTracer.GetCurrentSpanId()

GetCurrentTraceId()

Always returns null.

Declaration
public string GetCurrentTraceId()
Returns
Type Description
System.String
Implements
IManagedTracer.GetCurrentTraceId()

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
IManagedTracer.RunInSpan(Action, String, StartSpanOptions)

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
IManagedTracer.RunInSpan<T>(Func<T>, String, StartSpanOptions)

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
IManagedTracer.RunInSpanAsync<T>(Func<Task<T>>, String, StartSpanOptions)

SetStackTrace(StackTrace)

Does nothing.

Declaration
public void SetStackTrace(StackTrace stackTrace)
Parameters
Type Name Description
System.Diagnostics.StackTrace stackTrace
Implements
IManagedTracer.SetStackTrace(StackTrace)

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.

Implements
IManagedTracer.StartSpan(String, StartSpanOptions)
Back to top