fix: enforce maxRecvMsgSize and maxCompressedMsgSize for OTLP - #20312
Merged
Conversation
The compressed payloads were not validated against any maximum size limit The validation of the raw payload was also ineffective. This patch ensures that the maxRecvMsgSize is tested regardless of read error status and ensure that compressed data does not exceed 10:1 compression ratio.
jnewbigin
force-pushed
the
jnewbigin/otlp-unbounded-reads
branch
from
January 7, 2026 04:36
2d16727 to
39ad6d2
Compare
Contributor
|
💻 Deploy preview deleted (fix: enforce maxRecvMsgSize and maxCompressedMsgSize for OTLP). |
shantanualsi
marked this pull request as ready for review
January 15, 2026 12:56
paul1r
approved these changes
Jan 16, 2026
shantanualsi
added a commit
that referenced
this pull request
Jan 19, 2026
Co-authored-by: shantanualshi <shantanu.alshi@grafana.com>
6 tasks
shantanualsi
added a commit
that referenced
this pull request
Jan 19, 2026
#20487) Co-authored-by: John Newbigin <john.newbigin@grafana.com>
Closed
shantanualsi
added a commit
that referenced
this pull request
Jan 21, 2026
Co-authored-by: shantanualshi <shantanu.alshi@grafana.com>
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.
What this PR does / why we need it:
The compressed payloads were not validated against any maximum size limit
The reporting of the raw payload exceeding the maximum was also ineffective.
This patch ensures that:
maxRecvMsgSizeis tested regardless of read error status andEdit (shantanu):
Modified the hard-coded compression ratio of 10:1 to a configurable absolute "max decompressed size" as ratio can be hard to reason about.
Which issue(s) this PR fixes:
0
Special notes for your reviewer:
The expanded test coverage found that
maxRecvMsgSizewas not being reported as an error, though the data was being truncated at the limit. This probably caused other errors about invalid payloads.Checklist
CONTRIBUTING.mdguide (required)featPRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.mddeprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PR