[ISSUE #10901] Fix OTLP header parsing and avoid leaking header config - #10917
Open
123123213weqw wants to merge 4 commits into
Open
[ISSUE #10901] Fix OTLP header parsing and avoid leaking header config#10917123123213weqw wants to merge 4 commits into
123123213weqw wants to merge 4 commits into
Conversation
RockteMQ-AI
approved these changes
Aug 12, 2026
RockteMQ-AI
left a comment
Contributor
There was a problem hiding this comment.
Summary
This PR fixes OTLP header parsing in ProxyMetricsManager:
split(":", 2)— correctly handles label values that contain colons (e.g., URLs). The originalsplit(":")would break on such values.- Log message fix — logs the specific invalid
iteminstead of the entirelabelsstring, making debugging easier.
Both changes are correct. LGTM.
Note: This PR also includes changes from #10914-#10916. See the series overlap comment on those PRs.
Automated review by github-manager-bot
RockteMQ-AI
reviewed
Aug 12, 2026
RockteMQ-AI
left a comment
Contributor
There was a problem hiding this comment.
Review Summary
This PR fixes OTLP header parsing in ProxyMetricsManager to handle values containing colons and improves error logging.
Findings
- [Critical] ProxyMetricsManager.java — The original
split(":")would break on header values containing colons (e.g.,Authorization: Bearer token:with:colons). The fix usessplit(":", 2)to split only on the first colon. - [Info] The improved error log now shows the actual invalid item instead of the full header string, making debugging easier.
Overall
Good fix for OTLP header parsing. The original code would fail on valid header values containing colons.
Automated review by RockteMQ-AI
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 is the purpose of the change
Fix #10901.
ProxyMetricsManager parsed metricsGrpcExporterHeader entries with item.split(":"), which drops any valid value containing a colon (e.g. a URI or a structured authorization value). On a parse failure the warning logged the complete header configuration, which may contain authorization tokens or API keys. The same split behavior was also applied to metricsLabel.
Brief changelog
How was this patch verified
git diff --checkclean