APIInstrument class

The base interface for all metric instruments.

Instruments are used to record measurements which are then aggregated into metrics. Different instrument types produce different kinds of measurements and are aggregated differently.

Constructors

APIInstrument.new({required String name, String? unit, String? description, required bool enabled, required APIMeter meter})
Creates a new instrument with the specified parameters.

Properties

description String?
A human-readable description of the instrument.
no setter
enabled bool
Returns whether the instrument is enabled and will record measurements.
no setter
hashCode int
The hash code for this object.
no setterinherited
meter APIMeter
The Meter that created this instrument.
no setter
name String
The name of the instrument, e.g., 'http.server.request_duration'. This must be unique within a Meter.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unit String?
The unit of measurement, e.g., 'ms' for milliseconds.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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