StatsD receiver for ingesting StatsD messages into the OpenTelemetry Collector.
Supported pipeline types: metrics
🚧 This receiver is currently in BETA.
The following settings are required:
endpoint
(default =localhost:8125
): Address and port to listen on.
Example:
receivers:
statsd:
statsd/2:
endpoint: "localhost:8127"
The full list of settings exposed for this receiver are documented here with detailed sample configurations here.
Currently the statsdreceiver
is not providing any aggregation. There are
ideas such as the Metrics Transform Processor
Proposal
that intend to enable control over Metric aggregation in a processor.
An alternative will be to implement some simple aggregation in this receiver.
General format is:
<name>:<value>|<type>|@<sample-rate>|#<tag1-key>:<tag1-value>,<tag2-k/v>
<name>:<value>|c|@<sample-rate>|#<tag1-key>:<tag1-value>
<name>:<value>|g|@<sample-rate>|#<tag1-key>:<tag1-value>
<name>:<value>|ms|@<sample-rate>|#<tag1-key>:<tag1-value>
receivers:
statsd:
endpoint: "localhost:8125" # default
exporters:
file:
path: ./test.json
service:
pipelines:
metrics:
receivers: [statsd]
exporters: [file]
A simple way to send a metric to localhost:8125
:
echo "test.metric:42|c|#myKey:myVal" | nc -w 1 -u localhost 8125