Skip to content

Feature: dotnet-counters should allow users to request that a provider_name only binds to an EventSource #3805

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

Closed
noahfalk opened this issue Apr 6, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@noahfalk
Copy link
Member

noahfalk commented Apr 6, 2023

Background and Motivation

dotnet-counters supports both the EventCounters and the newer metrics API. When a provider name is specified on the command line users aren't required to identify whether that name is naming an EventSource or a Meter, the tool subscribes to both and auto-detects which one sends data. If both send data dotnet-counters prefers the Meter. I think this works well for cases where only one of the two APIs is being used, or where the metrics being exposed by the Meter exactly match what is exposed by the EventCounter. However there will be cases where developers preserve the EventCounter for back-compat and also introduce a Meter with the same name that has metrics structured differently. The Meter APIs offer attributes which didn't exist on EventCounters so its natural that several EventCounter metrics might collapse into a single multi-dimensional metric on a Meter. Check out dotnet/aspnetcore#47536 as an example. When this occurs some users might explicitly want to stay on the old back-compatible EventCounters and currently they have no way to achieve that. I'm guessing this won't be too common of a need - this is largely about mitigating risk in what is essentially a breaking change of behavior.

Proposed Feature

We should add some way for users to indicate that a given provider name refers to an EventCounters provider (an EventSource) and dotnet-counters should ignore any Meter that has the same name. One potential design is that if users write EventSource\provider_name where they previously would have written provider_name dotnet-counters ensures that this name will only be bound to an EventSource.

@noahfalk
Copy link
Member Author

This was completed by #4871. It used EventCounters as the prefix instead of EventSource. It should ship in the next tools release.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant