#metrics #telemetry #yaml

metrics-observer-yaml

A metrics-core compatible observer that outputs YAML

2 releases

0.1.1 Jul 30, 2019
0.1.0 Jul 30, 2019

#28 in #telemetry

Download history 909/week @ 2022-10-07 354/week @ 2022-10-14 755/week @ 2022-10-21 792/week @ 2022-10-28 1803/week @ 2022-11-04 1036/week @ 2022-11-11 1198/week @ 2022-11-18 2436/week @ 2022-11-25 1305/week @ 2022-12-02 857/week @ 2022-12-09 1170/week @ 2022-12-16 691/week @ 2022-12-23 1174/week @ 2022-12-30 1236/week @ 2023-01-06 1222/week @ 2023-01-13 1288/week @ 2023-01-20

5,015 downloads per month
Used in 2 crates

MIT license

170KB
3K SLoC

metrics-observer-yaml

conduct-badge downloads-badge release-badge docs-badge license-badge

metrics-observer-yaml is a metrics-core compatible observer that outputs YAML.

code of conduct

NOTE: All conversations and contributions to this project shall adhere to the Code of Conduct.


lib.rs:

Observes metrics in YAML format.

Metric scopes are used to provide the hierarchy and indentation of metrics. As an example, for a snapshot with two metrics — server.msgs_received and server.msgs_sent — we would expect to see this output:

server:
  msgs_received: 42
  msgs_sent: 13

If we added another metric — configuration_reloads — we would expect to see:

configuration_reloads: 2
server:
  msgs_received: 42
  msgs_sent: 13

Metrics are sorted alphabetically.

Histograms

Histograms are rendered with a configurable set of quantiles that are provided when creating an instance of YamlBuilder. They are formatted using human-readable labels when displayed to the user. For example, 0.0 is rendered as "min", 1.0 as "max", and anything in between using the common "pXXX" format i.e. a quantile of 0.5 or percentile of 50 would be p50, a quantile of 0.999 or percentile of 99.9 would be p999, and so on.

All histograms have the sample count of the histogram provided in the output.

connect_time count: 15
connect_time min: 1334
connect_time p50: 1934
connect_time p99: 5330
connect_time max: 139389

Dependencies

~2.5MB
~44K SLoC