stats/opentelemetry: dynamically calculate compressed message size in tests - #9346
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9346 +/- ##
==========================================
+ Coverage 83.15% 87.40% +4.25%
==========================================
Files 424 424
Lines 35312 30284 -5028
==========================================
- Hits 29362 26470 -2892
+ Misses 4436 3814 -622
+ Partials 1514 0 -1514
🚀 New features to boost your workflow:
|
Contributor
|
/gemini review |
Contributor
There was a problem hiding this comment.
Code Review
This pull request replaces hardcoded gzip-compressed message sizes (previously set to 57 bytes) in CSM and end-to-end tests with dynamically calculated sizes. A new helper function 'GzipCompressedMessageSize' is introduced in the internal 'testutils' package to marshal and gzip-compress protobuf messages to determine their exact size dynamically. There are no review comments, and we have no feedback to provide.
mbissa
reviewed
Aug 21, 2026
Contributor
|
LGTM, modulo tests passing. |
mbissa
approved these changes
Aug 21, 2026
This was referenced Aug 25, 2026
eshitachandwani
added a commit
that referenced
this pull request
Aug 25, 2026
Original PR : #9346 RELEASE NOTES: None
eshitachandwani
added a commit
that referenced
this pull request
Aug 25, 2026
Original PR : #9346 Also updates the x/net dependency to ensure compatibility with go1.27 because of the issue reported here : golang/go#80482 RELEASE NOTES: None
eshitachandwani
added a commit
that referenced
this pull request
Aug 25, 2026
Original PR : #9346 RELEASE NOTES: None
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests in
stats/opentelemetryandstats/opentelemetry/csmasserted a hardcoded compressed message size of57bytes for a 10,000-byte zero payload with gzip compression.In Go 1.27, standard library
compress/gzipcompression improvements changed the output size of this payload from 57 bytes to 54 bytes, causing metric and trace size assertions to fail when executed under newer Go toolchains.Added
GzipCompressedMessageSizehelper in to compute the expected compressed byte length dynamically viacompress/gzip. Updated metric and trace assertions to use the same.RELEASE NOTES: None