#openmetrics #metrics #instrumentation #prometheus #monitoring #derive #client #encode #text #open

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

#13 in #instrumentation

Download history 319/week @ 2021-08-17 486/week @ 2021-08-24 428/week @ 2021-08-31 384/week @ 2021-09-07 669/week @ 2021-09-14 357/week @ 2021-09-21 336/week @ 2021-09-28 252/week @ 2021-10-05 846/week @ 2021-10-12 596/week @ 2021-10-19 774/week @ 2021-10-26 1605/week @ 2021-11-02 1647/week @ 2021-11-09 2402/week @ 2021-11-16 5628/week @ 2021-11-23 10493/week @ 2021-11-30

20,515 downloads per month
Used in 5 crates (via open-metrics-client)

Apache-2.0 OR MIT

6KB
117 lines

Open Metrics 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/open-metrics-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".

  • Protobuf wire format. (Follow spec issue.)

  • Gauge histogram metric.

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

  • Summary metric.

Related Libraries

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

~290–710KB
~18K SLoC

g`