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] Add Configurable Reporter Period for Host Metadata #36450

Open
NassimBtk opened this issue Nov 19, 2024 · 1 comment · May be fixed by #36451
Open

[exporter/datadog] Add Configurable Reporter Period for Host Metadata #36450

NassimBtk opened this issue Nov 19, 2024 · 1 comment · May be fixed by #36451
Labels
enhancement New feature or request exporter/datadog Datadog components

Comments

@NassimBtk
Copy link

Component(s)

exporter/datadog

Is your feature request related to a problem? Please describe.

The current Datadog exporter implementation uses a hardcoded reporting period of 30 minutes for the host metadata reporter. While this interval might work for some environments, it is too long for scenarios where infrastructure changes need to be reflected promptly. Users have no control over this period, which can lead to delayed updates in Datadog’s infrastructure list and host map.

Describe the solution you'd like

I propose adding a configurable reporter_period parameter to the Datadog exporter’s host metadata configuration. This parameter would allow users to specify the frequency at which host metadata is sent to Datadog. By default, this value could remain at 30 minutes to ensure backward compatibility, but users would have the option to set it to shorter or longer intervals based on their needs.

For example, the configuration could look like this:

exporters:

  datadog/api:
    api:
      key: <api-key>
    host_metadata:
      enabled: true
      reporter_period: 10m

This change would involve updating the host metadata configuration structure, validating the parameter to ensure positive duration values, and passing it through to the metadata pusher and reporter logic (inframetadata).

Describe alternatives you've considered

No response

Additional context

No response

@NassimBtk NassimBtk added enhancement New feature or request needs triage New item requiring triage labels Nov 19, 2024
@github-actions github-actions bot added the exporter/datadog Datadog components label Nov 19, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

NassimBtk added a commit to sentrysoftware/opentelemetry-collector-contrib that referenced this issue Nov 19, 2024
- Introduced a `reporter_period` field in `HostMetadataConfig` to allow
customization of the metadata reporting interval.
- Default value set to 30 minutes for backward compatibility.
- Updated `pkg/datadog/config/host.go` to support the new
`reporter_period` field.
- Validated `reporter_period` in `pkg/datadog/config/config.go` to
ensure positive durations.
- Passed `reporter_period` to the metadata pusher in
`exporter/datadogexporter/internal/hostmetadata/config.go`.
- Modified `exporter/datadogexporter/hostmetadata.go` and `factory.go`
to integrate `reporter_period` into the reporter logic.
- Removed hardcoded constant for metadata reporting interval in favor of
the configurable value.

Fixes open-telemetry#36450
@songy23 songy23 removed the needs triage New item requiring triage label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exporter/datadog Datadog components
Projects
None yet
2 participants