The OpenTelemetry Collector provides an integration with StatsD to ingest metrics. The Collector fetches metrics from the configured path in the StatsD receiver. From there the metrics are processed and exported to Lightstep Observability.
To complete the integration, you will:
- Configure the StatsD receiver for the Collector
- Enable the integration by adding it to a pipeline
Prerequisites
- You have a service sending metrics to Statsd.
- You have a intermediate understanding of Statsd metrics.
- You’ve configured the Collector to export metric data to Lightstep Observability.
Configure the Collector receiver
StatsD emits metrics through custom StatsD format. Emitted metrics are broadcasted from StatsD using UDP on the StatsD default port 8125
.
In the Collector configuration file, add StatsD as a receiver and set the following:
1
2
3
4
5
6
7
8
9
10
11
receivers:
statsd:
statsd/2:
endpoint: "otel-collector:8125"
aggregation_interval: 70s
is_monotonic_counter: true
timer_histogram_mapping:
- statsd_type: "histogram"
observer_type: "summary"
- statsd_type: "timing"
observer_type: "summary"
The OpenTelemetry repo provides additional details about StatsD configuration.
Enable the Collector receiver
Once the StatsD receiver is configured, enable it by adding it to one or more pipelines as described in the Collector configuration documentation.
Validate metrics are reporting to Lightstep
You can validate that metrics are reporting to Lightstep on the Metrics details page in Project settings.
-
In Lightstep, click Project settings > Metric details.
-
Search for StatsD metric names.
-
If needed, click on the metric to edit the description and how the units are displayed in Lightstep.
Create a dashboard for the metrics
Use the Lightstep Terraform Provider to create a dashboard for the metrics.
Additional resources
For a more complete example that’s ready to run, see the StatsD integration in Lightstep OpenTelemetry Examples.
Known issues
Histograms are currently unsupported in the current Open Telemetry StatsD receiver (v0.58). A future release of the StatsD receiver repository is being worked on to resolve this issue. See this merge request and open issue on the StatsD receiver’s current status.
When this issue is resolved the observer_types
in the collector configuration are subject to change to more consistent values.