Skip to content

otelhttp: deprecate the WithRouteTag option#8117

Merged
dmathieu merged 5 commits into
open-telemetry:mainfrom
dmathieu:deprecate-withroutetag
Nov 4, 2025
Merged

otelhttp: deprecate the WithRouteTag option#8117
dmathieu merged 5 commits into
open-telemetry:mainfrom
dmathieu:deprecate-withroutetag

Conversation

@dmathieu
Copy link
Copy Markdown
Member

@dmathieu dmathieu commented Nov 3, 2025

This is part of #8107

The WithRouteTag option doesn't really have any needs anymore.
For spans, we already add the route name automatically. For metrics, folks can use the WithMetricAttributesFn option.

@dmathieu dmathieu marked this pull request as ready for review November 3, 2025 10:25
@dmathieu dmathieu requested a review from a team as a code owner November 3, 2025 10:25
@MrAlias MrAlias mentioned this pull request Nov 3, 2025
21 tasks
Comment thread CHANGELOG.md Outdated
dmathieu and others added 2 commits November 4, 2025 09:12
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.0%. Comparing base (8d65e49) to head (968cc14).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #8117   +/-   ##
=====================================
  Coverage   80.9%   81.0%           
=====================================
  Files        194     194           
  Lines      13073   13073           
=====================================
+ Hits       10588   10592    +4     
+ Misses      2107    2105    -2     
+ Partials     378     376    -2     
Files with missing lines Coverage Δ
instrumentation/net/http/otelhttp/handler.go 92.7% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dmathieu dmathieu merged commit 6342fe6 into open-telemetry:main Nov 4, 2025
28 checks passed
@dmathieu dmathieu deleted the deprecate-withroutetag branch November 4, 2025 08:25
// with HTTP route attribute.
//
// Deprecated: spans are automatically annotated with the route attribute.
// To annotate metrics, use the `WithMetricAttributesFn` option.
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.

This should be

Suggested change
// To annotate metrics, use the `WithMetricAttributesFn` option.
// To annotate metrics, use the [WithMetricAttributesFn] option.

@MrAlias MrAlias mentioned this pull request Dec 8, 2025
@MrAlias MrAlias added this to the v1.39.0 milestone Dec 8, 2025
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.

4 participants