Skip to content

Commit

Permalink
Merge branch 'main' into rm-observe-method
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias authored Jan 19, 2023
2 parents c9f0fb5 + b1a8002 commit 1a0370d
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 1a0370d

Please sign in to comment.