-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Support W3C Baggage header #28328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support W3C Baggage header #28328
Conversation
| public static readonly string AltSvc = "Alt-Svc"; | ||
| public static readonly string Authority = ":authority"; | ||
| public static readonly string Authorization = "Authorization"; | ||
| public static readonly string Baggage = "baggage"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All other headers are pascal case. This won't matter when getting the value from the headers collection - it is case-insensitive.
| public static readonly string Baggage = "baggage"; | |
| public static readonly string Baggage = "Baggage"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was curious about that. I kept it consistent with traceparent and tracestate, the other two headers related to this standard (W3C Trace Context) that are lowercase in this class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Perhaps better as is then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since HTTP/2 all header names are officially lower case so it might make sense to start doing that with new entries. You're right though that the collections are all ignore-case so it shouldn't make a difference.
src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs
Outdated
Show resolved
Hide resolved
| public static readonly string AltSvc = "Alt-Svc"; | ||
| public static readonly string Authority = ":authority"; | ||
| public static readonly string Authorization = "Authorization"; | ||
| public static readonly string Baggage = "baggage"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since HTTP/2 all header names are officially lower case so it might make sense to start doing that with new entries. You're right though that the collections are all ignore-case so it shouldn't make a difference.
Co-authored-by: James Newton-King <[email protected]>
|
@shirhatti weren't we already planning on doing something like this? |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Yes. We're planning to add support for the OpenTelemetry propagators API- https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/context/api-propagators.md We'd still want to W3C trace context and W3C baggage propagation on by default with new API to configure/disable propagation. This change would be needed even if we add propagators support. |
|
Thanks |
|
Hi @Tratcher. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
Summary of the changes (Less than 80 chars)
Addresses #28319