• Stars
    star
    140
  • Rank 261,473 (Top 6 %)
  • Language
  • Created over 12 years ago
  • Updated over 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A quixotic quest to coordinate StatsD implementations

StatsD Metrics Export Specification v0.1

Edited by Benjamin Black, [email protected]

This document describes current practice for the implementation of the various incarnations of the StatsD metric collection protocol. The protocol originated at Flickr, was further developed at Etsy, and has been subsequently influenced by Coda Hale's Metrics. The intent of this document is not to specify or enforce a standard, but only to act as a snapshot of current practice and a guide to ease implementation.

Terminology

StatsD is used to collect metrics from infrastructure. It is push-based: clients export metrics to a collection server, which in turn derives aggregate metrics and often drives graphing systems such as Graphite. Few assumptions are made about how the data is processed or exposed.

The terms metrics and infrastructure are both defined broadly. A metric is a measurement composed of a name, a value, a type, and sometimes additional information describing how a metric should be interpreted. Infrastructure is any part of a technology stack, from datacenter UPS controllers and temperature sensors in servers all the way up to function calls in applications and user interactions in a browser.

If it can be structured as one of the metric types below, it can consumed by StatsD.

Metric Types & Formats

The format of exported metrics is UTF-8 text, with metrics separated by newlines. Metrics are generally of the form <metric name>:<value>|<type>, with exceptions noted in the metric type definitions below.

The protocol allows for both integer and floating point values. Most implementations store values internally as a IEEE 754 double precision float, but many implementations and graphing systems only support integer values. For compatibility all values should be integers in the range (-2^53^, 2^53^).

Gauges

A gauge is an instantaneous measurement of a value, like the gas gauge in a car. It differs from a counter by being calculated at the client rather than the server. Valid gauge values are in the range [0, 2^64^)

<metric name>:<value>|g

Counters

A counter is a gauge calculated at the server. Metrics sent by the client increment or decrement the value of the gauge rather than giving its current value. Counters may also have an associated sample rate, given as a decimal of the number of samples per event count. For example, a sample rate of 1/10 would be exported as 0.1. Valid counter values are in the range (-2^63^, 2^63^).

<metric name>:<value>|c[|@<sample rate>]

Timers

A timer is a measure of the number of milliseconds elapsed between a start and end time, for example the time to complete rendering of a web page for a user. Valid timer values are in the range [0, 2^64^).

<metric name>:<value>|ms

Histograms

A histogram is a measure of the distribution of timer values over time, calculated at the server. As the data exported for timers and histograms is the same, this is currently an alias for a timer. Valid histogram values are in the range [0, 2^64^).

<metric name>:<value>|h

Meters

A meter measures the rate of events over time, calculated at the server. They may also be thought of as increment-only counters. Valid meter values are in the range [0, 2^64^).

<metric name>:<value>|m

In at least one implementation, this is abbreviated for the common case of incrementing the meter by 1.

<metric name>

While this is convenient, the full, explicit metric form should be used. The shortened form is documented here for completeness.

References

More Repositories

1

kafka-websocket

Websocket server interface for Kafka distributed message broker
Java
343
star
2

libdtw

Fast dynamic time warping library based on the UCR Suite http://www.cs.ucr.edu/~eamonn/UCRsuite.html
C
36
star
3

sha3

SHA-3 (KECCAK) Erlang NIFs (based on NIST reference C implementation)
C
22
star
4

bertrem

BERTREM is a Ruby EventMachine BERT-RPC client and server library.
Ruby
19
star
5

rack-geoip

Rack middleware to perform IP to geo lookups on HTTP client IP addresses.
Ruby
18
star
6

libusbcan

Pure C API for ViewTool Ginkgo USB-CAN interfaces
C
16
star
7

tlscollect

TLS server configuration collection and reporting. Derived from the TLS Report.
Ruby
12
star
8

hex

Hex string/binary conversion utilities for Erlang
Erlang
11
star
9

LatticeCrypto

MSR LatticeCrypto library http://research.microsoft.com/en-us/projects/latticecrypto/
C
10
star
10

wm_basic_auth

Webmachine HTTP Basic auth
Erlang
7
star
11

opscode-agent

Agent for Opscode clients
Ruby
6
star
12

ION

Interplanetary Overlay Network (ION) implementation of Delay-Tolerant Networking protocols.
C
6
star
13

poly1305aes

Poly1305-AES Erlang NIFs
Assembly
5
star
14

chevre

Chevre is virtualization/hypervisor support for Chef. Chef + Virtualization -> Chevre. I slay me.
Ruby
5
star
15

retards

Erlang
5
star
16

hancock

hancock is an OpenID based Single Sign On provider written in Sinatra.
Ruby
3
star
17

openid-store-couchdb

A CouchDB association/nonce store for OpenID
Ruby
3
star
18

digest_auth

Erlang
3
star
19

openssl-darwin-universal

A shell script to build a quad-fat openssl package (sans MacPorts)
3
star
20

ruby-jsonrpc

Simple JSON-RPC client for Ruby
2
star
21

skerl

Erlang NIF for the Skein hash function
C
2
star
22

jpast

PAST, but Java
1
star
23

amqp_client

RabbitMQ Erlang Client (rabbit-erlang-client)
Erlang
1
star
24

project-cassandra

Cassandra distributed key/value store (my branches)
Java
1
star
25

3dmodels

OpenSCAD
1
star
26

www.tlsinsight.com

1
star
27

b.github.com

HTML
1
star
28

bertem

BERTEM has been renamed to BERTREM for the lulz
1
star