@@ -19,72 +19,72 @@ var _ Meter = (*NopMeter)(nil)
1919
2020// Int64Counter creates a no-op instrument.
2121func (NopMeter ) Int64Counter (string , ... InstrumentOption ) (Int64Counter , error ) {
22- return nopInstrument [ int64 ]{} , nil
22+ return nopInstrumentInt64 , nil
2323}
2424
2525// Int64UpDownCounter creates a no-op instrument.
2626func (NopMeter ) Int64UpDownCounter (string , ... InstrumentOption ) (Int64UpDownCounter , error ) {
27- return nopInstrument [ int64 ]{} , nil
27+ return nopInstrumentInt64 , nil
2828}
2929
3030// Int64Gauge creates a no-op instrument.
3131func (NopMeter ) Int64Gauge (string , ... InstrumentOption ) (Int64Gauge , error ) {
32- return nopInstrument [ int64 ]{} , nil
32+ return nopInstrumentInt64 , nil
3333}
3434
3535// Int64Histogram creates a no-op instrument.
3636func (NopMeter ) Int64Histogram (string , ... InstrumentOption ) (Int64Histogram , error ) {
37- return nopInstrument [ int64 ]{} , nil
37+ return nopInstrumentInt64 , nil
3838}
3939
4040// Int64AsyncCounter creates a no-op instrument.
4141func (NopMeter ) Int64AsyncCounter (string , Int64Callback , ... InstrumentOption ) (AsyncInstrument , error ) {
42- return nopInstrument [ int64 ]{} , nil
42+ return nopInstrumentInt64 , nil
4343}
4444
4545// Int64AsyncUpDownCounter creates a no-op instrument.
4646func (NopMeter ) Int64AsyncUpDownCounter (string , Int64Callback , ... InstrumentOption ) (AsyncInstrument , error ) {
47- return nopInstrument [ int64 ]{} , nil
47+ return nopInstrumentInt64 , nil
4848}
4949
5050// Int64AsyncGauge creates a no-op instrument.
5151func (NopMeter ) Int64AsyncGauge (string , Int64Callback , ... InstrumentOption ) (AsyncInstrument , error ) {
52- return nopInstrument [ int64 ]{} , nil
52+ return nopInstrumentInt64 , nil
5353}
5454
5555// Float64Counter creates a no-op instrument.
5656func (NopMeter ) Float64Counter (string , ... InstrumentOption ) (Float64Counter , error ) {
57- return nopInstrument [ float64 ]{} , nil
57+ return nopInstrumentFloat64 , nil
5858}
5959
6060// Float64UpDownCounter creates a no-op instrument.
6161func (NopMeter ) Float64UpDownCounter (string , ... InstrumentOption ) (Float64UpDownCounter , error ) {
62- return nopInstrument [ float64 ]{} , nil
62+ return nopInstrumentFloat64 , nil
6363}
6464
6565// Float64Gauge creates a no-op instrument.
6666func (NopMeter ) Float64Gauge (string , ... InstrumentOption ) (Float64Gauge , error ) {
67- return nopInstrument [ float64 ]{} , nil
67+ return nopInstrumentFloat64 , nil
6868}
6969
7070// Float64Histogram creates a no-op instrument.
7171func (NopMeter ) Float64Histogram (string , ... InstrumentOption ) (Float64Histogram , error ) {
72- return nopInstrument [ float64 ]{} , nil
72+ return nopInstrumentFloat64 , nil
7373}
7474
7575// Float64AsyncCounter creates a no-op instrument.
7676func (NopMeter ) Float64AsyncCounter (string , Float64Callback , ... InstrumentOption ) (AsyncInstrument , error ) {
77- return nopInstrument [ float64 ]{} , nil
77+ return nopInstrumentFloat64 , nil
7878}
7979
8080// Float64AsyncUpDownCounter creates a no-op instrument.
8181func (NopMeter ) Float64AsyncUpDownCounter (string , Float64Callback , ... InstrumentOption ) (AsyncInstrument , error ) {
82- return nopInstrument [ float64 ]{} , nil
82+ return nopInstrumentFloat64 , nil
8383}
8484
8585// Float64AsyncGauge creates a no-op instrument.
8686func (NopMeter ) Float64AsyncGauge (string , Float64Callback , ... InstrumentOption ) (AsyncInstrument , error ) {
87- return nopInstrument [ float64 ]{} , nil
87+ return nopInstrumentFloat64 , nil
8888}
8989
9090type nopInstrument [N any ] struct {}
@@ -93,3 +93,6 @@ func (nopInstrument[N]) Add(context.Context, N, ...RecordMetricOption) {}
9393func (nopInstrument [N ]) Sample (context.Context , N , ... RecordMetricOption ) {}
9494func (nopInstrument [N ]) Record (context.Context , N , ... RecordMetricOption ) {}
9595func (nopInstrument [_ ]) Stop () {}
96+
97+ var nopInstrumentInt64 = nopInstrument [int64 ]{}
98+ var nopInstrumentFloat64 = nopInstrument [float64 ]{}
0 commit comments