public interface ISpan : IDisposable
Reference documentation and code samples for the Google.Cloud.Diagnostics.Common interface ISpan.
A trace span.
Namespace
GoogleCloudGoogle.Cloud.DiagnosticsCommonAssembly
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 | |
---|---|
Name | Description |
labels | Dictionarystringstring |
Disposed()
bool Disposed()
True if the span has been disposed and ended.
Returns | |
---|---|
Type | Description |
bool |
SetStackTrace(StackTrace)
void SetStackTrace(StackTrace stackTrace)
Adds the given StackTrace to the current span.
Parameter | |
---|---|
Name | Description |
stackTrace | StackTrace |
SpanId()
ulong SpanId()
Gets span's id.
Returns | |
---|---|
Type | Description |
ulong |