APICounter<T extends num> class

APICounter is a synchronous Instrument which supports non-negative increments.

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

Constructors

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

Properties

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