System.ClientModel.Primitives.DiagnosticScope
A lightweight wrapper around Activity that provides a consistent
pattern for creating, starting, and completing diagnostic scopes in client libraries.
namespace System.ClientModel.Primitives
{
internal readonly struct DiagnosticScope : IDisposable
{
public bool IsEnabled { get; }
public void Start();
public void AddAttribute(string name, string value);
public void AddAttribute<[System.Runtime.CompilerServices.Nullable(2)] T>(string name, T value, Func<T, string> format);
public void AddIntegerAttribute(string name, int value);
public void AddLongAttribute(string name, long value);
public void AddLink(string traceparent, string tracestate, IDictionary<string, object> attributes = null);
public void SetTraceContext(string traceparent, string tracestate = null);
public void SetDisplayName(string displayName);
public void SetStartTime(DateTime dateTime);
public void Failed(Exception exception);
public void Failed(string errorCode);
public void Dispose();
}
}