Metric class

Represents a metric value collected during operations.

Metrics can be counters, gauges, or histograms.

Constructors

Metric({required String name, required double value, required String unit, required DateTime timestamp, Map<String, String> attributes = const {}})
const

Properties

attributes Map<String, String>
Additional attributes for filtering (e.g., connection_id, sql_hash).
final
hashCode int
The hash code for this object.
no setterinherited
name String
Name of the metric (e.g., "odbc.query.count", "odbc.pool.size").
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp DateTime
Timestamp when metric was recorded.
final
unit String
Unit of measurement (e.g., "ms", "count", "bytes").
final
value double
Value of the metric.
final

Methods

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

Operators

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