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.
[cmd/mdatagen] Expose
resource_attributes
option in user settings (o…
…pen-telemetry#17967) Change constructor of MetricsBuilder from MetricsSettings to MetricsBuilderConfig, and wrap MetricsSettings and ResourceAttributesSettings with such. This change exposes resource_attributes option in the user config which can be used to enable/disable particular resource_attributes. Co-authored-by: Dmitrii Anoshin <[email protected]>
- Loading branch information
Showing
317 changed files
with
7,083 additions
and
6,515 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,20 @@ | ||
# 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: mdatagen | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Turn on the ability to enable/disable resource attributes by embedding MetricsSettings and ResourceAttributesSettings into all scraping receivers as MetricsBuilderConfig | ||
|
||
# One or more tracking issues related to the change | ||
issues: [16373] | ||
|
||
# (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: | | ||
Currently, the only way to add configurative functionality to mdatagen is by using a bunch of WithResourceAttributesSettings options to the constructor. | ||
This PR changes the first argument to the NewMetricsBuilder constructor to be of type MetricsBuilderConfig, | ||
which is a new class that wraps both MetricsSettings and ResourceAttributesSettings, and may be (hopefully) easily extended with more | ||
configuration in the future. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,31 @@ | ||
default: | ||
all_metrics: | ||
default.metric: | ||
enabled: true | ||
default.metric.to_be_removed: | ||
enabled: true | ||
optional.metric: | ||
enabled: true | ||
no_metrics: | ||
default.metric: | ||
enabled: false | ||
default.metric.to_be_removed: | ||
enabled: false | ||
optional.metric: | ||
enabled: false | ||
all_set: | ||
metrics: | ||
default.metric: | ||
enabled: true | ||
default.metric.to_be_removed: | ||
enabled: true | ||
optional.metric: | ||
enabled: true | ||
resource_attributes: | ||
optional.resource.attr: | ||
enabled: true | ||
string.enum.resource.attr: | ||
enabled: true | ||
string.resource.attr: | ||
enabled: true | ||
none_set: | ||
metrics: | ||
default.metric: | ||
enabled: false | ||
default.metric.to_be_removed: | ||
enabled: false | ||
optional.metric: | ||
enabled: false | ||
resource_attributes: | ||
optional.resource.attr: | ||
enabled: false | ||
string.enum.resource.attr: | ||
enabled: false | ||
string.resource.attr: | ||
enabled: false |
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.