Skip to content

fix(observability): decode metrics with expfmt.NewDecoder - #1169

Merged
Alanxtl merged 1 commit into
apache:mainfrom
AsperforMias:fix/observability-text-decoder
Nov 24, 2026
Merged

Alanxtl merged 1 commit into
apache:mainfrom
AsperforMias:fix/observability-text-decoder

Conversation

@AsperforMias

@AsperforMias AsperforMias commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

apache/dubbo-go develop now depends on github.com/prometheus/common v0.70.1. In that version a zero-value expfmt.TextParser has no name validation scheme, so TextToMetricFamilies panics with Invalid name validation scheme requested: unset. The histogram verifier in observability/integration uses one. dubbo-go's integration job runs this repository's main against 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's go.mod, and v0.70.1. The checker test uses the same helper.

Validation

  • With prometheus/common bumped to v0.70.1, go test ./observability/integration/internal/verify/ panicked in TestHistogramContract before this change and passes after it.
  • The same tests pass with the current v0.48.0 pin.
  • With dubbo.apache.org/dubbo-go/v3 replaced by develop, go build ./... passes for the whole module, and verify is its only package that imports prometheus/common directly.
  • Ran ./integrate_test.sh observability/integration locally against develop. Before this change it panics with the error above; after it the run passes, including the histogram and telemetry semantics checks.

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
Alanxtl merged commit f94e7be into apache:main Nov 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Go client times out against the Java server in the Triple HTTP/3 integration test

2 participants