Skip to content

feat(sdk-trace-web,fetch,grpc,http,xml-http-request): only emit stable http metrics, spans and attributes - #6819

Merged
trentm merged 20 commits into
open-telemetry:mainfrom
maryliag:http-stable
Jul 3, 2026
Merged

feat(sdk-trace-web,fetch,grpc,http,xml-http-request): only emit stable http metrics, spans and attributes#6819
trentm merged 20 commits into
open-telemetry:mainfrom
maryliag:http-stable

Conversation

@maryliag

@maryliag maryliag commented Jun 17, 2026

Copy link
Copy Markdown
Member

Part Of #6240

  • Only emit stable HTTP metrics.
  • Remove config that allow to send old metrics
  • Update documentation
  • Cleanup removing functions, files and sem conv no longer used

Fixes #2353

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.56198% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.08%. Comparing base (d2d08f6) to head (4e7310a).

Files with missing lines Patch % Lines
...ges/opentelemetry-instrumentation-http/src/http.ts 85.71% 5 Missing ⚠️
...es/opentelemetry-instrumentation-http/src/utils.ts 92.30% 3 Missing ⚠️
...emetry-instrumentation-xml-http-request/src/xhr.ts 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6819      +/-   ##
==========================================
- Coverage   95.14%   95.08%   -0.07%     
==========================================
  Files         397      394       -3     
  Lines       14254    13992     -262     
  Branches     3296     3223      -73     
==========================================
- Hits        13562    13304     -258     
+ Misses        692      688       -4     
Files with missing lines Coverage Δ
...s/opentelemetry-instrumentation-fetch/src/fetch.ts 83.17% <100.00%> (-1.41%) ⬇️
...opentelemetry-instrumentation-fetch/src/semconv.ts 100.00% <ø> (ø)
...emetry-instrumentation-grpc/src/instrumentation.ts 96.29% <100.00%> (+0.86%) ⬆️
.../opentelemetry-instrumentation-grpc/src/semconv.ts 100.00% <ø> (ø)
.../opentelemetry-instrumentation-http/src/semconv.ts 100.00% <ø> (ø)
...ry-instrumentation-xml-http-request/src/semconv.ts 100.00% <ø> (ø)
...emetry-instrumentation-xml-http-request/src/xhr.ts 93.22% <95.83%> (-0.68%) ⬇️
...es/opentelemetry-instrumentation-http/src/utils.ts 86.86% <92.30%> (-3.50%) ⬇️
...ges/opentelemetry-instrumentation-http/src/http.ts 93.49% <85.71%> (-0.26%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maryliag
maryliag marked this pull request as ready for review June 17, 2026 19:52
@maryliag
maryliag requested review from a team as code owners June 17, 2026 19:52
@maryliag maryliag changed the title feat(several): only emit stable http metrics feat(sdk-trace-web,fetch,grpc,http,xml-http-request): only emit stable http metrics Jun 17, 2026
Comment thread experimental/packages/opentelemetry-instrumentation-grpc/README.md Outdated
@pichlermarc

Copy link
Copy Markdown
Member

This also fixes #2353 since the code that causes this will be removed and the bug does not exist for the new semantic conventions. I'll link it.

@pichlermarc pichlermarc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this 🙌

I think the title needs to be updated (we're not only emitting stable-only metrics but also spans and their attributes follow the new semconv with this change).

Comment thread packages/opentelemetry-sdk-trace-web/src/utils.ts
@maryliag maryliag changed the title feat(sdk-trace-web,fetch,grpc,http,xml-http-request): only emit stable http metrics feat(sdk-trace-web,fetch,grpc,http,xml-http-request): only emit stable http metrics, spans and attributes Jun 18, 2026
@maryliag

Copy link
Copy Markdown
Member Author

@pichlermarc let me know if you want any other changes.
The only thing missing is the version update that I can update when this PR is about to merge (and if you know which version will be)

@pichlermarc pichlermarc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a few smaller things (see comments below):

Looks like there's a dead-code enum in experimental/packages/opentelemetry-instrumentation-xml-http-request/src/enums/AttributeNames.ts that can now be removed :)

Comment thread experimental/packages/opentelemetry-instrumentation-fetch/README.md Outdated
Comment thread experimental/packages/opentelemetry-instrumentation-http/src/utils.ts Outdated
@maryliag

Copy link
Copy Markdown
Member Author

Comments addressed

@pichlermarc pichlermarc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for working on this 🙌

@pichlermarc

Copy link
Copy Markdown
Member

@maryliag - from a release-scheduling perspective it would be great to also have PR that's ready-to-merge on the contrib repo. When we release here, we also have to release contrib, which means if we don't have changes ready users may still have some @opentelemetry/instrumentation-* that emit the old attributes.

My preferred way to get this out to the users would be:

  1. merge contrib PR and merge this PR (simultaneously)
  2. cut core release
  3. cut contrib release

(since 2 and 3 should happen on the same day, otherwise some packages may be incompatible with each other due to breaking changes and that blocks users from upgrading - we've seen this in the past)

This way we also have one "rip the band-aid off" break for HTTP semconv instead of having it spread out over multiple releases

@maryliag

Copy link
Copy Markdown
Member Author

sounds good! I'll open the PR in contrib soon

@maryliag

Copy link
Copy Markdown
Member Author

@trentm
trentm added this pull request to the merge queue Jul 3, 2026
Merged via the queue into open-telemetry:main with commit d9c170c Jul 3, 2026
29 checks passed
@otelbot-js otelbot-js Bot mentioned this pull request Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http instrumentation: url and host attributes are sometime wrong for outgoing requests with ipv6 address

4 participants