Install the OpenTelemetry Collector
To install the OpenTelemetry Collector, deploy it as a Kubernetes DaemonSet on the same node as your DogStatsD clients. DogStatsD clients use the User Datagram Protocol (UDP) to send metrics. The OpenTelemetry Collector must be on the same node as the DogStatsD client to ensure reliable network communication between the DogStatsD client and the OpenTelemetry Collector.Configure the OpenTelemetry StatsD receiver
You can configure the StatsD receiver by adding it to your OpenTelemetry Configuration. The following configuration defines an OpenTelemetry receiver and a StatsD receiver to accept DogStatsD metrics from Datadog clients.Configure an OpenTelemetry protocol exporter to send DogStatsD metrics
DogStatsD metrics sent to Datadog are normalized to follow Datadog’s best practices. For example, Datadog lowercases tag names and values and modifies tag values to begin with an alphabetical character. To reduce migration efforts and minimize changes to queries, Observability Platform can apply the same sanitization to ensure metric names, tags, and values are the same in both Observability Platform and Datadog by passing an additional header. The following configuration defines these OpenTelemetry protocol (OTLP) exporters:otlp/chronospheredefines a default configuration to send OTLP metrics without applying Datadog normalization. Use this exporter to send all metrics from any source except Datadog clients.otlp/chronosphere/dogstatsddefines a configuration to send OTLP metrics and apply Datadog normalization. Use this exporter only to send metrics that were sent by Datadog clients.
- Replace
ADDRESSwith the company name subdomain in your Observability Platform instance address ending in.chronosphere.io:443. For example, if your instance’s domain isMY_COMPANY.chronosphere.io:443, replaceADDRESSwithMY_COMPANY. - Set
$API_TOKENto the API token generated from your Chronosphere service account, specified as an HTTP header. Chronosphere recommends calling this value as an environment variable. - Set
retry_on_failuretotrueto retry attempts after any recoverable errors. - Set
timeoutto30sto prevent larger requests from timing out, since the upstream system might require more time for internal batching.
Define OpenTelemetry Collector pipelines
To receive metrics, connect the receivers and exporters with two separate pipelines:metricspipeline: The default metrics pipeline receives all OTLP metrics and sends them to the Chronosphere OTLP endpoint.metrics/dogstatsdpipeline: The DogStatsD metrics pipeline receives DogStatsD metrics and exports them to a Chronosphere endpoint with a header to enable Datadog metric name and tag normalization.
processors value adds processors to define batching and ensure time series
uniqueness.
batch: Sets batch processing. For more information, see the “Configure batch processing” step in Configure the OpenTelemetry Collector.resourcedetection: Collects information about the environment in which the OpenTelemetry Collector is running.resource/service-instance: Observability Platform requires aservice.instance.idattribute and value for all time series to ensure time series uniqueness. The ingestion API rejects metrics that lackservice.instance.id. For more information, see the Map resource attributes.