This guide explains how to build a DDOT Collector image with additional OpenTelemetry components not included in the default DDOT Collector. To see a list of components already included in the DDOT Collector by default, see Included components.
Open the manifest.yaml file and add the additional OpenTelemetry components to the corresponding sections (extensions, exporters, processors, receivers, or connectors).
The highlighted line in this example adds a metrics transform processor:
The custom DDOT Collector (Agent) image you build needs to be stored in your organization’s private container registry for your clusters to access it. Additionally, this build process must be repeated each time you update the Agent version to maintain compatibility with new Agent releases.
Build your custom Datadog Agent image and push it to a container registry.
Tag and push the image. The image tag must match the Datadog Agent version your image is built from:
docker tag agent-ddot datadog/agent:$DD_AGENT_VERSIONdocker push datadog/agent:$DD_AGENT_VERSION
Ensure your custom image name is datadog/agent to guarantee that all platform features work correctly. If the target repository is not Docker Hub, you need to include the repository name:
Replace <YOUR-REPO> with your repository name, and set tag to the Agent version your custom image is built from.
The Datadog Helm chart reads agents.image.tag as an Agent version and uses it to enable or disable version-dependent behavior. A tag that is not a valid Agent version, such as byoc-0.0.2, causes the chart to fail or to misconfigure the Agent. Setting doNotCheckTag: true only skips the chart's minimum-version check; it does not exempt the tag from being parsed as a version.
To distinguish between builds of the same Agent version, append a SemVer prerelease identifier to the version, such as 7.83.1-byoc.1.
Test and validate
Create a sample configuration file and run your custom DDOT Collector (Agent) to ensure everything is working correctly.
Create a sample OpenTelemetry configuration file with the additional components.
The following example configures an additional metrics transform processor:
If the DDOT Collector (Agent) starts, then the build process was successful.
You can now use this new image to install the DDOT Collector. This enables Datadog monitoring capabilities along with the additional OpenTelemetry components you’ve added.
Solution: Remove awscontainerinsightreceiver from the manifest.yaml file. This receiver has incompatible libraries and cannot be included in the build.
Build process failures
Problem: You receive the following error:
ERROR: failed to solve: process "/bin/sh -c . venv/bin/activate && invoke otel-agent.build" did not complete successfully: chown /var/lib/docker/overlay2/r75bx8o94uz6t7yr3ae6gop0b/work/work: no such file or directory
Solution: Run the build command again:
docker build . -t agent-otel --no-cache
Insufficient disk space
Problem: You may encounter errors related to insufficient disk space, such as:
no space left on device
Solution: Clear up Docker space:
docker system prune -a
Further reading
Additional helpful documentation, links, and articles: