Skip to content

Remove the deprecated WithPublicEndpoint from otelhttp#8267

Merged
dmathieu merged 8 commits into
open-telemetry:mainfrom
MrAlias:rm-dep-otelhttp-withep
Dec 11, 2025
Merged

Remove the deprecated WithPublicEndpoint from otelhttp#8267
dmathieu merged 8 commits into
open-telemetry:mainfrom
MrAlias:rm-dep-otelhttp-withep

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 (fc62fd6) to head (9afbeb9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #8267     +/-   ##
=======================================
- Coverage   82.3%   82.3%   -0.1%     
=======================================
  Files        193     193             
  Lines      13780   13778      -2     
=======================================
- Hits       11345   11343      -2     
  Misses      2030    2030             
  Partials     405     405             
Files with missing lines Coverage Δ
instrumentation/net/http/otelhttp/config.go 82.5% <ø> (-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 WithPublicEndpoint function from the otelhttp instrumentation package, completing the deprecation cycle that was introduced in version 1.39.0. The function was a convenience wrapper that always returned true, and users should migrate to the more flexible WithPublicEndpointFn which allows conditional configuration based on the request.

  • Removed the deprecated WithPublicEndpoint function from config.go
  • Removed the associated test TestWithPublicEndpoint from handler_test.go
  • Updated CHANGELOG.md to document the removal with migration guidance

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
instrumentation/net/http/otelhttp/config.go Removed the deprecated WithPublicEndpoint function and its documentation
instrumentation/net/http/otelhttp/handler_test.go Removed TestWithPublicEndpoint test; functionality is covered by TestWithPublicEndpointFn
CHANGELOG.md Added removal entry under "Unreleased" section with migration guidance

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

@dmathieu dmathieu merged commit a0bd0ef into open-telemetry:main Dec 11, 2025
39 of 45 checks passed
@MrAlias MrAlias deleted the rm-dep-otelhttp-withep branch December 11, 2025 16:06
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.

otelhttp: Deprecate WithPublicEndpoint in favor of WithPublicEndpointFn

5 participants