#open-metrics #text #encode #monitoring #instrumentation #traits #auxiliary

macro prometheus-client-derive-text-encode

Auxiliary crate to derive text Encode trait from prometheus-client

2 unstable releases

0.3.0 Jul 18, 2022
0.2.0 Jan 16, 2022

#1579 in Procedural macros

Download history 7280/week @ 2024-05-11 8939/week @ 2024-05-18 7260/week @ 2024-05-25 7908/week @ 2024-06-01 9939/week @ 2024-06-08 8098/week @ 2024-06-15 8524/week @ 2024-06-22 7026/week @ 2024-06-29 6853/week @ 2024-07-06 9853/week @ 2024-07-13 8840/week @ 2024-07-20 10774/week @ 2024-07-27 7187/week @ 2024-08-03 11590/week @ 2024-08-10 8140/week @ 2024-08-17 7858/week @ 2024-08-24

36,416 downloads per month

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