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
{{ message }}
Repository navigation
Possibly use IMeterFactory when targeting net8.0 #5187
Doing this means having multiple IMeterFactories - one per data source - each instantiating its own version of each meter; for example, there would be multiple meters with the name db.client.connections.usage, each reporting information for the connections used for its data source. Note that measurements emitted by these different meters can still be distinguished and correlated with their data source, as the data source identifier (configured name or connection string) is emitted as a dimension.
As long as metrics are non-observable, this should work fine, but observable ones (which we do have) could be problematic. This is something we'll have to carefully look at.
The underlying problem is that the source of metrics (data source) isn't a singleton, like Kestrel is for web. In theory, if we wanted to provide a totally application-global, aggregate set of metrics for all data sources, that would be static and could easily use IMeterFactory. But as things are, I'm not sure how this will work.
Activity
WhatzGames commentedon Sep 21, 2023
Updated Link
[-]Possibly use IMeterFactory when targetin net8.0[/-][+]Possibly use IMeterFactory when targeting net8.0[/+]roji commentedon Nov 8, 2023
Briefly discussed with @noahfalk a while ago...
Doing this means having multiple IMeterFactories - one per data source - each instantiating its own version of each meter; for example, there would be multiple meters with the name
db.client.connections.usage, each reporting information for the connections used for its data source. Note that measurements emitted by these different meters can still be distinguished and correlated with their data source, as the data source identifier (configured name or connection string) is emitted as a dimension.As long as metrics are non-observable, this should work fine, but observable ones (which we do have) could be problematic. This is something we'll have to carefully look at.
The underlying problem is that the source of metrics (data source) isn't a singleton, like Kestrel is for web. In theory, if we wanted to provide a totally application-global, aggregate set of metrics for all data sources, that would be static and could easily use IMeterFactory. But as things are, I'm not sure how this will work.
Moving out to 9.0.