-
Notifications
You must be signed in to change notification settings - Fork 581
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
Django trace response headers #395
Conversation
4db9aa9
to
f7cacbc
Compare
My comment from the SIG meeting: Since W3C trace context is core to OTel and has drafted
I just want to make sure this code is easy to migrate when this happens, or maybe python can have a prototype for this feature in the spec. @owais any idea of the timeline for the |
0e05254
to
bb1bde1
Compare
e3c842a
to
dacd59a
Compare
@aabmass Thanks. That makes sense and definitely makes everything a lot more cleaner and easier to implement in multiple instrumentations. I added an experimental back propagator in open-telemetry/opentelemetry-python#1762 I'll get back to you on the timeframe for the spec proposal. |
Added opt-in support to return traceresponse headers from Django. This allows users to configure their Django apps to inject trace context as headers in HTTP responses. This is useful when client side apps need to connect their spans with the server side spans e.g, in RUM products. Today the most practical way to do this is to use the `Server-Timing` header but in near future we might use the `traceresponse` header as described here: https://w3c.github.io/trace-context/#trace-context-http-response-headers-format As a result the implementation does not use a hard-coded header and instead let's the users pick one. This can be done by setting the `OTEL_PYTHON_TRACE_RESPONSE_HEADER` to the header name that users want to inject in HTTP responses. The option does not have a default value and the feature is disbaled when a env var is not set.
dacd59a
to
47b1275
Compare
Closed in favor of #436 |
Description
Added opt-in support to return trace response headers from Django.
This allows users to configure their Django apps to inject trace context
as headers in HTTP responses. This is useful when client side apps need
to connect their spans with the server side spans e.g, in RUM products.
Today the most practical way to do this is to use the
Server-Timing
header but in near future we might use the
traceresponse
header asdescribed here: https://w3c.github.io/trace-context/#trace-context-http-response-headers-format
As a result the implementation does not use a hard-coded header and
instead let's the users pick one.
This can be done by setting the
OTEL_PYTHON_TRACE_RESPONSE_HEADER
tothe header name that users want to inject in HTTP responses. The option
does not have a default value and the feature is disbaled when a env var
is not set.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Contrib Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.