Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter/datadog] Create host_metadata section to group related settings #9099

Closed
Tracked by #8372
mx-psi opened this issue Apr 6, 2022 · 0 comments · Fixed by #12110
Closed
Tracked by #8372

[exporter/datadog] Create host_metadata section to group related settings #9099

mx-psi opened this issue Apr 6, 2022 · 0 comments · Fixed by #12110
Labels
exporter/datadog Datadog components

Comments

@mx-psi
Copy link
Member

mx-psi commented Apr 6, 2022

What will change?

Several settings will be moved to a new host_metadata section to improve configuration consistency and to clarify the relation between them. In particular:

  • The tags field will be moved to host_metadata::tags to clarify that it sets host tags and nudge users into using processors whenever appropriate.
  • The send_metadata field will be renamed to host_metadata::enabled.
  • The use_resource_metadata field will be renamed to host_metadata::hostname_source, which will hold an enum.

Who is affected?

You are affected if you explicitly set tags, send_metadata or use_resource_metadata on your Datadog exporter configuration. If you are affected, a warning will be logged stating that you are using it, together with a link to this issue.

Example warning:

Deprecated: "tags" has been deprecated in favor of "host_metadata::tags" and will be removed in v0.52.0. See github.com/open-telemetry/opentelemetry-collector-contrib/issues/9099 for details

The default behavior of the Datadog exporter will not change.

What should I do if I am affected?

tags field

The tags field has been renamed to host_metadata::tags to clarify that it is used for sending host tags (i.e. tags that appear alongside your host on the infrastructure list or host map on the Datadog webapp).

If you want to set tags for all your metrics, add them as labels using the metricstransform processor instead of using the host_metadata::tags option. Check the processor documentation to understand how to set more advanced filters.

If you want to send them as host tags, use the host_metadata::tags field instead.

Example for setting host tags (click to expand)

If using:

# ...
exporters:
  datadog:
    api:
      key: ${DD_API_KEY}
    tags: ["example:one", "example:two"]
# ...

You can replace it by

# ...
exporters:
  datadog:
    api:
      key: ${DD_API_KEY}
    host_metadata:
      tags: ["example:one", "example:two"]
# ...

send_metadata field

Remove all references to the send_metadata field and set host_metadata::enabled instead.

Example for send_metadata (click to expand)

If using:

# ...
exporters:
  datadog:
    api:
      key: ${DD_API_KEY}
    send_metadata: false
# ...

You can replace it by

# ...
exporters:
  datadog:
    api:
      key: ${DD_API_KEY}
    host_metadata:
      enabled: false
# ...

use_resource_metadata field

Remove all references to the use_resource_metadata field and set host_metadata::hostname_source instead.

Example for use_resource_metadata: true (click to expand)

If using:

# ...
exporters:
  datadog:
    api:
      key: ${DD_API_KEY}
    use_resource_metadata: true
# ...

You can replace it by

# ...
exporters:
  datadog:
    api:
      key: ${DD_API_KEY}
    host_metadata:
      hostname_source: first_resource
# ...
Example for use_resource_metadata: false (click to expand)

If using:

# ...
exporters:
  datadog:
    api:
      key: ${DD_API_KEY}
    use_resource_metadata: false
# ...

You can replace it by

# ...
exporters:
  datadog:
    api:
      key: ${DD_API_KEY}
    host_metadata:
      hostname_source: config_or_system
# ...

When will it change?

To be filled when this happens

Change description Version of deprecation Version of removal
Renaming of tags v0.49.0 v0.56.0
Renaming of send_metadata v0.49.0 v0.56.0
Renaming of use_resource_metadata v0.49.0 v0.56.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter/datadog Datadog components
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant