Google.Cloud.Diagnostics.Common - Interface ISpan (5.1.0)

public interface ISpan : IDisposable

Reference documentation and code samples for the Google.Cloud.Diagnostics.Common interface ISpan.

A trace span.

Namespace

GoogleCloudGoogle.Cloud.DiagnosticsCommon

Assembly

Google.Cloud.Diagnostics.Common.dll

Remarks

The functions here, aside from Dispose(), do not need to be used in most cases. They need to be used when updating the current span in a disjoint thread.

NOTE: While it is possible to end a span in another thread any new spans after this may be in a poor state.

Methods

AnnotateSpan(Dictionary<string, string>)

void AnnotateSpan(Dictionary<string, string> labels)

Annotates the current span with the given labels.

Parameter
NameDescription
labelsDictionarystringstring

Disposed()

bool Disposed()

True if the span has been disposed and ended.

Returns
TypeDescription
bool

SetStackTrace(StackTrace)

void SetStackTrace(StackTrace stackTrace)

Adds the given StackTrace to the current span.

Parameter
NameDescription
stackTraceStackTrace

SpanId()

ulong SpanId()

Gets span's id.

Returns
TypeDescription
ulong