prometheus / client_rust

Prometheus / OpenMetrics client library in Rust
Apache License 2.0
484 stars 80 forks source link

feat(encoding): add functions for individually encoding registry & EOF #205

Closed tyrone-wu closed 4 months ago

tyrone-wu commented 4 months ago

Note: All credits for the PR, from the initial idea, implementation, and testing, belong to @amunra who is the original author of this PR and #154.

From the original PR description:

Adds new encode_registry and encode_eof functions to allow encoding of parts of the response.

This is useful when there are multiple registries at play, or when composing metrics for a process that embeds Rust as part of its logic whilst serving metrics to Prometheus outside of Rust.

Fixes: #153 Refs: #154, #204

Thank you @amunra! 😸

tyrone-wu commented 4 months ago

Cargo.toml and CHANGELOG.md are updated now. 😃