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/iis] Add IIS Metrics Receiver #8832

Merged
merged 45 commits into from
Apr 14, 2022

Conversation

Mrod1598
Copy link
Contributor

Description:
Add IIS Metrics receiver using windows performance counter as a base.

Link to tracking Issue:
#8370

Testing:
Added config testing, factory tests, and receiver tests that ensure the config is built correctly.

Documentation:
Added doc explaining use of receiver.

@jpkrohling jpkrohling requested a review from djaglowski March 24, 2022 17:45
@Mrod1598 Mrod1598 marked this pull request as ready for review March 25, 2022 18:45
@Mrod1598 Mrod1598 requested a review from a team March 25, 2022 18:45
@Mrod1598
Copy link
Contributor Author

@djaglowski ok this is ready for a look when you get a second.

cmd/configschema/go.mod Outdated Show resolved Hide resolved
cmd/configschema/go.mod Show resolved Hide resolved
receiver/iisreceiver/Makefile Outdated Show resolved Hide resolved
receiver/iisreceiver/factory_test.go Outdated Show resolved Hide resolved
receiver/iisreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/iisreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/iisreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/iisreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/iisreceiver/scraper.go Outdated Show resolved Hide resolved
versions.yaml Show resolved Hide resolved
receiver/iisreceiver/config_generator.go Outdated Show resolved Hide resolved
receiver/iisreceiver/config_generator.go Outdated Show resolved Hide resolved
receiver/iisreceiver/config_generator.go 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.

Overall this is looking good to me.

Is it possible to add integration tests? It seems likely these counters are available on the default windows image used by github actions.

@Mrod1598
Copy link
Contributor Author

Overall this is looking good to me.

Is it possible to add integration tests? It seems likely these counters are available on the default windows image used by github actions.

here's a list of the tech that comes installed on github actions boxes, doesn't look like IIS is installed

@Mrod1598 Mrod1598 requested a review from djaglowski March 30, 2022 13:06
@dmitryax
Copy link
Member

dmitryax commented Apr 5, 2022

To be honest I don't think using windowsperfcountersreceiver is the right approach here:

  1. Metrics builder provides metrics filtering for now, but it will provide other features soon, e.g. aggregation across the attributes, changing temporality. This receiver will be ignoring user settings for those features.
  2. Using a receiver as an API for another receiver is not the best approach in general IMO. As a receiver author, I would never expect that receiver's Start is used by other components. I believe this can lead to subtle bugs caused by some internal changes in the windowsperfcountersreceiver. I think we should use common packages for code shared across receivers and avoid direct dependancies between components.

I think we should the following:

  1. Move parts of windowsperfcountersreceiver to a common package that would expose API to retrieve data.
  2. Use that API here instead of Start. This will make sure that all features of the metrics builder are supported.

@Mrod1598 @djaglowski WDYT?

@djaglowski
Copy link
Member

@dmitryax I think your proposal makes sense.

I think there are circumstances where wrapping or composing other components is a reasonable approach, but I don't think it works well in this case.

@Mrod1598 Mrod1598 marked this pull request as draft April 7, 2022 02:25
@Mrod1598 Mrod1598 marked this pull request as ready for review April 13, 2022 12:42
@Mrod1598 Mrod1598 requested a review from dmitryax April 13, 2022 12:42
@Mrod1598
Copy link
Contributor Author

@djaglowski This is ready for another review when you're ready.

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.

Looks really good. Just a few nits & need to use scrapererror.

receiver/iisreceiver/e2e_test.go Outdated Show resolved Hide resolved
receiver/iisreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/iisreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/iisreceiver/metadata.yaml Outdated Show resolved Hide resolved
receiver/iisreceiver/scraper.go Outdated Show resolved Hide resolved
@Mrod1598 Mrod1598 requested a review from djaglowski April 13, 2022 17:42
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.

Also need a codeowners entry for the component. Please list yourself, as well as me.

.github/workflows/build-and-test-windows.yml Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
receiver/iisreceiver/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.

LGTM

@djaglowski djaglowski merged commit 95f0da0 into open-telemetry:main Apr 14, 2022
@Mrod1598 Mrod1598 deleted the iis-receiver branch April 14, 2022 17:51
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.

5 participants