datadogextension

package module
v0.154.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2026 License: Apache-2.0 Imports: 32 Imported by: 1

README

Datadog Extension

Status
Stability alpha
Unsupported Platforms aix
Distributions contrib
Issues Open issues Closed issues
Code coverage codecov
Code Owners @dineshg13, @IbraheemA, @jade-guiton-dd, @mx-psi, @songy23
Emeritus @jackgopack4, @ankitpatel96

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

  • The extension is in active development. Functionality and configuration options may change as Datadog OpenTelemetry monitoring features evolve.
  • Please see official documentation on Datadog's website for more details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() extension.Factory

NewFactory creates a factory for the Datadog extension.

Types

type Config

type Config struct {
	confighttp.ClientConfig `mapstructure:",squash"`
	// Define the site and API key (and whether to fail on invalid API key) in API.
	API datadogconfig.APIConfig `mapstructure:"api"`
	// If Hostname is empty extension will use available system APIs and cloud provider endpoints.
	Hostname string `mapstructure:"hostname"`
	// HTTPConfig is v2 config for the http metadata service.
	HTTPConfig *httpserver.Config `mapstructure:"http"`
	// DeploymentType indicates the type of deployment (gateway, daemonset, or unknown).
	// Defaults to "unknown" if not set.
	DeploymentType string `mapstructure:"deployment_type"`
	// InstallationMethod indicates how the collector was installed.
	// Valid values: "", "kubernetes", "bare-metal", "docker", "ecs-fargate", "eks-fargate".
	// Defaults to "" (unset) if not configured.
	InstallationMethod string `mapstructure:"installation_method"`
	// GatewayService is the k8s Service fronting the gateway collector pods.
	// Set by gateway collectors. Format: "service" or "namespace/service".
	// Together with cluster_name, it forms the join key for fleet topology queries.
	GatewayService string `mapstructure:"gateway_service"`
	// GatewayDestination is the k8s Service that this collector forwards telemetry to.
	// Set by agent/daemonset collectors. Format: "service" or "namespace/service".
	// Must match gateway_service on the receiving gateway collector.
	GatewayDestination string `mapstructure:"gateway_destination"`
}

Config contains the information necessary for enabling the Datadog Extension.

func (*Config) Validate

func (c *Config) Validate() error

Validate ensures that the configuration is valid.

Directories

Path Synopsis
internal
componentchecker
package componentchecker will define the functions and types necessary to parse component status and config components
package componentchecker will define the functions and types necessary to parse component status and config components
metadata
Package metadata contains the autogenerated telemetry and build information for the extension/datadog component.
Package metadata contains the autogenerated telemetry and build information for the extension/datadog component.
payload
package payload will define the metadata payload schemas to be forwarded to Datadog backend
package payload will define the metadata payload schemas to be forwarded to Datadog backend

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL