APIGauge<T extends num> class

APIGauge is a synchronous Instrument which reports instantaneous measurements.

See the OpenTelemetry specification for more details: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#gauge

All methods of this class are safe for concurrent use by default: implementations must remain correct when methods are invoked from interleaved asynchronous tasks within an isolate. See Metrics API, concurrency requirements.

Constructors

APIGauge(String _name, String? _description, String? _unit, APIMeter _meter, [InstrumentAdvisory? _advisory])
Creates a new APIGauge instrument.

Properties

advisory → InstrumentAdvisory?
Returns the advisory parameters of this Gauge.
no setter
description → String?
Returns the description of this Gauge.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isCounter → bool
Type identification getters Returns false since this is not a Counter instrument.
no setter
isGauge → bool
Returns true since this is a Gauge instrument.
no setter
isHistogram → bool
Returns false since this is not a Histogram instrument.
no setter
isUpDownCounter → bool
Returns false since this is not an UpDownCounter instrument.
no setter
meter → APIMeter
Returns the meter that created this gauge.
no setter
name → String
Returns the name of this Gauge.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unit → String?
Returns the unit of this Gauge.
no setter

Methods

isEnabled() → bool
Returns whether the instrument is enabled and will record measurements.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
record(T value, [Attributes? attributes]) → void
Records the current value of the gauge.
recordWithMap(T value, Map<String, Object> attributeMap) → void
Records a value with the given map of attributes.
toString() → String
A string representation of this object.
inherited

Operators

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