diff --git a/sdk/metric/provider.go b/sdk/metric/provider.go index ecd15550f42..8276d278f26 100644 --- a/sdk/metric/provider.go +++ b/sdk/metric/provider.go @@ -33,8 +33,7 @@ import ( type MeterProvider struct { res *resource.Resource - meters meterRegistry - //nolint:structcheck,unused //This will be used by the MP to produce for a reader, and for the Meters to do proper view filtering + meters meterRegistry readers map[Reader][]view.View forceFlush, shutdown func(context.Context) error @@ -56,6 +55,7 @@ func NewMeterProvider(options ...Option) *MeterProvider { return &MeterProvider{ res: conf.res, + readers: conf.readers, forceFlush: flush, shutdown: sdown, }