Skip to content

Allow pluggable Propagators for AspNetCore #28642

Closed
@cijothomas

Description

@cijothomas

Is your feature request related to a problem? Yes.

The issue is with the context propagation logic embedded within Asp.Net Core, HttpClient libraries. These libraries have a hard-coded propagation logic embedded inside them, which follows the W3CTraceContext protocol. However, this makes it hard for users who use non W3CTraceContext, as there is no way to "swap" the W3CTraceContext with something else.

Describe the solution you'd like

Let DiagnosticSource package expose a new Propagators API, ideally, in compliance with the OpenTelemetry specification for Propagators.. Here is the issue opened in runtime to track this - dotnet/runtime#46054
Once this API is exposed by the runtime, modify AspNetCore (and HttpClient) to simply use these new Propagators API. The default Propagator can be the W3CTraceContext one itself, to ensure backward compatibility. But users can swap it with any custom propagators they chose.

Additional context

Related issue: #27237
Runtime issue: dotnet/runtime#46054

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-hostingIncludes Hostingarea-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresblockedThe work on this issue is blocked due to some dependencyfeature-diagnosticsDiagnostic middleware and pages (except EF diagnostics)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions