[studio][ISSUE #10901] Harden Proxy metrics header parsing - #10903
Draft
messere1 wants to merge 1 commit into
Draft
[studio][ISSUE #10901] Harden Proxy metrics header parsing#10903messere1 wants to merge 1 commit into
messere1 wants to merge 1 commit into
Conversation
RockteMQ-AI
approved these changes
Aug 11, 2026
RockteMQ-AI
left a comment
Contributor
There was a problem hiding this comment.
Summary
This PR extracts the duplicated header/label parsing logic in ProxyMetricsManager into a reusable parseKeyValuePairs() method that correctly handles values containing colons (e.g., URLs, Bearer tokens) by splitting on the first colon only. The previous String.split(":") approach would silently drop or misparse such values.
The refactoring is clean, well-tested with focused edge-case tests (colon-containing values, whitespace handling, empty values, malformed entries), and improves information security by not echoing raw header strings in warnings.
LGTM.
Automated review by RockteMQ-AI · Community Assistant
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 changed
Why
Proxy metrics initialization previously used String.split(:). Valid header values containing colons were discarded, and malformed OTLP header warnings logged the complete configuration, which can include authorization tokens or API keys.
Impact
The change is local to Proxy metrics key/value parsing. It does not alter exporter defaults, protocols, or public APIs.
Fixes #10901
Validation
JaCoCo is skipped locally because the repository's JaCoCo 0.8.5 agent does not support Java 17 class files.