Overview
The Datadog Extension is in Preview.
The Datadog Extension allows you to view OpenTelemetry Collector configuration and build information directly within Datadog on the Infrastructure List and Resource Catalog. When used with the Datadog Exporter, this extension gives you visibility into your Collector fleet without leaving the Datadog UI.
Key features
- Collector Configuration Visibility: View the complete configuration for any Collector in your infrastructure.
- Build Information: See Collector version, build details, and component information.
- Fleet Management: Monitor and manage your OpenTelemetry Collector fleet from the Datadog UI.
- Local Inspection Endpoint: Use an HTTP endpoint for local debugging and configuration verification.
Setup
1. Add the Datadog Extension to your Collector configuration
Configure the Datadog Extension in your OpenTelemetry Collector configuration file:
extensions:
datadog:
api:
key: ${env:DD_API_KEY}
site:
# hostname: "my-collector-host" # Optional: must match Datadog Exporter hostname if set
service:
extensions: [datadog]
This feature requires the Datadog Exporter to be configured and enabled in an active pipeline (traces
or metrics
). The extension uses the exporter’s telemetry to associate the Collector’s configuration with a specific host in Datadog.
exporters:
datadog/exporter:
api:
key: ${env:DD_API_KEY}
site:
# hostname: "my-collector-host" # Optional: must match Datadog Extension hostname if set
3. Enable the extension in your service configuration
Add the Datadog Extension to your service extensions:
service:
extensions: [datadog]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [datadog/exporter]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [datadog/exporter]
Configuration options
Parameter | Description | Default |
---|
api.key | Datadog API key (required) | - |
api.site | Datadog site (for example, us5.datadoghq.com ) | datadoghq.com |
hostname | Custom hostname for the Collector | Auto-detected |
http.endpoint | Local HTTP server endpoint | localhost:9875 |
http.path | HTTP server path for metadata | /metadata |
proxy_url | HTTP proxy URL for outbound requests | - |
timeout | Timeout for HTTP requests | 30s |
tls.insecure_skip_verify | Skip TLS certificate verification | false |
Hostname Matching: If you specify a custom
hostname
in the Datadog Extension, it
must match the
hostname
value in the Datadog Exporter configuration. The Datadog Extension does not have access to pipeline telemetry and cannot infer hostnames from incoming spans. It only obtains hostnames from system/cloud provider APIs or manual configuration. If telemetry has different
hostname attributes than the hostname reported by the extension, the telemetry will not be correlated to the correct host, and you may see duplicate hosts in Datadog.
Complete configuration example
extensions:
datadog:
api:
key: ${env:DD_API_KEY}
site:
hostname: "my-collector-host"
http:
endpoint: "localhost:9875"
path: "/metadata"
proxy_url: "http://proxy.example.com:8080"
timeout: 30s
tls:
insecure_skip_verify: false
exporters:
datadog/exporter:
api:
key: ${env:DD_API_KEY}
site:
hostname: "my-collector-host"
service:
extensions: [datadog]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [datadog/exporter]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [datadog/exporter]
Viewing Collector configuration
Once configured, you can view your OpenTelemetry Collector configuration and build information in two locations:
Infrastructure List (Host List)
- Navigate to Infrastructure > Hosts in your Datadog account.
- Click on any host running the OpenTelemetry Collector (Note: Filter by
field:apps:otel
to only show Collector instances). - In the host details panel, select the OTel Collector tab to see build info and full Collector configuration.
Resource Catalog
- Navigate to Infrastructure > Resource Catalog in your Datadog account
- Filter for hosts or search for your Collector instances.
- Click on any host running the OpenTelemetry Collector.
- Scroll down to Collector to see build info and full Collector configuration.
Local HTTP server
The Datadog Extension includes a local HTTP server for debugging and inspection:
# Access collector metadata locally
curl http://localhost:9875/metadata
This endpoint provides:
- Collector configuration (scrubbed of sensitive information)
- Build information and version details
- Active component list
- Extension status
Troubleshooting
Configuration not appearing in Datadog
- Check hostname matching: Ensure hostnames match between the Datadog Extension and Datadog Exporter.
- Verify API key: Confirm the API key is valid and has appropriate permissions.
- Check Collector logs: Look for extension initialization and data submission logs.
- Confirm extension is enabled: Verify the extension is listed in the service configuration.
HTTP server issues
- Port conflicts: Ensure port 9875 is available or configure a different port.
- Network access: Verify the HTTP server is accessible from your debug location.
- Check logs: Review extension logs for HTTP server startup issues.
Further reading
Más enlaces, artículos y documentación útiles: