You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Define a Callback type in that file that takes the place of func(context.Context). Document that type with pertinent information, including the OTel required information. For example,
typeMeterinterface {
// ...RegisterCallback(instruments []instrument.Asynchronous, fCallback) (Registration, error)
}
// Callback is a function registered with a Meter that makes observations for// the set of instruments it is registered with.//// The function needs to complete in a finite amount of time and the deadline// of the passed context is expected to be honored.//// The function needs to make unique observations across all registered// callbacks. It should not report duplicate measurements for an instruments// with the same attributes as another Callback.//// The function needs to be concurrent safe.typeCallbackfunc(context.Context)
The text was updated successfully, but these errors were encountered:
The OpenTelemetry specification states:
Currently the callback passed to a
Meter'
sRegisterCallback
method is not documented as such:opentelemetry-go/metric/meter.go
Lines 98 to 109 in efd8a7d
Proposal
Define a
Callback
type in that file that takes the place offunc(context.Context)
. Document that type with pertinent information, including the OTel required information. For example,The text was updated successfully, but these errors were encountered: