Skip to content

[pkg//datadog] Default config fails round-trip validation #47042

Description

@iblancasa

Component(s)

pkg/datadog

What happened?

The datadog exporter default config currently does not safely "survive" a full config round-trip through the Collector config system.

The issue is in pkg/datadog/config, where CreateDefaultConfig() initializes both deprecated settings and their canonical replacements in the same in-memory Go config struct.

That shape is usable as an in-memory Go struct, but once the config is marshaled and then decoded again, both the deprecated and canonical keys are present in the serialized config map. During decode, the existing config warning/validation logic correctly rejects configs that set both old and new settings at the same time.

Collector version

main

Environment information

No response

OpenTelemetry Collector configuration

Log output

Additional context

Found while working on open-telemetry/opentelemetry-collector#14599

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions