Add instrument provider caching
Split from #3245
Create a cache for the instProvider type and use it for this method: https://github.com/open-telemetry/opentelemetry-go/blob/4146bd1403be895f9c1b1193e1aa177039c32001/sdk/metric/instrument_provider.go#L37
This will prevent the need for duplicate aggregator lookups when a user asks for the exact same instrument multiple times.
Hi @MrAlias - I would like to take this issue on! I forked the repo but have noticed that there has been some restructuring done to the metric/sdk module since this issue was created. In particular, it appears there is a resolver struct which takes advantage of an instrumentCache to providing the caching behavior described above.
Is the issue referring to something else? Or does it need to be marked as closed/complete?
@Omkar-Waingankar I would recommend holding of on this issue until we have a more stable SDK. There are still incoming changes in the instrument provider that would affect any caching at this level.