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
12
receivers:
  statsd:
  statsd/2:
    endpoint: "otel-collector:8125"
    aggregation_interval: 70s
    enable_metric_type: true
    is_monotonic_counter: false
    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 the metrics are reporting to Lightstep from the Metric details section of the Project Settings page.

  1. Open the Project settings page and scroll to the Metric details section.

  2. Search for StatsD metric names. Search for metric

  3. 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.