<PackageReference Include="OpenTelemetry.Api" Version="1.20.0-rc.1" />

OpenTelemetry.Context.RuntimeContext

public static class RuntimeContext
Generic runtime context management API.
namespace OpenTelemetry.Context { public static class RuntimeContext { public static Type ContextSlotType { get; set; } public static RuntimeContextSlot<T> RegisterSlot<[System.Runtime.CompilerServices.Nullable(2)] T>(string slotName); public static RuntimeContextSlot<T> GetSlot<[System.Runtime.CompilerServices.Nullable(2)] T>(string slotName); public static void SetValue<[System.Runtime.CompilerServices.Nullable(2)] T>(string slotName, T value); public static T GetValue<T>(string slotName); public static void SetValue(string slotName, object value); public static object GetValue(string slotName); } } namespace OpenTelemetry.Context.Propagation { public abstract class TextMapPropagator { public abstract ISet<string> Fields { get; } public abstract void Inject<[System.Runtime.CompilerServices.Nullable(2)] T>(PropagationContext context, T carrier, Action<T, string, string> setter); public abstract PropagationContext Extract<[System.Runtime.CompilerServices.Nullable(2)] T>(PropagationContext context, T carrier, Func<T, string, IEnumerable<string>> getter); protected TextMapPropagator(); } }