[Geneva] Fix ETW metadata to allow .NET EventSource subscriptions#4729
Conversation
|
Welcome, contributor! Thank you for your contribution to opentelemetry-dotnet-contrib. Important reminders:
|
martincostello
left a comment
There was a problem hiding this comment.
Please add a CHANGELOG entry for this fix.
There was a problem hiding this comment.
Pull request overview
This PR fixes the Geneva ETW transport’s EventSource/ETW metadata mismatch so that .NET EventListener/EventSource subscriptions can successfully parse the emitted payload (preventing listener errors and truncated data).
Changes:
- Adjust ETW payload writing to match the EventSource-inferred manifest schema (length + raw data).
- Add an ETW roundtrip test validating
EventListenercan receive the fullbyte[]payload. - Add an xUnit collection definition to disable parallelization for ETW tests (system-global resource).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/OpenTelemetry.Exporter.Geneva/Internal/Transports/EtwDataTransport.cs | Updates EventSource metadata and WriteEventCore payload layout to align ETW data with the generated manifest. |
| test/OpenTelemetry.Exporter.Geneva.Tests/Internal/Transports/EtwDataTransportTests.cs | Adds a roundtrip ETW/EventListener test to verify the payload is received and decoded correctly. |
| test/OpenTelemetry.Exporter.Geneva.Tests/EtwCollection.cs | Adds a non-parallel xUnit collection for ETW tests to avoid cross-test interference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Added |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4729 +/- ##
==========================================
+ Coverage 77.37% 77.43% +0.05%
==========================================
Files 466 466
Lines 19764 19766 +2
==========================================
+ Hits 15292 15305 +13
+ Misses 4472 4461 -11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
@zvorygin Please fix the file encoding for |
9144178 to
cd5b151
Compare
Re-apply previous suggestion that was force-pushed over and fix sorting.
It's impossible to subscribe to OpenTelemetry EventSource, since data published to the ETW doesn't match manifest/schema inferred from the EtwEventSource
Event-annotated methods. Listeners receive errors and truncated data.Changes
Make manifest schema match the actual data written to the ETW. Changed the internal format to have two fields - buffer size, ad raw data, as .Net EventSource expects(mayb be a breaking change). Verified that Geneva MonitringAgent can ingest the data.
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)