#metrics #performance #service

goodmetrics

Unlimited cardinality, fast metrics recording - for services

29 stable releases (3 major)

4.0.1 Apr 9, 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

#59 in Profiling

Download history 69/week @ 2023-12-30 41/week @ 2024-01-06 45/week @ 2024-01-13 57/week @ 2024-01-20 78/week @ 2024-01-27 91/week @ 2024-02-03 18/week @ 2024-02-10 134/week @ 2024-02-17 126/week @ 2024-02-24 384/week @ 2024-03-02 287/week @ 2024-03-09 102/week @ 2024-03-16 8/week @ 2024-03-23 162/week @ 2024-03-30 176/week @ 2024-04-06

469 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–27MB
~458K SLoC