APIUpDownCounter<T extends num> class

APIUpDownCounter is a synchronous Instrument which supports increments and decrements.

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

Constructors

APIUpDownCounter.new(String _name, String? _description, String? _unit, bool _enabled, APIMeter _meter)
Creates a new APIUpDownCounter instrument.

Properties

description String?
Returns the description of this UpDownCounter.
no setter
enabled bool
Returns whether this counter is enabled.
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 false since this is not a Gauge instrument.
no setter
isHistogram bool
Returns false since this is not a Histogram instrument.
no setter
isUpDownCounter bool
Returns true since this is an UpDownCounter instrument.
no setter
meter APIMeter
Returns the meter that created this counter.
no setter
name String
Returns the name of this UpDownCounter.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unit String?
Returns the unit of this UpDownCounter.
no setter

Methods

add(T value, [Attributes? attributes]) → void
Adds a value to the counter's sum.
addWithMap(T value, Map<String, Object> attributeMap) → void
Adds a value to the counter's sum using a map of attributes.
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