opentelemetry-js
opentelemetry-js copied to clipboard
Add option to dual-emit HTTP attributes and finish HTTP migration
Background
Issue #4572 is the Semantic Convention Update: Tracking Issue for the migration to stable HTTP attributes. There is a migration plan that includes providing the option to dual-emit old and new (stable) HTTP attributes for a time.
This project has taken longer than anticipated, and has gone somewhat stale while there are still remaining items that need to be completed. The issue descriptions also have not been updated to match our expectations based on our learnings over time.
Problem
PR #5552 removed the OTEL_SEMCONV_STABILITY_OPT_IN configuration option, which means that only new (stable) attributes will be emitted from the instrumentation-http package. Normally this would be fine, as the 6 month recommended time window has passed. However, we have not yet added this dual-emit option for other instrumentations, most notably: instrumentation-xhr, instrumentation-fetch, and instrumentation-grpc (part of #4897). This would mean that an end user could be in a state where their backend JavaScript only emits new stable attributes, and their frontend JavaScript only emits old attributes, and there is no way to reconcile the two. This is especially problematic because these are all part of the same language SIG, and HTTP attributes are the most critical and ubiquitous attributes in most applications.
To minimize confusion and provide the best user experience, we should have the dual-emit option be available for all relevant instrumentations for a period of time, and then remove them all together.
Proposed Plan
- Open a new PR for
instrumentation-httpthat re-implements theOTEL_SEMCONV_STABILITY_OPT_INoption for dual-emitting old and new(stable) http attributes. (#5657 ) - Open a new PR implementing this option for
instrumentation-xhr(#5650 ) - Open a new PR implementing this option for
instrumentation-fetch(#5649 ) - Open a new PR implementing this option for
instrumentation-grpc(#5648 ) - Review remaining instrumentations and determine if more updates are needed for http attributes
- In ~6 months remove the dual-emit option from each of these instrumentations
This should be done fairly quickly to avoid any need to hold back releases, and to finally get us caught up on the semantic conventions updates.