Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Jul 7, 2024

Conversation

tyrone-wu
Copy link
Contributor

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 tyrone-wu force-pushed the feat/encode-registry-and-eof branch 2 times, most recently from 86d81e1 to b643b2e Compare June 27, 2024 04:18
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking this over the finish line!

Can you bump the patch version in the root Cargo.toml and add a CHANGELOG.md entry? I can then cut a new release right after merge.

All credits on the initial idea, implementation, and testing belong to
@amunra, who is the original author of this PR prometheus#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: prometheus#153
Refs: prometheus#154, prometheus#204

Co-authored-by: amunra <cimarosti@gmail.com>
Signed-off-by: tyrone-wu <wudevelops@gmail.com>
@tyrone-wu tyrone-wu force-pushed the feat/encode-registry-and-eof branch from b643b2e to 7b7f1fb Compare July 3, 2024 15:48
@tyrone-wu
Copy link
Contributor Author

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

CHANGELOG.md Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
Signed-off-by: Max Inden <mail@max-inden.de>
Signed-off-by: Max Inden <mail@max-inden.de>
@mxinden mxinden merged commit a914fc9 into prometheus:master Jul 7, 2024
10 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.

Encoder without EOF
2 participants