-
Notifications
You must be signed in to change notification settings - Fork 91
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
Add ServerTiming response propagator #213
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #213 +/- ##
============================================
+ Coverage 32.02% 33.82% +1.80%
+ Complexity 878 853 -25
============================================
Files 79 76 -3
Lines 3360 3225 -135
============================================
+ Hits 1076 1091 +15
+ Misses 2284 2134 -150
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@brettmc the If we registered What I thought about, is to amend the core to offer a dedicated method for response propagators: // register response propagator in _register.php
\OpenTelemetry\SDK\Registry::registerTextMapResponsePropagator(
'server-timing',
ServerTimingPropagator::getInstance()
);
// get a composite propagator with _just_ response propagators
Globals::responsePropagator()->inject($carrier); |
Yes, you're absolutely right. Are we confident enough in the idea of a response propagator to attempt that in core? I feel like it's something that should be spec-driven. |
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.
LGTM - I think a future TODO to formalize in core the idea of a response propagator, possibly based on a spec enhancement.
💯 @jpkrohling and I want to propose a spec amendment somewhere in the next 3 months |
@cedricziel one thing missing is an entry in .gitsplit.yaml for the new package. |
@brettmc pushed! |
This adds a response propagator for server-timings headers.
Server-Timing headers are especially useful as they are accessible for client side technology like RUM libraries. This is true even for the initial page-load. This makes server-timing the perfect vehicle to send the trace-id to the client for context-assumption, even without nasty hacks like meta html elements.
This approach has been demonstrated by vendors like Splunk and Instana. As there is currently no response propagation format agreed on in OpenTelemetry, the new package adds one as well. In a later iteration, these should optimally be backed by spec and then unified. For now, the interface is duplicated to avoid yet another package to be created.
Note to reviewers: The Symfony tests are failing, because the package referenced doesn't exist yet.