Skip to content

otel: stop marking spans as errors on 4xx - #2267

Merged
yusukebe merged 7 commits into
honojs:mainfrom
chdsbd:cdignam/otel-4xx-not-errors
Nov 23, 2026
Merged

yusukebe merged 7 commits into
honojs:mainfrom
chdsbd:cdignam/otel-4xx-not-errors

Conversation

@chdsbd

@chdsbd chdsbd commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Now we follow the otel conventions and don't mark our server span as errored for 4xx responses.

Fixes #2169

The author should do the following, if applicable

  • Add tests
  • Run tests
  • pnpm changeset at the top of this repo and push the changeset
  • Follow the contribution guide

@changeset-bot

changeset-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: aefbf65

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hono/otel Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chdsbd chdsbd changed the title stop marking otel spans as errors on 4xx otel: stop marking spans as errors on 4xx Nov 20, 2026
@chdsbd
chdsbd marked this pull request as ready for review November 21, 2026 01:05
@codecov

codecov Bot commented Nov 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.18182% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.74%. Comparing base (6f11fdd) to head (aefbf65).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
packages/otel/src/index.ts 93.18% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2267      +/-   ##
==========================================
+ Coverage   92.69%   92.74%   +0.05%     
==========================================
  Files         119      119              
  Lines        4367     4384      +17     
  Branches     1139     1152      +13     
==========================================
+ Hits         4048     4066      +18     
+ Misses        284      282       -2     
- Partials       35       36       +1     
Flag Coverage Δ
otel 95.20% <93.18%> (+1.54%) ⬆️
ua-blocker 92.63% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@yusukebe yusukebe 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.

LGTM!

@yusukebe

Copy link
Copy Markdown
Member

@chdsbd Thanks! Merging.

@yusukebe
yusukebe merged commit 2616c1a into honojs:main Nov 23, 2026
100 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 23, 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.

@hono/otel: error.type is not set on server spans or request duration metrics when a request fails

2 participants