mirror of https://github.com/fralalonde/dipstick
Bit of doc
This commit is contained in:
parent
75d5487d78
commit
5a4353e9db
17
HANDBOOK.md
17
HANDBOOK.md
|
@ -4,18 +4,21 @@ It is not a full-on cookbook (yet) - some reader experimentation may be required
|
|||
|
||||
# Background
|
||||
Dipstick is a structured metrics library that allows to combine, select from, and switch between multiple metrics backends.
|
||||
Because counters, timers and gauges declared in the code are not tied to a specific implementation.
|
||||
Counters, timers and gauges declared in the code are not tied to a specific implementation. This has multiple benefits.
|
||||
|
||||
This has multiple benefits:
|
||||
- simplified instrumentation
|
||||
- flexible compile-time or runtime configuration
|
||||
- easier metrics testing
|
||||
## Simplified instrumentation
|
||||
For example, a single Counter instrument can be used to send metrics to the log and to a network aggregator.
|
||||
This prevents duplication of instrumentation which in turn prevents errors.
|
||||
|
||||
## Flexible configuration
|
||||
Let's say we had an application defining a "fixed" metrics stack on initialization.
|
||||
We could upgrade to a configuration file defined metrics stack without altering the instruments in every module.
|
||||
Or we could make the configuration hot-reloadable, suddenly using different output formats.
|
||||
|
||||
## Easier metrics testing
|
||||
For example, using a compile-time feature switch, metrics could be collected directly to hash map at test time
|
||||
but be sent over the network and written to a file at runtime, as described by external configuration.
|
||||
|
||||
Because of its Rust nature, performance, safety and ergonomy are also prime concerns.
|
||||
|
||||
|
||||
# API Overview
|
||||
Dipstick's API is split between _input_ and _output_ layers.
|
||||
|
|
|
@ -18,7 +18,6 @@ should help you get an idea of the possible configurations.
|
|||
In short, dipstick-enabled apps _can_:
|
||||
|
||||
- Send metrics to console, log, statsd, graphite or prometheus (one or many)
|
||||
- Serve metrics over HTTP
|
||||
- Locally aggregate the count, sum, mean, min, max and rate of metric values
|
||||
- Publish aggregated metrics, on schedule or programmatically
|
||||
- Customize output statistics and formatting
|
||||
|
@ -29,6 +28,7 @@ In short, dipstick-enabled apps _can_:
|
|||
- Switch between metric backends at runtime
|
||||
|
||||
For convenience, dipstick builds on stable Rust with minimal, feature-gated dependencies.
|
||||
Performance, safety and ergonomy are also prime concerns.
|
||||
|
||||
### Non-goals
|
||||
|
||||
|
@ -78,7 +78,7 @@ dipstick = "0.7.0"
|
|||
|
||||
## TODO / Missing / Weak points
|
||||
|
||||
- Prometheus support is still primitive. Official prometheus-rust crate is used but Labels/Tags are not passed to it.
|
||||
- Prometheus support is still primitive (read untested). Only the push gateway approach is supported for now.
|
||||
- No backend for "pull" metrics yet. Should at least provide tiny-http listener capability.
|
||||
- No quick integration feature with common frameworks (Actix, etc.) is provided yet.
|
||||
- Thread Local buckets could be nice.
|
||||
|
|
Loading…
Reference in New Issue