Skip to content

Add support for HTTP trace context transfer during a http redirect #27422

Open
@dmitriyse

Description

@dmitriyse

DotNet supports trace-context transfer through headers in the HTTP communication.
But when HTTP redirect occurs, the trace context information lost.
Currently, the W3C standard does not cover this case also, see: w3c/trace-context#438
But there are not too big amount of possible options.

Until HttpClients will start to support trace context headers preserving during HTTP redirects (which might never happen), query string can be used as a transport.

  1. W3C should standardize the query string parameter names, for example (they should not interfere with app-specific names and be short):
  • _tc_tid
  • _tc_pid
  • etc
  1. Asp.Net Core middleware that currently responsible for the Activity creation should also take into account the query string (not only headers)
  2. Microsoft.Extensions.Http library should be improved to instrument HttpClient if this feature is turned on.
  3. Microsoft.AspNet.TelemetryCorrelation library should be extended Feature Request: Add support for the query-string tracing context transport (to support http redirects). aspnet/Microsoft.AspNet.TelemetryCorrelation#78
  4. Until W3C introduces the names for the query string parameter names they should be configurable in all the above implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected-very-fewThis issue impacts very few customersarea-hostingIncludes Hostingarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-httpclientfactoryIncludes: HttpClientFactory (some bugs also in Extensions repo)severity-minorThis label is used by an internal tool

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions