Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/windowsperfcountersreceiver] Update how metrics are established #8376

Merged
merged 26 commits into from Mar 21, 2022

Conversation

Mrod1598
Copy link
Contributor

Description:

Updated the receiver to enable metrics configuration. Additionally, once the mdatagen package makes the applicable structs public, this receiver will be updated to use those.

Link to tracking Issue:
#8259

Testing:
Along side the updated config options, additional tests were added to test the new config options. Also, updated the the scraper tests to test the different metric formats.

Documentation:
Updated the documentation to use the new config options and describe where to use them.

@Mrod1598 Mrod1598 changed the title [receiver/windowsperfcountersreceiver] [receiver/windowsperfcountersreceiver] Update how metrics are established Mar 10, 2022
@Mrod1598 Mrod1598 marked this pull request as ready for review March 10, 2022 15:31
@Mrod1598 Mrod1598 requested review from a team and dashpole as code owners March 10, 2022 15:31
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

Ideally we would extract the metric metadata structs from mdatagen so that this component is not just approximating the functionality. However, at a glance this appears not to be very straightforward. I think we should at least open a tracking issue to capture the intention though.

receiver/windowsperfcountersreceiver/config.go Outdated Show resolved Hide resolved
receiver/windowsperfcountersreceiver/config.go Outdated Show resolved Hide resolved
receiver/windowsperfcountersreceiver/config.go Outdated Show resolved Hide resolved
receiver/windowsperfcountersreceiver/config.go Outdated Show resolved Hide resolved
receiver/windowsperfcountersreceiver/config.go Outdated Show resolved Hide resolved
receiver/windowsperfcountersreceiver/config.go Outdated Show resolved Hide resolved
receiver/windowsperfcountersreceiver/README.md Outdated Show resolved Hide resolved
receiver/windowsperfcountersreceiver/README.md Outdated Show resolved Hide resolved
receiver/windowsperfcountersreceiver/README.md Outdated Show resolved Hide resolved
receiver/windowsperfcountersreceiver/README.md Outdated Show resolved Hide resolved
receiver/windowsperfcountersreceiver/README.md Outdated Show resolved Hide resolved
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

This LGTM. Thanks for all the iteration @Mrod1598

CHANGELOG.md Outdated
@@ -29,6 +29,7 @@

### 🛑 Breaking changes 🛑

- `windowsperfcountersreceiver`: Added metrics configuration (#8376)
Copy link
Member

Choose a reason for hiding this comment

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

Looks like I can't change this PR, so I can't fix this for you, but this now needs to be moved up to the "unreleased" section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@jpkrohling
Copy link
Member

To the next reviewer: feel free to dismiss my review once the changelog is fixed.

@jpkrohling jpkrohling dismissed their stale review March 21, 2022 11:46

Changelog fixedz

@jpkrohling jpkrohling merged commit ba8c797 into open-telemetry:main Mar 21, 2022
@Mrod1598 Mrod1598 deleted the windowsperfcounter-rework branch March 21, 2022 13:07
foxlegend pushed a commit to foxlegend/opentelemetry-collector-contrib that referenced this pull request Apr 8, 2022
…shed (open-telemetry#8376)

* Add ability to define metrics

* Update tests

* Update Readme

* Add attributes to readme

* Update values for metric config in readme

* Update changelog

* Fix lint

* Fix misspelling

* Force rerun

* Rename keys in Counter config

* Restructure metrics into map

* Remove Value type & Add defaults

* Remove extra test case

* Fix tests

* Add handling for no metrics defined

* Add no metric definition test

* Rework Readme wording

* Add no metrics factory test

* Add no Metrics config test

* Add no metric specified test

* Fix test

* Add More Tests

* Add ignoreValues option

* Fix changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants