Introduce Propagators API in DiagnosticSource package #46054
Labels
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
area-System.Diagnostics.Tracing
feature-request
Milestone
Background and Motivation
DiagnosticSource
package was enhanced in 5.0 to achieve OpenTelemetry Tracing API scenarios. There were few areas which were required in OpenTelemetry API, but was not included in 5.0, due to timing issues/OpenTelemetry spec not being ready before .NET 5 cut off time. One of the key missing pieces is the Propagators API. A propagator API allows libraries to inject and/or extract distributed tracing context when leaving process boundaries.This API would be used by libraries such as Asp.Net Core, HttpClient, to extract/inject context from/to the next hop in a distributed trace. Currently, these libraries have a hard-coded propagators (following W3CTraceContext), baked into the library itself. This causes issues, when the end user want to use a non W3CTraceContext propagator. There is an issue opened in AspNetCore repo to allow pluggable propagators, but to make it happen, an API must be exposed by the runtime itself. (dotnet/aspnetcore#28642)
Proposed API
The proposal is to expose an API, which matches the OpenTelemetry specification for Propagators..
Alternative Designs
Risks
The text was updated successfully, but these errors were encountered: