|2.1.0||Oct 31, 2023|
|1.9.3||Sep 8, 2023|
|1.9.1||Jun 8, 2023|
|1.6.0||Mar 29, 2023|
|1.0.3||Nov 30, 2022|
#40 in Profiling
692 downloads per month
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).
cargo ws version minor to update version.