Skip to main content

Datadog Extension

Status Available in: contrib Maintainers: @dineshg13, @IbraheemA, @jade-guiton-dd, @mx-psi, @songy23 Source: opentelemetry-collector-contrib

Overview

The Datadog Extension enables collector configuration and build info to be viewed in both Datadog Infrastructure Monitoring and Fleet Automation. Specifically, collector info may be viewed in Infrastructure -> Hosts, Infrastructure -> Resources -> Catalog, and in limited preview, Integrations -> Fleet Automation. You may configure this extension in service, using the following configuration values: api::key: a Datadog API Key, required api::site: your Datadog site value (e.g. us5.datadoghq.com), defaults to “datadoghq.com” hostname: custom hostname; if you do not specify one, the extension will try to infer one. Note: If set, this must match the hostname value set in the Datadog Exporter, if also enabled in your collector. If hostname is left unset in both Datadog Exporter and Datadog Extension, the inferred hostname will match correctly.

Fleet Automation Preview

Per the recent post on the Datadog Monitor blog, customers may view collectors configured with the Datadog Extension in Fleet Automation. Please view the instructions at the linked page above to learn more and to fill out the preview intake form.

Adding Resource Attributes

The Datadog Extension automatically collects resource attributes from the Collector’s internal telemetry and includes them in the metadata payload sent to Datadog. These attributes can be used to provide additional context about your collector instance. To add custom resource attributes to the Collector’s internal telemetry signals (traces, metrics, and logs), configure them under service::telemetry::resource:
service:
  telemetry:
    resource:
      deployment.environment.name: 'production'
      team.name: 'platform'
      k8s.cluster.name: 'prod-us-east1-cluster-a'
Note: The following resource attributes are automatically attached to the Collector’s internal telemetry:
  • service.name
  • service.version
  • service.instance.id (randomly generated)

Local HTTP Server Functionality

The Datadog Extension includes a local HTTP server that exposes the OpenTelemetry Collector’s configuration and metadata. This server is intended to make it easier to inspect and debug the collector’s state locally, and to view the collector configuration and metadata that is intended to be displayed in the Datadog app. Purpose:
  • Display collector configuration and metadata in the Datadog Infrastructure Monitoring app. More announcements and UI changes will be made soon regarding this matter.
How it works:
  • The extension starts a server (by default on localhost:9875 at the /metadata path) that provides information regarding the collector’s configuration, active components, build info, and other metadata.
  • This information is also sent to the Datadog backend for infrastructure monitoring and fleet automation features.
Example configuration:
extensions:
  datadog:
    api:
      key: <YOUR_DATADOG_API_KEY>
      site: "datadoghq.com"
    http:
      endpoint: "localhost:9875"
      path: "/metadata"

Enabling Proxy Support

You can set up proxy configuration for outbound requests to Datadog by following the example below: Example configuration with proxy:
extensions:
  datadog:
    api:
      key: <YOUR_DATADOG_API_KEY>
      site: "datadoghq.com"
    proxy_url: "http://proxy.example.com:8080"
    timeout: 30s
    tls:
      insecure_skip_verify: true
  • proxy_url: URL of the HTTP proxy to use for outbound requests.
  • timeout: Timeout for HTTP requests to Datadog.
  • tls: TLS settings for outbound connections.

Deployment Type Configuration

The Datadog Extension supports a deployment_type configuration option to indicate how the OpenTelemetry Collector is deployed. This information is included in the metadata payload sent to Datadog and can be used for better observability and fleet management. Available options:
  • gateway: Use this when the collector is deployed as a centralized gateway that receives telemetry from multiple sources (e.g., a standalone collector deployment that aggregates data from multiple application instances).
  • daemonset: Use this when the collector is deployed as a DaemonSet in Kubernetes or as an agent running on each host (e.g., one collector instance per node).
  • unknown (default): Use this when the deployment type doesn’t fit the other categories or is not specified.
Example configuration for a DaemonSet deployment:
extensions:
  datadog:
    api:
      key: <YOUR_DATADOG_API_KEY>
      site: "datadoghq.com"
    deployment_type: daemonset

Notes


Last generated: 2026-04-13