crates.io docs.rs Build Status

dipstick a dipstick picture

A one-stop shop metrics library for Rust applications with lots of features,
minimal impact on applications and a choice of output to downstream systems.


Dipstick is a toolkit to help all sorts of application collect and send out metrics. As such, it needs a bit of set up to suit one’s needs. Skimming through the handbook and many examples should help you get an idea of the possible configurations.

In short, dipstick-enabled apps can:

For convenience, dipstick builds on stable Rust with minimal, feature-gated dependencies. Performance, safety and ergonomy are also prime concerns.


Dipstick’s focus is on metrics collection (input) and forwarding (output). Although it will happily aggregate base statistics, for the sake of simplicity and performance Dipstick will not

These are all best done by downstream timeseries visualization and monitoring tools.

Show me the code!

Here’s a basic aggregating & auto-publish counter metric:

use dipstick::*;

fn main() {
    let bucket = AtomicBucket::new();
    let counter = bucket.counter("counter_a");

Persistent apps wanting to declare static metrics will prefer using the metrics! macro:

use dipstick::*;

metrics! { METRICS = "my_app" => {
        pub COUNTER: Counter = "my_counter";

fn main() {

For sample applications see the examples. For documentation see the handbook.

To use Dipstick in your project, add the following line to your Cargo.toml in the [dependencies] section:

dipstick = "0.8.0"

External features

Configuring dipstick from a text file is possible using the spirit-dipstick crate.


When building the crate prior to PR or release, just run plain old make. This will in turn run cargo a few times to run tests, benchmarks, lints, etc. Unfortunately, nightly Rust is still required to run bench and clippy.

TODO / Missing / Weak points


Dipstick is licensed under the terms of the Apache 2.0 and MIT license.