[processor/resourcedetection] add feature gate to prefix Consul meta attributes - #50012
Merged
Conversation
…attributes Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Pull request dashboard statusMerged · refreshed 2026-08-04 22:32 UTC Status above doesn't look right?
|
Contributor
There was a problem hiding this comment.
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.
dashpole
approved these changes
Aug 4, 2026
…-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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the alpha feature gate
processor.resourcedetection.consul.prefixMetaAttributes. When enabled, the Consul detector emits allowlisted node_meta keys asconsul.meta.<key>instead of verbatim, matching other detectors likeec2.tag.,azure.tag., andopenstack.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