Skip to content

[processor/resourcedetection] add feature gate to prefix Consul meta attributes - #50012

Merged
songy23 merged 4 commits into
open-telemetry:mainfrom
paulojmdias:feat/49988
Aug 4, 2026
Merged

[processor/resourcedetection] add feature gate to prefix Consul meta attributes#50012
songy23 merged 4 commits into
open-telemetry:mainfrom
paulojmdias:feat/49988

Conversation

@paulojmdias

Copy link
Copy Markdown
Member

Description

Adds the alpha feature gate processor.resourcedetection.consul.prefixMetaAttributes. When enabled, the Consul detector emits allowlisted node_meta keys as consul.meta.<key> instead of verbatim, matching other detectors like ec2.tag., azure.tag., and openstack.nova.meta..

Disabled by default, so existing attribute names are unchanged.

Link to tracking issue

Fixes #49988

Testing

Added TestDetectPrefixedMetaAttributes for the gate-on path.

Documentation

Gate documented in the README Consul section and in the generated internal/consul/documentation.md.

Authorship

  • I, a human, wrote this pull request description myself.

…attributes

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
@paulojmdias
paulojmdias requested review from a team and dashpole as code owners August 3, 2026 22:46
@github-actions github-actions Bot added the processor/resourcedetection Resource detection processor label Aug 3, 2026
@github-actions
github-actions Bot requested a review from Aneurysm9 August 3, 2026 22:46
@paulojmdias
paulojmdias requested review from Copilot and removed request for Aneurysm9 August 3, 2026 22:46
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Aug 3, 2026

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-08-04 22:32 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an alpha feature gate to the Consul resource detector so allowlisted node_meta attributes can be emitted under a Consul-owned namespace (consul.meta.<key>) while preserving the current unprefixed behavior by default.

Changes:

  • Introduces processor.resourcedetection.consul.prefixMetaAttributes (alpha, default off) and wires it into the Consul detector’s metadata emission path.
  • Adds unit coverage for the gate-enabled behavior and documents the gate in the resourcedetectionprocessor README + generated detector docs.
  • Updates module dependencies and includes a changelog entry for the user-facing change.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
processor/resourcedetectionprocessor/README.md Documents the new feature gate and its effect on Consul node meta attribute naming.
processor/resourcedetectionprocessor/internal/consul/metadata.yaml Declares the feature gate for mdatagen, including description, version, and issue reference.
processor/resourcedetectionprocessor/internal/consul/internal/metadata/generated_feature_gates.go Generated registration of the new feature gate in the global registry.
processor/resourcedetectionprocessor/internal/consul/documentation.md Generated documentation updated to include the feature gate table entry.
processor/resourcedetectionprocessor/internal/consul/consul.go Applies the optional consul.meta. prefix when the feature gate is enabled.
processor/resourcedetectionprocessor/internal/consul/consul_test.go Adds a test for the prefixed behavior and a helper to toggle the gate during tests.
processor/resourcedetectionprocessor/go.mod Promotes go.opentelemetry.io/collector/featuregate to a direct dependency (now imported in tests/generated code).
.chloggen/49988-consul-prefix-meta-attributes.yaml Adds a changelog entry describing the new alpha gate and its default-off behavior.
Files not reviewed (1)
  • processor/resourcedetectionprocessor/internal/consul/internal/metadata/generated_feature_gates.go: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…-contrib into feat/49988

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
@paulojmdias paulojmdias added ready to merge Code review completed; ready to merge by maintainers and removed waiting-for-code-owners labels Aug 4, 2026
@github-actions
github-actions Bot requested a review from Aneurysm9 August 4, 2026 20:38
@songy23
songy23 merged commit 5f72ef2 into open-telemetry:main Aug 4, 2026
122 of 147 checks passed
@paulojmdias
paulojmdias deleted the feat/49988 branch August 4, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

processor/resourcedetection Resource detection processor ready to merge Code review completed; ready to merge by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[processor/resourcedetection] Evaluate prefixing Consul detector meta attributes

4 participants