NewMetricsHookForProvider expects go.opentelemetry.io/otel/sdk/metric.MeterProvider as a parameter. So as a user you have to have an access to the specific provider implementation, which is not always the case.
I suggest replacing the type of the first parameter to the go.opentelemetry.io/otel/metric.MeterProvider interface. It's not a breaking change because the current type implements this interface.
Also, we can provider a second constructor which will create a hook using otel global meter provider.
NewMetricsHookForProvider
expectsgo.opentelemetry.io/otel/sdk/metric.MeterProvider
as a parameter. So as a user you have to have an access to the specific provider implementation, which is not always the case.I suggest replacing the type of the first parameter to the
go.opentelemetry.io/otel/metric.MeterProvider
interface. It's not a breaking change because the current type implements this interface.Also, we can provider a second constructor which will create a hook using otel global meter provider.