Skip to content

otelhttp: Ignore informational response status codes when persisting status#6913

Merged
dmathieu merged 5 commits into
open-telemetry:mainfrom
VirrageS:update-writeheader
Mar 4, 2026
Merged

otelhttp: Ignore informational response status codes when persisting status#6913
dmathieu merged 5 commits into
open-telemetry:mainfrom
VirrageS:update-writeheader

Conversation

@VirrageS
Copy link
Copy Markdown
Contributor

Closes #6912

@VirrageS VirrageS requested review from a team and dmathieu as code owners March 11, 2025 10:07
@VirrageS VirrageS force-pushed the update-writeheader branch from 607baeb to 2e15df2 Compare March 11, 2025 10:19
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.1%. Comparing base (8986a19) to head (8fd602b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #6913   +/-   ##
=====================================
  Coverage   82.1%   82.1%           
=====================================
  Files        180     180           
  Lines      13759   13765    +6     
=====================================
+ Hits       11307   11313    +6     
  Misses      2049    2049           
  Partials     403     403           
Files with missing lines Coverage Δ
...ux/otelmux/internal/request/resp_writer_wrapper.go 100.0% <100.0%> (ø)
...p/otelhttp/internal/request/resp_writer_wrapper.go 100.0% <100.0%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@VirrageS VirrageS force-pushed the update-writeheader branch from 2e15df2 to 7d2573f Compare March 11, 2025 15:13
@VirrageS
Copy link
Copy Markdown
Contributor Author

@dmathieu Should I add it to Changelog?

@dmathieu
Copy link
Copy Markdown
Member

Yes, please

@VirrageS VirrageS force-pushed the update-writeheader branch from 7d2573f to 9b84d37 Compare March 12, 2025 10:56
@VirrageS VirrageS changed the title otelhttp: Ignore informational header when persisting status otelhttp: Ignore informational response status codes when persisting status Mar 12, 2025
@VirrageS VirrageS force-pushed the update-writeheader branch from 9b84d37 to 84dde92 Compare March 12, 2025 11:00
@VirrageS VirrageS force-pushed the update-writeheader branch from 84dde92 to 034029c Compare March 12, 2025 11:54
@github-actions github-actions Bot requested a review from akats7 March 12, 2025 11:54
@VirrageS VirrageS force-pushed the update-writeheader branch from 034029c to 5e505fb Compare March 12, 2025 11:57
Comment thread CHANGELOG.md Outdated
…status

Signed-off-by: Janusz Marcinkiewicz <januszm@nvidia.com>
@VirrageS VirrageS force-pushed the update-writeheader branch from 5e505fb to 98e82cc Compare March 13, 2025 11:39
@pellared
Copy link
Copy Markdown
Member

pellared commented Mar 2, 2026

@dmathieu, is this PR still valid? Should other @open-telemetry/go-approvers review it?

@dmathieu
Copy link
Copy Markdown
Member

dmathieu commented Mar 2, 2026

Yes, this is also still valid.

Comment thread CHANGELOG.md Outdated
@pellared pellared added this to the v1.42.0 milestone Mar 4, 2026
@pellared
Copy link
Copy Markdown
Member

pellared commented Mar 4, 2026

@VirrageS, thank you for your contribution!

@dmathieu dmathieu merged commit 8f4e378 into open-telemetry:main Mar 4, 2026
30 checks passed
pellared added a commit that referenced this pull request Mar 6, 2026
#8649)

### Added

- Add environment variables propagation carrier in `go.opentelemetry.io/contrib/propagators/envcar`. (#8442)

### Changed

- Upgrade `go.opentelemetry.io/otel/semconv` to `v1.40.0`, including updates across instrumentation and detector modules. (#8631)
  - The semantic conventions v1.40.0 release introduces RPC breaking changes applied in this repository:
    - RPC spans and metrics no longer include `network.protocol.name`, `network.protocol.version`, or `network.transport` attributes.
    - `rpc.client.request.size`, `rpc.client.response.size`, `rpc.server.request.size`, and `rpc.server.response.size` are no longer emitted in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`.
    - `rpc.message` span events and their message attributes are no longer emitted in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` (including when `WithMessageEvents` is configured).

  See [semantic-conventions v1.40.0 release](https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.40.0) for complete details.

### Fixed

- Ignore informational response status codes (`100-199`) except `101 Switching Protocols` when storing the HTTP status code in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` and `go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux`. (#6913)
- Make `Body` handling in `Transport` consistent with stdlib in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`. (#8618)
- Fix bucket boundaries for `rpc.server.call.duration` and `rpc.client.call.duration` in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`. (#8642)
- Host resource detector in `go.opentelemetry.io/contrib/otelconf` now includes `os.` attributes. (#8578)

### Removed

- Drop support for [Go 1.24]. (#8628)

[Go 1.24]: https://go.dev/doc/go1.24
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.

RespWriterWrapper incorrectly handles 100 Continue response

3 participants