Skip to content

Commit

Permalink
Remove stale comments from metric global
Browse files Browse the repository at this point in the history
The Observe is not used to record measurements following open-telemetry#3584.
  • Loading branch information
MrAlias committed Jan 19, 2023
1 parent 69b18e6 commit 5a379bb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions metric/internal/global/meter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions metric/internal/global/meter_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 5a379bb

Please sign in to comment.