|
| 1 | +--- |
| 2 | +title: Datadog Extension |
| 3 | +aliases: |
| 4 | +further_reading: |
| 5 | +- link: "/opentelemetry/setup/collector_exporter/" |
| 6 | + tag: "Documentation" |
| 7 | + text: "Setting Up the OpenTelemetry Collector" |
| 8 | +- link: "/infrastructure/list/" |
| 9 | + tag: "Documentation" |
| 10 | + text: "Infrastructure List" |
| 11 | +- link: "/infrastructure/resource_catalog/" |
| 12 | + tag: "Documentation" |
| 13 | + text: "Resource Catalog" |
| 14 | +--- |
| 15 | + |
| 16 | +## Overview |
| 17 | + |
| 18 | +<div class="alert alert-info">The Datadog Extension is in Preview and is subject to change.</div> |
| 19 | + |
| 20 | +The Datadog Extension enables OpenTelemetry Collector configuration and build information to be viewed in the Datadog Infrastructure Monitoring application. When configured with the [Datadog Exporter][1], this extension provides visibility into your collector fleet directly within the Datadog UI. |
| 21 | + |
| 22 | +{{< img src="/opentelemetry/integrations/datadog_extension_hostlist.png" alt="OpenTelemetry Collector configuration shown in Datadog Host List" style="width:100%;" >}} |
| 23 | + |
| 24 | +## Key Features |
| 25 | + |
| 26 | +- **Collector Configuration Visibility**: View complete collector configuration in the Infrastructure List and Resource Catalog |
| 27 | +- **Build Information**: Display collector version, build details, and component information |
| 28 | +- **Fleet Management**: Monitor and manage your OpenTelemetry Collector fleet from the Datadog UI |
| 29 | +- **Local Inspection**: HTTP server endpoint for local debugging and configuration inspection |
| 30 | + |
| 31 | +## Setup |
| 32 | + |
| 33 | +### 1. Add the Datadog Extension to your collector configuration |
| 34 | + |
| 35 | +Configure the Datadog Extension in your OpenTelemetry Collector configuration file: |
| 36 | + |
| 37 | +```yaml |
| 38 | +extensions: |
| 39 | + datadog: |
| 40 | + api: |
| 41 | + key: ${env:DD_API_KEY} |
| 42 | + site: {{< region-param key="dd_site" >}} |
| 43 | + hostname: "my-collector-host" # Optional: must match Datadog Exporter hostname if set |
| 44 | + |
| 45 | +service: |
| 46 | + extensions: [datadog] |
| 47 | +``` |
| 48 | +
|
| 49 | +### 2. Configure the Datadog Exporter |
| 50 | +
|
| 51 | +Ensure your collector is also configured with the Datadog Exporter: |
| 52 | +
|
| 53 | +```yaml |
| 54 | +exporters: |
| 55 | + datadog/exporter: |
| 56 | + api: |
| 57 | + key: ${env:DD_API_KEY} |
| 58 | + site: {{< region-param key="dd_site" >}} |
| 59 | + hostname: "my-collector-host" # Optional: must match Datadog Extension hostname if set |
| 60 | +``` |
| 61 | +
|
| 62 | +### 3. Enable the extension in your service configuration |
| 63 | +
|
| 64 | +Add the Datadog Extension to your service extensions: |
| 65 | +
|
| 66 | +```yaml |
| 67 | +service: |
| 68 | + extensions: [datadog] |
| 69 | + pipelines: |
| 70 | + traces: |
| 71 | + receivers: [otlp] |
| 72 | + processors: [batch] |
| 73 | + exporters: [datadog/exporter] |
| 74 | + metrics: |
| 75 | + receivers: [otlp] |
| 76 | + processors: [batch] |
| 77 | + exporters: [datadog/exporter] |
| 78 | +``` |
| 79 | +
|
| 80 | +## Configuration Options |
| 81 | +
|
| 82 | +| Parameter | Description | Default | |
| 83 | +|-----------|-------------|---------| |
| 84 | +| `api.key` | Datadog API key (required) | - | |
| 85 | +| `api.site` | Datadog site (e.g., `us5.datadoghq.com`) | `datadoghq.com` | |
| 86 | +| `hostname` | Custom hostname for the collector | Auto-detected | |
| 87 | +| `http.endpoint` | Local HTTP server endpoint | `localhost:9875` | |
| 88 | +| `http.path` | HTTP server path for metadata | `/metadata` | |
| 89 | +| `proxy_url` | HTTP proxy URL for outbound requests | - | |
| 90 | +| `timeout` | Timeout for HTTP requests | `30s` | |
| 91 | +| `tls.insecure_skip_verify` | Skip TLS certificate verification | `false` | |
| 92 | + |
| 93 | +### Complete Configuration Example |
| 94 | + |
| 95 | +```yaml |
| 96 | +extensions: |
| 97 | + datadog: |
| 98 | + api: |
| 99 | + key: ${env:DD_API_KEY} |
| 100 | + site: {{< region-param key="dd_site" >}} |
| 101 | + hostname: "my-collector-host" |
| 102 | + http: |
| 103 | + endpoint: "localhost:9875" |
| 104 | + path: "/metadata" |
| 105 | + proxy_url: "http://proxy.example.com:8080" |
| 106 | + timeout: 30s |
| 107 | + tls: |
| 108 | + insecure_skip_verify: false |
| 109 | +
|
| 110 | +exporters: |
| 111 | + datadog/exporter: |
| 112 | + api: |
| 113 | + key: ${env:DD_API_KEY} |
| 114 | + site: {{< region-param key="dd_site" >}} |
| 115 | + hostname: "my-collector-host" |
| 116 | +
|
| 117 | +service: |
| 118 | + extensions: [datadog] |
| 119 | + pipelines: |
| 120 | + traces: |
| 121 | + receivers: [otlp] |
| 122 | + processors: [batch] |
| 123 | + exporters: [datadog/exporter] |
| 124 | + metrics: |
| 125 | + receivers: [otlp] |
| 126 | + processors: [batch] |
| 127 | + exporters: [datadog/exporter] |
| 128 | +``` |
| 129 | + |
| 130 | +## Viewing Collector Configuration |
| 131 | + |
| 132 | +Once configured, you can view your OpenTelemetry Collector configuration and build information in two locations: |
| 133 | + |
| 134 | +### Infrastructure List (Host List) |
| 135 | + |
| 136 | +1. Navigate to **Infrastructure > Host List** in your Datadog account |
| 137 | +2. Click on any host running the OpenTelemetry Collector |
| 138 | +3. In the host details panel, expand the **Collector Configuration** section |
| 139 | +4. View the complete collector configuration, active components, and build information |
| 140 | + |
| 141 | +### Resource Catalog |
| 142 | + |
| 143 | +1. Navigate to **Infrastructure > Resource Catalog** in your Datadog account |
| 144 | +2. Filter for hosts or search for your collector instances |
| 145 | +3. Click on any host running the OpenTelemetry Collector |
| 146 | +4. In the host investigation panel, view collector configuration under **Infrastructure Details** |
| 147 | + |
| 148 | +## Local HTTP Server |
| 149 | + |
| 150 | +The Datadog Extension includes a local HTTP server for debugging and inspection: |
| 151 | + |
| 152 | +```bash |
| 153 | +# Access collector metadata locally |
| 154 | +curl http://localhost:9875/metadata |
| 155 | +``` |
| 156 | + |
| 157 | +This endpoint provides: |
| 158 | +- Collector configuration (scrubbed of sensitive information) |
| 159 | +- Build information and version details |
| 160 | +- Active component list |
| 161 | +- Extension status |
| 162 | + |
| 163 | +## Important Notes |
| 164 | + |
| 165 | +<div class="alert alert-warning"> |
| 166 | +<strong>Hostname Matching</strong>: If you specify a custom <code>hostname</code> in the Datadog Extension, it must match the <code>hostname</code> value in the Datadog Exporter configuration. If left unset in both components, the auto-detected hostname will match correctly. |
| 167 | +</div> |
| 168 | + |
| 169 | +<div class="alert alert-info"> |
| 170 | +The Datadog Extension is in Preview and functionality may change as Datadog infrastructure monitoring features evolve. For the latest updates, watch the <a href="https://www.datadoghq.com/blog/">Datadog blog</a> and the <a href="https://github.com/open-telemetry/opentelemetry-collector-contrib">OpenTelemetry Collector Contrib repository</a>. |
| 171 | +</div> |
| 172 | + |
| 173 | +## Troubleshooting |
| 174 | + |
| 175 | +### Configuration Not Appearing |
| 176 | + |
| 177 | +1. **Check hostname matching**: Ensure hostnames match between Datadog Extension and Datadog Exporter |
| 178 | +2. **Verify API key**: Confirm the API key is valid and has appropriate permissions |
| 179 | +3. **Check collector logs**: Look for extension initialization and data submission logs |
| 180 | +4. **Confirm extension is enabled**: Verify the extension is listed in the service configuration |
| 181 | + |
| 182 | +### HTTP Server Issues |
| 183 | + |
| 184 | +1. **Port conflicts**: Ensure port 9875 is available or configure a different port |
| 185 | +2. **Network access**: Verify the HTTP server is accessible from your debug location |
| 186 | +3. **Check logs**: Review extension logs for HTTP server startup issues |
| 187 | + |
| 188 | +## Further Reading |
| 189 | + |
| 190 | +{{< partial name="whats-next/whats-next.html" >}} |
| 191 | + |
| 192 | +[1]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/datadogexporter |
0 commit comments