If you experience unexpected behavior using OpenTelemetry with Datadog, this guide may help you resolve the issue. If you continue to have trouble, contact Datadog Support for further assistance.
When using OpenTelemetry with Datadog, you might encounter various hostname-related issues. The following sections cover common scenarios and their solutions.
Symptom: In a gateway deployment, telemetry from multiple hosts appears to come from a single host, or host metadata isn’t being properly forwarded.
Cause: This occurs when the gateway collector configuration doesn’t preserve or properly forward the host metadata attributes from the agent collectors.
Resolution:
Configure agent collectors to collect and forward host metadata:
Symptom: A single host appears under multiple names in Datadog. For example, you might see one entry from the OpenTelemetry Collector (with the OTel logo) and another from the Datadog Agent.
Cause: When a host is monitored through more than one ingestion method (for example, OTLP + Datadog Agent, or DogStatsD + OTLP) without aligning on a single hostname resource attribute, Datadog treats each path as a separate host.
Resolution:
Identify all active telemetry ingestion paths sending data from the same machine to Datadog.
Choose a single hostname source and decide whether you want to rely on the Datadog Agent’s hostname or a specific resource attribute (for example, k8s.node.name).
Configure each path (Agent, Collector, etc.) so that they report a consistent hostname. For example, if you’re setting the hostname with OTLP attributes, configure your transform processor:
Symptom: You may experience a delay in host tags appearing on your telemetry data after starting the Datadog Agent or OpenTelemetry Collector. This delay typically lasts under 10 minutes but can extend up to 40-50 minutes in some cases.
Cause: This delay occurs because host metadata must be processed and indexed by Datadog’s backend before tags can be associated with telemetry data.
Resolution:
Host tags configured in either the Datadog exporter configuration (host_metadata::tags) or the Datadog Agent’s tags section are not immediately applied to telemetry data. The tags eventually appear after the backend resolves the host metadata.
This approach combines OpenTelemetry semantic conventions with Datadog-specific host tags to ensure proper functionality in both OpenTelemetry and Datadog environments.
Symptom: Container tags are not appearing on the Containers page in Datadog, which affects container monitoring and management capabilities.
Cause: This occurs when container resource attributes aren’t properly mapped to Datadog’s expected container metadata format.
Resolution:
When using OTLP ingestion in the Datadog Agent, you need to set specific resource attributes to ensure proper container metadata association. For more information, see Resource Attribute Mapping.
To verify the configuration:
Check the raw trace data to confirm that container IDs and tags are properly translated into Datadog format (for example, container.id should become container_id).
Verify that container metadata appears on the Containers page.