You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[chore][exporter/datadog] Improve documentation for hostname and host_metadata::hostname_source settings (open-telemetry#31702)
**Description:**
Improves documentation on the `hostname` and
`host_metadata::hostname_source` settings based on feedback from open-telemetry#29866
**Link to tracking Issue:** Fixesopen-telemetry#29866
Copy file name to clipboardExpand all lines: exporter/datadogexporter/config.go
+11-3
Original file line number
Diff line number
Diff line change
@@ -319,8 +319,12 @@ type LogsConfig struct {
319
319
// TagsConfig defines the tag-related configuration
320
320
// It is embedded in the configuration
321
321
typeTagsConfigstruct {
322
-
// Hostname is the host name for unified service tagging.
323
-
// If unset, it is determined automatically.
322
+
// Hostname is the fallback hostname used for payloads without hostname-identifying attributes.
323
+
// This option will NOT change the hostname applied to your metrics, traces and logs if they already have hostname-identifying attributes.
324
+
// If unset, the hostname will be determined automatically. See https://docs.datadoghq.com/opentelemetry/schema_semantics/hostname/?tab=datadogexporter#fallback-hostname-logic for details.
325
+
//
326
+
// Prefer using the `datadog.host.name` resource attribute over using this setting.
327
+
// See https://docs.datadoghq.com/opentelemetry/schema_semantics/hostname/?tab=datadogexporter#general-hostname-semantic-conventions for details.
324
328
Hostnamestring`mapstructure:"hostname"`
325
329
}
326
330
@@ -365,11 +369,15 @@ type HostMetadataConfig struct {
365
369
Enabledbool`mapstructure:"enabled"`
366
370
367
371
// HostnameSource is the source for the hostname of host metadata.
372
+
// This hostname is used for identifying the infrastructure list, host map and host tag information related to the host where the Datadog exporter is running.
373
+
// Changing this setting will not change the host used to tag your metrics, traces and logs in any way.
374
+
// For remote hosts, see https://docs.datadoghq.com/opentelemetry/schema_semantics/host_metadata/.
375
+
//
368
376
// Valid values are 'first_resource' and 'config_or_system':
369
377
// - 'first_resource' picks the host metadata hostname from the resource
370
378
// attributes on the first OTLP payload that gets to the exporter.
371
379
// If the first payload lacks hostname-like attributes, it will fallback to 'config_or_system'.
372
-
// Do not use this hostname source if receiving data from multiple hosts.
380
+
// **Do not use this hostname source if receiving data from multiple hosts**.
373
381
// - 'config_or_system' picks the host metadata hostname from the 'hostname' setting,
374
382
// If this is empty it will use available system APIs and cloud provider endpoints.
Copy file name to clipboardExpand all lines: exporter/datadogexporter/examples/collector.yaml
+13-4
Original file line number
Diff line number
Diff line change
@@ -171,8 +171,12 @@ exporters:
171
171
# The Datadog exporter is necessary for exporting telemetry signals to Datadog.
172
172
datadog:
173
173
## @param hostname - string - optional
174
-
## A custom hostname.
175
-
## If unset, this will be determined automatically if possible.
174
+
## The fallback hostname used for payloads without hostname-identifying attributes.
175
+
## This option will NOT change the hostname applied to your metrics, traces and logs if they already have hostname-identifying attributes.
176
+
## If unset, the hostname will be determined automatically. See https://docs.datadoghq.com/opentelemetry/schema_semantics/hostname/?tab=datadogexporter#fallback-hostname-logic for details.
177
+
##
178
+
## Prefer using the `datadog.host.name` resource attribute over using this setting.
179
+
## See https://docs.datadoghq.com/opentelemetry/schema_semantics/hostname/?tab=datadogexporter#general-hostname-semantic-conventions for details.
176
180
#
177
181
# hostname: customhostname
178
182
@@ -373,8 +377,9 @@ exporters:
373
377
## Host metadata specific configuration.
374
378
## Host metadata is the information used for populating the infrastructure list, the host map and providing host tags functionality within the Datadog app.
375
379
##
376
-
## The exporter will only send host metadata for a single host, whose name is chosen
380
+
## By default, the exporter will only send host metadata for a single host, whose name is chosen
377
381
## according to `host_metadata::hostname_source`.
382
+
## See https://docs.datadoghq.com/opentelemetry/schema_semantics/host_metadata/ to send host metadata about more hosts.
## This hostname is used for identifying the infrastructure list, host map and host tag information related to the host where the Datadog exporter is running.
393
+
## Changing this setting will not change the host used to tag your metrics, traces and logs in any way.
394
+
## For remote hosts, see https://docs.datadoghq.com/opentelemetry/schema_semantics/host_metadata/.
395
+
##
387
396
## Valid values are 'first_resource' and 'config_or_system':
388
397
## - 'first_resource' picks the host metadata hostname from the resource attributes on the first OTLP payload that gets to the exporter.
389
398
## If the first payload lacks hostname-like attributes, it will fallback to 'config_or_system' behavior.
390
-
## Do not use this hostname source if receiving data from multiple hosts.
399
+
## **Do not use this hostname source if receiving data from multiple hosts**.
391
400
##
392
401
## - 'config_or_system' picks the host metadata hostname from the 'hostname' setting, falling back to system and cloud provider APIs.
0 commit comments