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

dotnet-counters: Support EventCounter prefix + remove known data #4871

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

noahfalk
Copy link
Member

@noahfalk noahfalk commented Aug 19, 2024

  • dotnet-counters now supports a prefix 'EventCounters\' in front of provider name to force the tool to show EventCounter data when both a Meter and an EventSource have the same name. Without the prefix the Meter data would be shown by default. This is intended to help developers who are migrating between the two and want to see the old data.

  • dotnet-counters list command no longer shows a hard-coded list of provider and counter names which was already out-of-date. Instead the command now directs users to the online docs. This should be less work for us and more accurate information for users.

  • dotnet-counters console renderer now sorts all providers alphabetically when displaying them. Previously providers that were in the known provider list had special treatment and got sorted first. Several console exporter tests had to be updated because of the sort order change.

  • JSON and CSV monitoring tests are re-enabled and use the new EventCounters feature to keep their behavior stable across runtimes given that 9.0 has a System.Runtime Meter and earlier runtimes do not. We already have other tests that handle monitoring Meters and there are tests in the runtime repo for the System.Runtime Meter data.

  • CounterSet was deleted and ConfigureCounters() was refactored to use List<EventPipeCounterGroup> instead. CounterSet and EventPipeCounterGroup were already similar abstractions so there wasn't much value in maintaining both of them. EventPipeCounterGroup also supports marking a provider as EventCounter only which was needed for EventCounter prefix support. The counter list parsing tests were updated to validate the same results using the EventPipeCounterGroup API instead.

@dotnet/dotnet-diag - please take a look :)
@mikem8361 - this PR should fix the test failures you were seeing

- dotnet-counters now supports a prefix 'EventCounters\' in front of provider name to force the tool to show EventCounter data when both a Meter and an EventSource have the same name. Without the prefix the Meter data would be shown by default. This is intended to help developers who are migrating between the two and want to see the old data.

- dotnet-counters list command no longer shows a hard-coded list of provider and counter names which was already out-of-date. Instead the command now directs users to the online docs. This should be less work for us and more accurate information for users.

- dotnet-counters console renderer now sorts all providers alphabetically when displaying them. Previously providers that were in the known provider list had special treatment and got sorted first. Several console exporter tests had to be updated because of the sort order change.

- JSON and CSV monitoring tests are re-enabled and use the new EventCounters feature to keep their behavior stable across runtimes given that 9.0 has a System.Runtime Meter and earlier runtimes do not. We already have other tests that handle monitoring Meters and their are tests in the runtime repo for the System.Runtime Meter data.

- CounterSet was deleted and ConfigureCounters() was refactored to use List<EventPipeCounterGroup> instead. CounterSet and EventPipeCounterGroup were already similar abstractions so there wasn't much value in maintaining both of them. EventPipeCounterGroup also supports marking a provider as EventCounter only which was needed for EventCounter prefix support. The counter list parsing tests were updated to validate the same results using the EventPipeCounterGroup API instead.

-
Copy link
Member

@mdh1418 mdh1418 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@mikem8361
Copy link
Member

Are there any tests that now need to be re-enabled (and related issue closed)?

@noahfalk
Copy link
Member Author

Are there any tests that now need to be re-enabled (and related issue closed)?

This PR does re-enable a couple tests as part of the change. I'm not aware of others that needed to be reenabled.

Co-authored-by: Mitchell Hwang <16830051+mdh1418@users.noreply.github.com>
@noahfalk noahfalk enabled auto-merge (squash) August 20, 2024 05:35
@noahfalk
Copy link
Member Author

@mdh1418 - can you re-approve? Humorously having GH apply your change suggestion invalidates your previous approval :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants