Repository navigation
fix(observability): decode metrics with expfmt.NewDecoder - #1169
Merged
Merged
Conversation
prometheus/common v0.70 requires TextParser to carry a name validation scheme, so the zero value used by the histogram verifier panics once dubbo-go develop pulls that version in. NewDecoder picks the scheme from the format and exists in both v0.48 and v0.70.
Alanxtl
approved these changes
Nov 24, 2026
1 task done
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.
Summary
apache/dubbo-go develop now depends on
github.com/prometheus/commonv0.70.1. In that version a zero-valueexpfmt.TextParserhas no name validation scheme, soTextToMetricFamiliespanics withInvalid name validation scheme requested: unset. The histogram verifier inobservability/integrationuses one. dubbo-go's integration job runs this repository'smainagainst the PR's source, so every dubbo-go PR targeting develop currently fails there.The verifier now parses through
expfmt.NewDecoder(r, expfmt.NewFormat(expfmt.TypeTextPlain)), which picks the scheme from the format. That API exists in both v0.48.0, used by this repository'sgo.mod, and v0.70.1. The checker test uses the same helper.Validation
prometheus/commonbumped to v0.70.1,go test ./observability/integration/internal/verify/panicked inTestHistogramContractbefore this change and passes after it.dubbo.apache.org/dubbo-go/v3replaced by develop,go build ./...passes for the whole module, andverifyis its only package that importsprometheus/commondirectly../integrate_test.sh observability/integrationlocally against develop. Before this change it panics with the error above; after it the run passes, including the histogram and telemetry semantics checks.