Crate goodmetrics
source ·Expand description
A Rust implementation of goodmetrics; a low-overhead, expressive metrics infrastructure built for web services.
[goodmetrics
] is a metrics recording toolbox built on tonic and [gRPC].
It focuses on your service first - metrics are never more important than your
users. After that, high performance, low predictable overhead, and
ease of maintenance are prioritized.
§Examples
Some basic examples can be found under src/benches
.
§Getting Started
Check out goodmetrics documentation for database setup and general ecosystem information.
§Feature Flags
Modules§
- Types for working with in-memory local aggregations
- How Metrics objects are created and possibly cached.
- Types related to emitting metrics to collectors
- The
introspect
feature. This records and reports metrics about your metrics pipeline. - Types for wiring to downstream collectors
- Internal generated types - ideally you shouldn’t need to do much with them. Nevertheless, they are exported in case you need them.
Structs§
- A drop guard for a dimension, so you can know what happened, e.g., in an async workflow that timed out & dropped.
- A GaugeDimensions is a group of dimensions to be used with a gauge. It is consumed when the gauge is created.
- Gauges grouped by a shared dimension position
- A Metrics encapsulates a unit of work.
- Example complete preaggregated metrics pipeline setup, with gauge support:
- A gauge is a compromise for high throughput metrics. Sometimes you can’t afford to allocate a Metrics object to record something, and you can let go of some detail to still be able to record some information. This is the compromise a Gauge allows.
- Scope guard for recording nanoseconds into a Metrics. Starts recording when you create it. Stops recording and puts its measurement into the Metrics as a distribution when you drop it.
Enums§
- The value part of a dimension’s key/value pair.
- Values able to be collected into a distribution
- A gauge is a compromise for high throughput metrics. Sometimes you can’t afford to allocate a Metrics object to record something, and you can let go of some detail to still be able to record some information. This is the compromise a Gauge allows.
- Abstraction of measurement kinds - the more unary observation-oriented kind and the distribution kind.
- Behavior customization for advanced use of metrics
- An identifier for various things.
- Individual values