From b1a8002c4cf565fc7fa79de7239dbc593c3f6ec2 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Thu, 19 Jan 2023 10:44:37 -0800 Subject: [PATCH] Remove stale comments from metric global (#3603) The Observe is not used to record measurements following #3584. --- metric/internal/global/meter.go | 3 --- metric/internal/global/meter_types_test.go | 3 --- 2 files changed, 6 deletions(-) diff --git a/metric/internal/global/meter.go b/metric/internal/global/meter.go index 92f35e973..8acf63286 100644 --- a/metric/internal/global/meter.go +++ b/metric/internal/global/meter.go @@ -275,9 +275,6 @@ func (m *meter) Float64ObservableGauge(name string, options ...instrument.Float6 } // RegisterCallback captures the function that will be called during Collect. -// -// It is only valid to call Observe within the scope of the passed function, -// and only on the instruments that were registered with this call. func (m *meter) RegisterCallback(f metric.Callback, insts ...instrument.Asynchronous) (metric.Registration, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { insts = unwrapInstruments(insts) diff --git a/metric/internal/global/meter_types_test.go b/metric/internal/global/meter_types_test.go index e32fcdc0f..84637b286 100644 --- a/metric/internal/global/meter_types_test.go +++ b/metric/internal/global/meter_types_test.go @@ -113,9 +113,6 @@ func (m *testMeter) Float64ObservableGauge(name string, options ...instrument.Fl } // RegisterCallback captures the function that will be called during Collect. -// -// It is only valid to call Observe within the scope of the passed function, -// and only on the instruments that were registered with this call. func (m *testMeter) RegisterCallback(f metric.Callback, i ...instrument.Asynchronous) (metric.Registration, error) { m.callbacks = append(m.callbacks, f) return testReg{