-
Notifications
You must be signed in to change notification settings - Fork 360
[Exporter.Geneva] Allow custom string size limit to increase ETW buffer space efficiency #2813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Exporter.Geneva] Allow custom string size limit to increase ETW buffer space efficiency #2813
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #2813 +/- ##
===========================================
- Coverage 73.91% 52.89% -21.02%
===========================================
Files 267 55 -212
Lines 9615 5091 -4524
===========================================
- Hits 7107 2693 -4414
+ Misses 2508 2398 -110
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…aceExporter is not impacted
rajkumar-rangaraj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new connection‐string parameter to let users override the maximum MessagePack string length, propagates that limit through the exporter and serializer, adds tests for the new behavior, and updates documentation.
- Adds
PrivatePreviewLogMessagePackStringSizeLimitsetting toConnectionStringBuilderwith default and validation - Exposes the new limit to
MsgPackLogExporterand enforces it against the buffer size - Updates
MessagePackSerializerto honor a configurable size limit and adds related unit tests
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/OpenTelemetry.Exporter.Geneva/Internal/ConnectionStringBuilder.cs | Introduced PrivatePreviewLogMessagePackStringSizeLimit property with parsing and validation |
| src/OpenTelemetry.Exporter.Geneva/Internal/MsgPack/MsgPackLogExporter.cs | Wired new size limit into the exporter and added a range check |
| src/OpenTelemetry.Exporter.Geneva/Internal/MsgPack/MessagePackSerializer.cs | Extended serialization APIs to accept a custom char‐count limit |
| test/OpenTelemetry.Exporter.Geneva.Tests/MsgPackLogExporterTests.cs | Added tests for default, valid, negative, and too‐large limits |
| test/OpenTelemetry.Exporter.Geneva.Tests/MessagePackSerializerTests.cs | Updated ASCII and Unicode serialization tests to exercise truncation |
| test/OpenTelemetry.Exporter.Geneva.Tests/ConnectionStringBuilderTests.cs | Added tests to verify parsing and validation of the new parameter |
| src/OpenTelemetry.Exporter.Geneva/CHANGELOG.md | Documented the new experimental connection‐string option |
Comments suppressed due to low confidence (2)
src/OpenTelemetry.Exporter.Geneva/Internal/ConnectionStringBuilder.cs:85
- Add XML documentation above this property to describe the
PrivatePreviewLogMessagePackStringSizeLimitparameter, its default value, valid range, and behavior when omitted or out of range.
public int PrivatePreviewLogMessagePackStringSizeLimit
test/OpenTelemetry.Exporter.Geneva.Tests/MessagePackSerializerTests.cs:297
- Consider adding tests that pass a non-default
sizeLimitargument toMessagePackSerializer_TestASCIIStringSerializationandTestUnicodeStringSerializationto verify custom limits behave as expected.
this.MessagePackSerializer_TestASCIIStringSerialization(new string('Z', 1 << 15));
src/OpenTelemetry.Exporter.Geneva/Internal/MsgPack/MessagePackSerializer.cs
Show resolved
Hide resolved
test/OpenTelemetry.Exporter.Geneva.Tests/MessagePackSerializerTests.cs
Outdated
Show resolved
Hide resolved
test/OpenTelemetry.Exporter.Geneva.Tests/MsgPackLogExporterTests.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Exporter.Geneva/Internal/MsgPack/MsgPackLogExporter.cs
Outdated
Show resolved
Hide resolved
test/OpenTelemetry.Exporter.Geneva.Tests/ConnectionStringBuilderTests.cs
Show resolved
Hide resolved
…er space efficiency (open-telemetry#2813) Co-authored-by: Rajkumar Rangaraj <[email protected]>
Fixes #
Design discussion issue #
Changes
Please provide a brief description of the changes here.
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changes