Possibly use IMeterFactory when targeting net8.0
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.