Send StatsD metrics to Axiom
This page explains how to send StatsD metrics to Axiom using the StatsD receiver of the OpenTelemetry Collector.
StatsD is a simple push-based protocol for app metrics like counters, gauges, and timers. Axiom doesn’t provide a native StatsD listener. Instead, you send StatsD metrics to Axiom with the StatsD receiver of the OpenTelemetry Collector. The receiver listens for StatsD packets, aggregates them, and forwards the results to Axiom as OpenTelemetry metrics.
Prerequisites
- Create an Axiom account.
- Create a dataset in Axiom where you send your data.
- Create an API token in Axiom with permissions to ingest data to the dataset you have created.
Configure the OpenTelemetry Collector
Add the StatsD receiver and an OTLP/HTTP exporter that sends data to Axiom:
Point your StatsD clients at the collector’s address and port (UDP 8125 in the example above) instead of your previous StatsD server.
Send a test metric
With the collector running, send a test counter using netcat:
After the next aggregation interval, the test.requests metric appears in your Metrics dataset in Axiom.
Metric types
The StatsD receiver maps StatsD metric types to OpenTelemetry metric types:
| StatsD type | OpenTelemetry type |
|---|---|
Counter (c) | Sum |
Gauge (g) | Gauge |
Timer (ms), histogram (h), distribution (d) | Configurable with the receiver’s timer_histogram_mapping option: gauge, summary, or histogram |
observer_type: "gauge"andobserver_type: "summary"work directly with Axiom.observer_type: "histogram"emits OpenTelemetry exponential histograms by default. Axiom doesn’t support exponential histograms and rejects those data points. To emit explicit-bucket histograms that Axiom accepts, configurehistogram.explicit_bucketswith amatcher_patternandbucketslist that matches your metric names.
The following receiver example maps timers to explicit-bucket histograms, histograms to summaries, and distributions to gauges:
For the full list of supported OTel metric types and current limitations, see Supported data types.
Query your metrics
Once data is flowing, query your StatsD metrics like any other OTel metrics in Axiom. For more information, see Metrics.