dogstatsd
The dogstatsd
codec supports the Datadog DogStatsD
v1.2 protocol.
The format is similar to the statsd
format, but also includes events and service checks.
The codec translates a single dogstatsd
measurement line into a structured event and vice versa.
Examples
The native format of a single dogstatsd event line is as follows:
Metric
datadog.metric:7|c|@0.1|#example_tag:example_value
The equivalent representation as a tremor value:
{
"metric": {
"type": "c",
"metric": "datadog.metric",
"values": [7],
"sample_rate": 0.1,
"tags": ["example_tag:example_value"]
}
}
Supported types
c
forcounter
ms
fortiming
g
forgauge
h
forhistogram
s
forsets
d
fordistribution
Event
_e{21,36}:An exception occurred|Cannot parse CSV file from 10.0.0.17
The equivalent representation as a tremor value:
{
"event": {
"title": "An exception occurred",
"text": "Cannot parse CSV file from 10.0.0.17",
}
}
Service Check
_sc|Redis connection|2|#env:dev|m:Redis connection timed out after 10s
The equivalent representation as a tremor value:
{
"service_check": {
"name": "Redis connection",
"status": 2,
"tags": ["env:dev"],
"message": "Redis connection timed out after 10s",
}
}