If you are already using a standalone OpenTelemetry (OTel) Collector for your OTel-instrumented applications, you can migrate to the Datadog Agent with embedded OpenTelemetry Collector. The embedded OTel Collector allows you to leverage Datadog’s enhanced capabilities, including optimized configurations, seamless integrations, and additional features tailored for the Datadog ecosystem.
To migrate to the Datadog Agent with embedded OpenTelemetry Collector, you need to install the Datadog Agent and configure your applications to report the telemetry data.
This guide covers migrating the OpenTelemetry Collector deployed as an agent. The Gateway deployment pattern is not supported.
Prerequisites
Before starting the migration process, ensure you have:
A valid Datadog account
An OpenTelemetry-instrumented application ready to send telemetry data
Access to your current OpenTelemetry Collector configurations
Administrative access to your Kubernetes cluster (Kubernetes v1.29+ is required)
Note: EKS Fargate environments are not supported
Helm v3+
Review existing configuration
Before you begin, review your configuration to see if your existing config is supported by default:
Examine your existing OpenTelemetry Collector configuration file (otel-config.yaml).
Compare it to the list of components included in the Datadog Agent by default.
The default configuration settings in Datadog's embedded collector may differ from the standard OpenTelemetry Collector configuration defaults. This can affect behavior of components like the filelogreceiver. Review the configuration closely when migrating from a standalone collector.
Example configuration
Here are two example Collector configuration files:
This example uses a custom metricstransform component:
This guide uses a Java application example. The -jmx suffix in the image tag enables JMX utilities. For non-Java applications, use nightly-ot-beta-main instead. For more details, see Autodiscovery and JMX integration guide.
Enable the OpenTelemetry Collector and configure the essential ports:
datadog-values.yaml
datadog:...otelCollector:enabled:trueports:- containerPort:"4317"# default port for OpenTelemetry gRPC receiver.hostPort:"4317"name:otel-grpc- containerPort:"4318"# default port for OpenTelemetry HTTP receiverhostPort:"4318"name:otel-http
It is required to set the hostPort in order for the container port to be exposed to the external network. This enables configuring the OTLP exporter to point to the IP address of the node to which the Datadog Agent is assigned.
If you don’t want to expose the port, you can use the Agent service instead:
Remove the hostPort entries from your datadog-values.yaml file.
In your application’s deployment file (deployment.yaml), configure the OTLP exporter to use the Agent service:
Select an Agent and inspect its configuration to verify the new Agent with OpenTelemetry Collector is installed successfully.
Configure your application
To configure your existing application to use Datadog Agent instead of standalone Collector, ensure that the correct OTLP endpoint hostname is used. The Datadog Agent with embedded Collector deployed as a DaemonSet, so the current host needs to be targeted.
Go to your application’s Deployment manifest file (deployment.yaml).
Add following environment variables to configure the OTLP endpoint:
If you previously used span_name_as_resource_name or span_name_remappings configurations in your standalone Collector, you need to adapt your configuration.
Remove these configurations from your Datadog Exporter and Connector settings.
Enable the enable_operation_and_resource_name_logic_v2 feature flag in your Agent configuration.
After configuring your application, verify that data is flowing correctly to Datadog:
Apply the configuration changes by redeploying your applications.
kubectl apply -f deployment.yaml
Confirm that telemetry data is being received in your Datadog account. Check logs, traces and metrics to ensure correct data collection and correlation.
Uninstall standalone Collector
After you’ve confirmed that all data is being collected correctly in Datadog, you can remove the standalone OpenTelemetry Collector:
Ensure all required data is being collected and displayed in Datadog.
Uninstall the open source OpenTelemetry Collector from your environment:
kubectl delete deployment old-otel-collector
Further reading
Additional helpful documentation, links, and articles: