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(metrics): add Summary implementation #249

Closed
wants to merge 3 commits into from

Conversation

zhangtianhao
Copy link

@zhangtianhao zhangtianhao commented Nov 28, 2024

This commit introduces the Summary metric type for the Rust Prometheus client, addressing the requirements outlined in #40.

Key Highlights:

  • Implements the Summary type to represent summary statistics such as sum, count, and quantiles.
  • The implementation does not include a specific quantile calculation algorithm. Users are expected to provide precomputed quantiles based on their chosen algorithm.
  • Supports encoding summary metrics following the OpenMetrics standard.

Details:

  • Summary provides:

    • reset method to update its internal state with sum, count, and quantiles.
    • Integration with the TypedMetric and EncodeMetric traits to support encoding and registration with the Prometheus client.
  • Documentation and tests have been added to ensure correct usage and behavior.

  • This implementation is designed to give users flexibility in handling quantile computation.

Notes:

  • Future work could explore integrating popular quantile calculation algorithms to offer built-in support while retaining the option for custom implementations.

Signed-off-by: zth [email protected]

zhangtianhao and others added 2 commits November 29, 2024 10:18
This commit introduces the `Summary` metric type for the Rust Prometheus client, addressing the requirements outlined in prometheus#40.

- Implements the `Summary` type to represent summary statistics such as sum, count, and quantiles.
- The implementation does not include a specific quantile calculation algorithm. Users are expected to provide precomputed quantiles based on their chosen algorithm.
- Supports encoding summary metrics following the OpenMetrics standard.

- `Summary` provides:
  - `reset` method to update its internal state with sum, count, and quantiles.
  - Integration with the `TypedMetric` and `EncodeMetric` traits to support encoding and registration with the Prometheus client.

- Documentation and tests have been added to ensure correct usage and behavior.
- This implementation is designed to give users flexibility in handling quantile computation.

- Future work could explore integrating popular quantile calculation algorithms to offer built-in support while retaining the option for custom implementations.

Signed-off-by: zth <[email protected]>
the test suite in this repository has some implicit dependencies upon
`protoc` and the Python client library.

in order to help newcomers get situated and effectively contributing to
this project, a `CONTRIBUTING.md` file is added to help provide some
guidance on how to install the protocol buffer compiler, and how to
create and activate a virtual environment with the Python library
installed.

Signed-off-by: katelyn martin <[email protected]>
@mxinden
Copy link
Member

mxinden commented Dec 2, 2024

@zhangtianhao why close here? Are you no longer interested in contributing this feature?

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.

3 participants