#metrics #performance #service

goodmetrics

Unlimited cardinality, fast metrics recording - for services

31 stable releases (3 major)

new 4.0.3 Apr 26, 2024
3.4.2 Apr 2, 2024
3.4.1 Mar 11, 2024
3.1.0 Dec 8, 2023
1.0.3 Nov 30, 2022

#68 in Profiling

Download history 42/week @ 2024-01-09 53/week @ 2024-01-16 58/week @ 2024-01-23 77/week @ 2024-01-30 83/week @ 2024-02-06 23/week @ 2024-02-13 161/week @ 2024-02-20 98/week @ 2024-02-27 471/week @ 2024-03-05 225/week @ 2024-03-12 76/week @ 2024-03-19 5/week @ 2024-03-26 185/week @ 2024-04-02 198/week @ 2024-04-09 106/week @ 2024-04-16 235/week @ 2024-04-23

729 downloads per month

Apache-2.0

250KB
5K SLoC

Goodmetrics: Rust

About

This is the Rust goodmetrics client. It bundles an opentelemetry protocol downstream and some performance tools like the PooledMetricsAllocator. To use any grpc downstream (goodmetrics or opentelemetry) you will need a tokio runtime.

How to use

See the lightstep demo for a complete setup and usage example with opentelemetry.

Once you have a configured MetricsFactory, the way you use Metrics does not change with subsequent updates to the configured downstream(s):

let metrics = metrics_factory.record_scope("demo"); // By default, includes a "demo_totaltime" histogram measurement
let _scope = metrics.time("timed_delay"); // you can time additional scopes
metrics.measurement("ran", 1); // measurements can be plain numbers; when preaggregated they are StatisticSets (min/max/sum/count)
metrics.dimension("mod", i % 8); // you can add dimensions to a Metrics whenever you want. All measurements in this Metrics record are dimensioned by this value.
metrics.distribution("some_continuous_value", instantaneous_network_bandwidth); // histograms are aggregated sparsely, and truncated to 2 significant figures (base 10).

Development

Use cargo ws version minor to update version.

Dependencies

~15–25MB
~453K SLoC