Skip to content

Remove the deprecated WithRouteTag option in otelhttp#8268

Merged
dmathieu merged 8 commits intoopen-telemetry:mainfrom
MrAlias:rm-dep-with-route-otelhttp
Dec 11, 2025
Merged

Remove the deprecated WithRouteTag option in otelhttp#8268
dmathieu merged 8 commits intoopen-telemetry:mainfrom
MrAlias:rm-dep-with-route-otelhttp

Conversation

@MrAlias
Copy link
Copy Markdown
Contributor

@MrAlias MrAlias commented Dec 8, 2025

No description provided.

@MrAlias MrAlias added this to the v1.40.0 milestone Dec 8, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.3%. Comparing base (a0bd0ef) to head (02552d8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #8268     +/-   ##
=======================================
- Coverage   82.3%   82.3%   -0.1%     
=======================================
  Files        193     193             
  Lines      13778   13769      -9     
=======================================
- Hits       11343   11334      -9     
  Misses      2030    2030             
  Partials     405     405             
Files with missing lines Coverage Δ
instrumentation/net/http/otelhttp/handler.go 92.1% <ø> (-0.6%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MrAlias MrAlias marked this pull request as ready for review December 8, 2025 22:10
@MrAlias MrAlias requested a review from dmathieu as a code owner December 8, 2025 22:10
Copilot AI review requested due to automatic review settings December 8, 2025 22:10
@MrAlias MrAlias requested a review from a team as a code owner December 8, 2025 22:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the deprecated WithRouteTag function from the otelhttp instrumentation package. The function was previously deprecated because HTTP routes are now automatically added to spans, and for metrics, users should use WithMetricAttributesFn instead.

  • Removed the WithRouteTag function from handler.go
  • Removed the associated test TestWithRouteTag from handler_test.go and cleaned up the unused semconv import
  • Updated CHANGELOG.md to document the removal in the "Removed" section

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
instrumentation/net/http/otelhttp/handler.go Removed the deprecated WithRouteTag function (22 lines)
instrumentation/net/http/otelhttp/handler_test.go Removed the TestWithRouteTag test and cleaned up the unused semconv import
CHANGELOG.md Added changelog entry documenting the removal, though contains an extraneous line about WithPublicEndpointFn

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CHANGELOG.md Outdated
MrAlias and others added 2 commits December 8, 2025 14:24
Comment thread instrumentation/net/http/otelhttp/handler.go
@dmathieu dmathieu merged commit 0d7d701 into open-telemetry:main Dec 11, 2025
28 checks passed
@MrAlias MrAlias deleted the rm-dep-with-route-otelhttp branch December 11, 2025 16:05
JoaoBraveCoding added a commit to JoaoBraveCoding/api that referenced this pull request Feb 24, 2026
philipgough pushed a commit to observatorium/api that referenced this pull request Feb 26, 2026
* chore: update dependencies

* fix race condition

* chore: updated bingo tools

* fix: move from the deprecated CFB to CTR

* chore: updated some go expressions to recent standards

* refactor: stop using deprecated WithRouteTag
It was removed in open-telemetry/opentelemetry-go-contrib#8268
Approach was inspired by goadesign/goa#3897

* downgrade golangci-ling to 2.8.0 as it's the most recent version still
on 1.24

* update github.com/efficientgo/e2e
Copilot AI pushed a commit to observatorium/api that referenced this pull request Feb 26, 2026
* chore: update dependencies

* fix race condition

* chore: updated bingo tools

* fix: move from the deprecated CFB to CTR

* chore: updated some go expressions to recent standards

* refactor: stop using deprecated WithRouteTag
It was removed in open-telemetry/opentelemetry-go-contrib#8268
Approach was inspired by goadesign/goa#3897

* downgrade golangci-ling to 2.8.0 as it's the most recent version still
on 1.24

* update github.com/efficientgo/e2e
philipgough pushed a commit to rhobs/api that referenced this pull request Apr 10, 2026
* chore: update dependencies

* fix race condition

* chore: updated bingo tools

* fix: move from the deprecated CFB to CTR

* chore: updated some go expressions to recent standards

* refactor: stop using deprecated WithRouteTag
It was removed in open-telemetry/opentelemetry-go-contrib#8268
Approach was inspired by goadesign/goa#3897

* downgrade golangci-ling to 2.8.0 as it's the most recent version still
on 1.24

* update github.com/efficientgo/e2e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants