forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[processor/resourcedetection] add resource_attributes to every detect…
…or in resource processor (open-telemetry#23253) **Description:** Adding resource_attributes option to every detector in resource detection processor <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> **Link to tracking Issue:** [21482](open-telemetry#21482) **Testing:** Unit test for `resource_attribute` config, adjusting current unit tests to the new implementation **Documentation:** Updated README.md --------- Co-authored-by: Dmitrii Anoshin <[email protected]>
- Loading branch information
1 parent
fce6a8f
commit 1a0a9e7
Showing
99 changed files
with
3,256 additions
and
275 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
# If your change doesn't affect end users, such as a test fix or a tooling change, | ||
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: enhancement | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) | ||
component: resourcedetectionprocessor | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Adds a way to configure the list of added resource attributes by the processor | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [21482] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: | | ||
Users can now configure what resource attributes are gathered by specific detectors. | ||
Example configuration: | ||
``` | ||
resourcedetection: | ||
detectors: [system, ec2] | ||
system: | ||
resource_attributes: | ||
host.name: | ||
enabled: true | ||
host.id: | ||
enabled: false | ||
ec2: | ||
resource_attributes: | ||
host.name: | ||
enabled: false | ||
host.id: | ||
enabled: true | ||
``` | ||
For example, this config makes `host.name` being set by `system` detector, and `host.id` by `ec2` detector. | ||
Moreover: | ||
- Existing behavior remains unaffected as all attributes are currently enabled by default. | ||
- The default attributes 'enabled' values are defined in `metadata.yaml`. | ||
- Future releases will introduce changes to resource_attributes `enabled` values. | ||
- Users can tailor resource detection process to their needs and environment. | ||
This file contains 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
This file contains 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
Oops, something went wrong.