All Projects → fralalonde → Dipstick

fralalonde / Dipstick

Licence: other
Configurable metrics toolkit for Rust applications

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Dipstick

Node Measured
A Node metrics library for measuring and reporting application-level metrics, inspired by Coda Hale, Yammer Inc's Dropwizard Metrics Libraries
Stars: ✭ 500 (+443.48%)
Mutual labels:  timer, metrics, counter
Atom Wakatime
Atom plugin for automatic time tracking and metrics generated from your programming activity.
Stars: ✭ 303 (+229.35%)
Mutual labels:  timer, metrics
Python Prometheus Demo
Demo of using Prometheus for monitoring Python web applications
Stars: ✭ 83 (-9.78%)
Mutual labels:  metrics, statsd
Statsd Php
a PHP client for statsd
Stars: ✭ 327 (+255.43%)
Mutual labels:  metrics, statsd
libmcu
A toolkit for firmware development
Stars: ✭ 33 (-64.13%)
Mutual labels:  metrics, timer
Netserver
A C++ High Performance Net Library
Stars: ✭ 271 (+194.57%)
Mutual labels:  timer, log
Metric
Minimal metrics for Go (counter/gauge/histogram). No dependencies. Compatible with expvar. Web UI included.
Stars: ✭ 319 (+246.74%)
Mutual labels:  metrics, counter
hass-variables
Home Assistant variables component
Stars: ✭ 35 (-61.96%)
Mutual labels:  counter, timer
Statsd exporter
StatsD to Prometheus metrics exporter
Stars: ✭ 608 (+560.87%)
Mutual labels:  metrics, statsd
Logmonitor
Monitoring log files on windows systems.
Stars: ✭ 23 (-75%)
Mutual labels:  metrics, statsd
App
Just a little analytics insight for your personal or indie project
Stars: ✭ 40 (-56.52%)
Mutual labels:  metrics, counter
tm
timers and timeline
Stars: ✭ 31 (-66.3%)
Mutual labels:  counter, timer
inspector-metrics
Typescript metrics / monitoring library
Stars: ✭ 19 (-79.35%)
Mutual labels:  counter, timer
Statsd
Daemon for easy but powerful stats aggregation
Stars: ✭ 16,179 (+17485.87%)
Mutual labels:  metrics, statsd
paStash
pastaʃ'ʃ = Spaghetti I/O Event Data Processing, Interpolation, Correlation and beyond 🍝
Stars: ✭ 89 (-3.26%)
Mutual labels:  log, statsd
Cernan
telemetry aggregation and shipping, last up the ladder
Stars: ✭ 306 (+232.61%)
Mutual labels:  metrics, statsd
Gloc
📆 Browser extension: counts lines of code on GitHub
Stars: ✭ 246 (+167.39%)
Mutual labels:  metrics, counter
React Native Countdown Component
React Native CountDown
Stars: ✭ 193 (+109.78%)
Mutual labels:  timer, counter
Dcos Metrics
The metrics pipeline for DC/OS 1.9-1.11
Stars: ✭ 57 (-38.04%)
Mutual labels:  metrics, statsd
Banshee
Anomalies detection system for periodic metrics.
Stars: ✭ 1,045 (+1035.87%)
Mutual labels:  metrics, statsd

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.

Features

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:

  • Send metrics to console, log, statsd, graphite or prometheus (one or many)
  • 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
  • Define global or scoped (e.g. per request) metrics
  • Statistically sample metrics (statsd)
  • Choose between sync or async operation
  • Choose between buffered or immediate output
  • 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

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

  • plot graphs
  • send alerts
  • track histograms

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();
    bucket.drain(Stream::write_to_stdout());
    bucket.flush_every(std::time::Duration::from_secs(3));
    let counter = bucket.counter("counter_a");
    counter.count(8);
}

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() {
    METRICS.target(Graphite::send_to("localhost:2003").expect("connected").metrics());
    COUNTER.count(32);
}

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.

Building

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

  • 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.
  • "Rolling" aggregators would be nice for pull metrics. Current bucket impl resets after flush.

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].