SDKObservableInstrument class abstract

An SDK asynchronous instrument that can receive observations from a batch callback registered with Meter.registerBatchCallback.

A batch callback runs once per collection, before the instruments it covers collect. Its observations are queued here and drained by the instrument's own collect(), after the instrument's single-instrument callbacks, so both sources land in the same collection cycle.

Implemented types

Constructors

SDKObservableInstrument()

Properties

description → String?
The description of the instrument
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
meter → APIMeter
The meter that created this instrument
no setterinherited
name → String
The name of the instrument
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unit → String?
The unit of the instrument
no setterinherited

Methods

collectMetrics() → List<Metric>
Collects metrics from this instrument
inherited
isEnabled() → bool
Whether the instrument is enabled
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observeFromBatch(num value, Attributes? attributes) → void
Queues a measurement observed by a batch callback for the next collection. The value is converted to the instrument's numeric type.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited