Skip to content

otelhttp: export Event type for WithMessageEvents#8153

Merged
dmathieu merged 18 commits into
open-telemetry:mainfrom
sonalgaud12:otelhttp
Dec 2, 2025
Merged

otelhttp: export Event type for WithMessageEvents#8153
dmathieu merged 18 commits into
open-telemetry:mainfrom
sonalgaud12:otelhttp

Conversation

@sonalgaud12
Copy link
Copy Markdown
Contributor

This PR fixes issue #8132

The WithMessageEvents option previously accepted an unexported type (event).
This change exports the type as Event.

@sonalgaud12 sonalgaud12 requested review from a team and dmathieu as code owners November 9, 2025 07:58
@sonalgaud12
Copy link
Copy Markdown
Contributor Author

Hello @dmathieu , OpenTelemetry Go enums usually prefix constants with the type name (e.g. SpanKindServer, SpanKindClient). So shall I change ReadEvents, WriteEvents to EventRead, EventWrite .

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 9, 2025

Codecov Report

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

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #8153   +/-   ##
=====================================
  Coverage   82.1%   82.1%           
=====================================
  Files        195     195           
  Lines      13680   13680           
=====================================
+ Hits       11243   11244    +1     
+ Misses      2031    2029    -2     
- Partials     406     407    +1     
Files with missing lines Coverage Δ
instrumentation/net/http/otelhttp/config.go 83.0% <100.0%> (+1.5%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread instrumentation/net/http/otelhttp/config.go
Comment thread instrumentation/net/http/otelhttp/config.go Outdated
Comment thread instrumentation/net/http/otelhttp/config.go Outdated
Comment thread instrumentation/net/http/otelhttp/config_test.go Outdated
Comment thread instrumentation/net/http/otelhttp/config.go Outdated
Comment thread CHANGELOG.md Outdated
Comment thread instrumentation/net/http/otelhttp/config_test.go Outdated
Comment thread instrumentation/net/http/otelhttp/config_test.go Outdated
Comment thread instrumentation/net/http/otelhttp/config.go Outdated
Comment thread instrumentation/net/http/otelhttp/config.go Outdated
Comment thread instrumentation/net/http/otelhttp/config_test.go Outdated
Comment thread instrumentation/net/http/otelhttp/config_test.go Outdated
@sonalgaud12 sonalgaud12 requested a review from flc1125 November 13, 2025 16:53
@flc1125
Copy link
Copy Markdown
Member

flc1125 commented Nov 17, 2025

@sonalgaud12 Please fix the lint; we can use make ci for local verification.

Comment thread instrumentation/net/http/otelhttp/config.go Outdated
Comment thread instrumentation/net/http/otelhttp/config_test.go
@dmathieu
Copy link
Copy Markdown
Member

Could you solve the lint issue please?

Comment thread CHANGELOG.md Outdated
Co-authored-by: Damien Mathieu <42@dmathieu.com>
@sonalgaud12
Copy link
Copy Markdown
Contributor Author

Hey @flc1125 , Can you please review this?

@dmathieu dmathieu merged commit 5fe1bab into open-telemetry:main Dec 2, 2025
28 checks passed
@MrAlias MrAlias mentioned this pull request Dec 8, 2025
@MrAlias MrAlias added this to the v1.39.0 milestone Dec 8, 2025
@sonalgaud12 sonalgaud12 deleted the otelhttp branch March 12, 2026 17:16
@sonalgaud12 sonalgaud12 mentioned this pull request Apr 16, 2026
8 tasks
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.

4 participants