Skip to content

Version Packages - #2153

Merged
yusukebe merged 1 commit into
mainfrom
changeset-release/main
Sep 26, 2026
Merged

yusukebe merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@hono/otel@1.2.0

Minor Changes

  • #1915 41d0f74d2885cf3278efb49eae4ef65abd18081c Thanks @spokodev! - feat(otel): add getRoute config callback so downstream adapters can resolve http.route

    The middleware previously overwrote the http.route attribute on the active span with the matched Hono route pattern at finalize time, even when a downstream adapter (such as an RPC layer) had already set a more specific value on the span. The same pattern was also reported as the http.route attribute of the http.server.request.duration metric, so per-operation latency collapsed into the pattern bucket.

    getRoute(c) is now an optional config callback. When it returns a non-empty string it is used for both the span attribute and the metric attribute; when it returns undefined, an empty string, or throws, the middleware falls back to the existing routePath(c) behavior. This is fully backward compatible and resolves issue #1914.

@yusukebe
yusukebe merged commit b0a345f into main Sep 26, 2026
@yusukebe
yusukebe deleted the changeset-release/main branch September 26, 2026 05:52
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.

@hono/otel overwrites http.route set by downstream middleware

1 participant