Google.Cloud.Diagnostics.Common - Class StartSpanOptions (5.1.0)

public sealed class StartSpanOptions

Reference documentation and code samples for the Google.Cloud.Diagnostics.Common class StartSpanOptions.

Optional configuration to be used when starting a span.

Inheritance

object > StartSpanOptions

Namespace

GoogleCloudGoogle.Cloud.DiagnosticsCommon

Assembly

Google.Cloud.Diagnostics.Common.dll

Properties

Labels

public Dictionary<string, string> Labels { get; }

Gets the labels to be added to the span.

Property Value
TypeDescription
Dictionarystringstring

SpanKind

public SpanKind SpanKind { get; }

Gets the span kind.

Property Value
TypeDescription
SpanKind

Methods

Create(SpanKind, Dictionary<string, string>)

public static StartSpanOptions Create(SpanKind spanKind = SpanKind.Unspecified, Dictionary<string, string> labels = null)

Creates a StartSpanOptions.

Parameters
NameDescription
spanKindSpanKind

Optional, the span kind. Defaults to Unspecified

labelsDictionarystringstring

Optional, labels to add to the span.

Returns
TypeDescription
StartSpanOptions