Class SpanAttributes
- Namespace
- OpenTelemetry.Trace
- Assembly
- OpenTelemetry.Api.dll
A class that represents the span attributes. Read more here https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/common.md#attributes.
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
Add(string, bool[])
Add entry to the attributes.
public void Add(string key, bool[] values)
Parameters
Add(string, double)
Add entry to the attributes.
public void Add(string key, double value)
Parameters
Add(string, double[])
Add entry to the attributes.
public void Add(string key, double[] values)
Parameters
Add(string, long)
Add entry to the attributes.
public void Add(string key, long value)
Parameters
Add(string, long[])
Add entry to the attributes.
public void Add(string key, long[] values)
Parameters
Add(string, string)
Add entry to the attributes.
public void Add(string key, string value)
Parameters
Add(string, string[])
Add entry to the attributes.
public void Add(string key, string[] values)