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.
[receiver/dockerstats] Add optional resource attributes (open-telemet…
…ry#21185) **Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> Add `container.image.id` and `container.command_line` as optional resource attributes, disabled by default. **Link to tracking Issue:** <Issue number if applicable> Tracking issue open-telemetry#21092 **Testing:** <Describe what testing was performed and which tests were added.> Until this point, all resource attributes have been enabled by default, resulting in the coupling of the [test](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/7bf5d66fae6c1c5360ec2875948f2c2adab6c44f/receiver/dockerstatsreceiver/receiver_test.go#L191) to the default configuration. In order to test the current implementation with the new resource attributes enabled & disabled, a minor refactoring was required in the `TestScrapeV2` test, allowing to pass different configurations for each test. Refer to the following commit 508dbee9aa9a22c1ca79f16bba5abeecceeb9c48 to check the refactor in the test. **Documentation:** <Describe the documentation added.> New resource attributes documentation was generated by `mdatagen`.
- Loading branch information
Showing
19 changed files
with
2,159 additions
and
744 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,16 @@ | ||
# 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: dockerstatsreceiver | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: "Add `container.image.id` and `container.command_line` optional resource attributes" | ||
|
||
# One or more tracking issues related to the change | ||
issues: [21092] | ||
|
||
# (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: |
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
18 changes: 13 additions & 5 deletions
18
receiver/dockerstatsreceiver/internal/metadata/generated_config.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
24 changes: 14 additions & 10 deletions
24
receiver/dockerstatsreceiver/internal/metadata/generated_config_test.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
receiver/dockerstatsreceiver/internal/metadata/generated_metrics.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
20 changes: 17 additions & 3 deletions
20
receiver/dockerstatsreceiver/internal/metadata/generated_metrics_test.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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.