Table of Contents

Class SpanAttributes

Namespace
OpenTelemetry.Trace
Assembly
OpenTelemetry.Api.dll
public class SpanAttributes
Inheritance
SpanAttributes
Inherited Members

Remarks

SpanAttributes is a wrapper around System.Diagnostics.ActivityTagsCollection class.

Constructors

SpanAttributes()

Initializes a new instance of the SpanAttributes class.

public SpanAttributes()

SpanAttributes(IEnumerable<KeyValuePair<string, object>>)

Initializes a new instance of the SpanAttributes class.

public SpanAttributes(IEnumerable<KeyValuePair<string, object>> attributes)

Parameters

attributes IEnumerable<KeyValuePair<string, object>>

Initial attributes to store in the collection.

Methods

Add(string, bool)

Add entry to the attributes.

public void Add(string key, bool value)

Parameters

key string

Entry key.

value bool

Entry value.

Add(string, bool[])

Add entry to the attributes.

public void Add(string key, bool[] values)

Parameters

key string

Entry key.

values bool[]

Entry value.

Add(string, double)

Add entry to the attributes.

public void Add(string key, double value)

Parameters

key string

Entry key.

value double

Entry value.

Add(string, double[])

Add entry to the attributes.

public void Add(string key, double[] values)

Parameters

key string

Entry key.

values double[]

Entry value.

Add(string, long)

Add entry to the attributes.

public void Add(string key, long value)

Parameters

key string

Entry key.

value long

Entry value.

Add(string, long[])

Add entry to the attributes.

public void Add(string key, long[] values)

Parameters

key string

Entry key.

values long[]

Entry value.

Add(string, string)

Add entry to the attributes.

public void Add(string key, string value)

Parameters

key string

Entry key.

value string

Entry value.

Add(string, string[])

Add entry to the attributes.

public void Add(string key, string[] values)

Parameters

key string

Entry key.

values string[]

Entry value.