#open-metrics #text #client #encode #prometheus #monitoring #instrumentation

macro open-metrics-client-derive-text-encode

Auxiliary crate to derive text Encode trait from open-metrics-client

2 releases

0.1.1 May 27, 2021
0.1.0 Feb 21, 2021

#10 in #open-metrics

Download history 549/week @ 2023-12-06 1197/week @ 2023-12-13 704/week @ 2023-12-20 303/week @ 2023-12-27 367/week @ 2024-01-03 496/week @ 2024-01-10 345/week @ 2024-01-17 392/week @ 2024-01-24 309/week @ 2024-01-31 642/week @ 2024-02-07 753/week @ 2024-02-14 605/week @ 2024-02-21 659/week @ 2024-02-28 551/week @ 2024-03-06 406/week @ 2024-03-13 685/week @ 2024-03-20

2,416 downloads per month
Used in 8 crates (via open-metrics-client)

Apache-2.0 OR MIT

6KB
117 lines

Prometheus Rust client library

Test Status Crate API

Rust client library implementation of the Open Metrics specification. Allows developers to instrument applications and thus enables operators to monitor said applications with monitoring systems like Prometheus.

Documentation: https://docs.rs/prometheus-client/

Goals

  • No unsafe. Don't use unsafe Rust within the library itself.

  • Type safe. Leverage Rust's type system to catch common instrumentation mistakes at compile time.

  • Fast. Don't force users to worry about the performance impact of instrumentation. Instead encourage users to instrument often and extensively.

Specification Compliance

Below is a list of properties where this client library implementation lags behind the Open Metrics specification. Not being compliant with all requirements (MUST and MUST NOT) of the specification is considered a bug and likely to be fixed in the future. Contributions in all forms are most welcome.

  • State set metric.

  • Enforce "A Histogram MetricPoint MUST contain at least one bucket".

  • Enforce "A MetricFamily MUST have a [...] UNIT metadata".

  • Enforce "MetricFamily names [...] MUST be unique within a MetricSet."

  • Enforce "Names SHOULD be in snake_case".

  • Enforce "MetricFamily names beginning with underscores are RESERVED and MUST NOT be used unless specified by this standard".

  • Enforce "Exposers SHOULD avoid names that could be confused with the suffixes that text format sample metric names use".

  • Gauge histogram metric.

  • Allow "A MetricPoint in a Metric with the type [Counter, Histogram] SHOULD have a Timestamp value called Created".

  • Summary metric.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1.5MB
~35K SLoC