You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 writtenprovider_name
dotnet-counters ensures that this name will only be bound to an EventSource.The text was updated successfully, but these errors were encountered: