Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidAsyncRunner = errors.New("unknown async runner type")
Functions ¶
This section is empty.
Types ¶
type AsyncCollector ¶
type AsyncCollector interface { // CollectAsync passes a batch of observations to the MeterImpl. CollectAsync(labels []attribute.KeyValue, observation ...sdkapi.Observation) }
AsyncCollector is an interface used between the MeterImpl and the AsyncInstrumentState helper below. This interface is implemented by the SDK to provide support for running observer callbacks.
type AsyncInstrumentState ¶
type AsyncInstrumentState struct {
// contains filtered or unexported fields
}
AsyncInstrumentState manages an ordered set of asynchronous instruments and the distinct runners, taking into account batch observer callbacks.
func NewAsyncInstrumentState ¶
func NewAsyncInstrumentState() *AsyncInstrumentState
NewAsyncInstrumentState returns a new *AsyncInstrumentState, for use by MeterImpl to manage running the set of observer callbacks in the correct order.
func (*AsyncInstrumentState) Instruments ¶
func (a *AsyncInstrumentState) Instruments() []sdkapi.AsyncImpl
Instruments returns the asynchronous instruments managed by this object, the set that should be checkpointed after observers are run.
func (*AsyncInstrumentState) Register ¶
func (a *AsyncInstrumentState) Register(inst sdkapi.AsyncImpl, runner sdkapi.AsyncRunner)
Register adds a new asynchronous instrument to by managed by this object. This should be called during NewAsyncInstrument() and assumes that errors (e.g., duplicate registration) have already been checked.
func (*AsyncInstrumentState) Run ¶
func (a *AsyncInstrumentState) Run(ctx context.Context, collector AsyncCollector)
Run executes the complete set of observer callbacks.
Directories
¶
Path | Synopsis |
---|---|
Package registry provides a non-standalone implementation of MeterProvider that adds uniqueness checking for instrument descriptors on top of other MeterProvider it wraps.
|
Package registry provides a non-standalone implementation of MeterProvider that adds uniqueness checking for instrument descriptors on top of other MeterProvider it wraps. |