System.ClientModel.Primitives.DiagnosticScope
A lightweight wrapper around Activity that provides a consistent
pattern for creating, starting, and completing diagnostic scopes in client libraries.
Gets a value indicating whether this scope is enabled and will record tracing data.
Adds a tag to the underlying activity.
Adds a typed tag to the underlying activity using a custom formatter.
Adds an integer tag to the underlying activity.
public void AddLink(string traceparent, string tracestate, IDictionary<string, object> attributes = null)
Adds a distributed tracing link to the scope. Must be called before Start.
Adds a long tag to the underlying activity.
Disposes the scope and stops the underlying activity.
Marks the scope as failed with the specified exception.
Marks the scope as failed with a low-cardinality error code.
Sets the display name of the underlying activity.
Sets the start time of the underlying activity.
Sets the W3C trace context for this scope. Must be called before Start.
Starts the scope by starting the underlying Activity.
Must be called after adding any links, trace context, or pre-start attributes.