#async #metrics

app capella

An asynchronous StatsD clone

4 releases

Uses old Rust 2015

0.1.3 May 4, 2017
0.1.2 Mar 21, 2017
0.1.1 Feb 20, 2017
0.1.0 Feb 19, 2017

#61 in #metrics

MIT license

602 lines


capella is an aysnchronous StatsD server written in Rust.


Build Status


Building and Testing

capella uses Cargo to build and test. You can also install it directly from the Crates website.

# Install from crates.io.
cargo install capella

# Building capella with optimizations.
cargo build --release

# Running the unit tests.
cargo test


capella uses an environment variable based configuration file named capella.env. capella expects this file to be in the same directory as the binary. Currently the necessary configuration values needed are as follows:

# The connection string for the graphite host. It includes an IP address as well as a port.

# The address and port on which capella should listen.

# The flushing duration defines how long capella buffers metrics before sending to graphite.
# It is defined in seconds.

# Set the log level for the `env_logger` module.

Supported Metrics

capella supports the four metrics that StatsD implements. They are counter, gauges, timers, and sets.


Counters represent metrics that can only increase. Counters can also have an associated sampling rate that tells capella that a metric is only being sent for a fraction of the time.

# This tells capella that the rate is only being sent once every half of the flush duration.


Gauges are metrics that can fluctuate both negatively and postively. They are similar to a gauge in a car.

# This subtracts one from the current value for the "gauge" key.


Sets are metrics that hold a unique collection of values. The metric derived by capella for this type is the cardinality of the set.

# Add a new value to the set which is only added if it doesn't exist.


Timers are unique in that many statistics are derived from them. Per flush duration, timers generate the following:

  • Minimum value
  • Maximum value
  • Count
  • Average
  • Standard Deviation
  • Median
  • 95th Percentile

Timers also support sampling.


Future Plans

Currently capella is not nearly as configurable as the original StatsD. It may never be but support for the most used options will be added on an as-needed basis. capella will continue to add unit tests to increase code coverage and ensure that metrics handling is identical to StatsD. Please open issues to ask questions about adding features or to point out bugs.


capella was started by Garrett and Ralph. The name is inspired from one of Garrett's favorite bands, Rosetta.


capella is released under the MIT license.


~197K SLoC