Skip to content

fix(metrics): pin prometheus's protobuf feature for process metrics - #258

Merged
TheJokr merged 1 commit into
cloudflare:mainfrom
ethanolchik:fix/process-metrics-prometheus-protobuf
Aug 25, 2026
Merged

fix(metrics): pin prometheus's protobuf feature for process metrics#258
TheJokr merged 1 commit into
cloudflare:mainfrom
ethanolchik:fix/process-metrics-prometheus-protobuf

Conversation

@ethanolchik

Copy link
Copy Markdown
Contributor

process.rs calls prometheus's get_value(), which only exists when prometheus's protobuf feature is off — but the feature was never pinned, so any other crate in the graph enabling it (it is a prometheus default) swaps in the protobuf model and breaks the build.

Pin protobuf on and use the value() accessor, which is public in that model (get_value() lives on the private proto_ext::MessageFieldExt trait).

`process.rs` calls prometheus's `get_value()`, which only exists when
prometheus's `protobuf` feature is off, but the feature was never pinned, so
any other crate in the graph enabling it (it is a prometheus default) swapped in
the protobuf model and broke the build.

Pin `protobuf` on and use the `value()` accessor, which is public in that model
(`get_value()` lives on the private `proto_ext::MessageFieldExt` trait).
@TheJokr
TheJokr merged commit 34cc150 into cloudflare:main Aug 25, 2026
18 checks passed
@TheJokr TheJokr mentioned this pull request Aug 26, 2026
dotjs pushed a commit that referenced this pull request Aug 26, 2026
### Fixed
- #258: With `foundations-metrics-backend` enabled, the `process`
metrics implementation relied on an accessor in the `prometheus` crate
that is not present when the `protobuf` feature is enabled. This change
enables the `protobuf` feature in `prometheus` instead and uses a
different accessor.
- #260: `NativeHistogram`, when scraped in protobuf format, now
correctly exposes an upper bound of `f64::INFINITY` rather than
`f64::MAX`.
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.

2 participants