MetricsConfig class final
Global metrics configuration (lightweight singleton pattern).
Controls channel metrics collection and export behavior. Use this to enable/disable metrics globally and configure sampling rates.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Properties
- enabled ↔ bool
-
Master switch to enable/disable all metrics collection.
getter/setter pair
- exporter ↔ MetricsExporter
-
Metrics exporter for processing collected metrics.
Defaults to NoopExporter which discards all metrics.
getter/setter pair
- sampleLatency ↔ bool
-
Whether to measure latencies for channel operations (tryRecv/recv/send).
Latency sampling may have overhead but can be disabled if not needed.
getter/setter pair
- sampleRate ↔ double
-
Sample rate for metrics collection (0.0 to 1.0).
Example: 0.01 = 1% of operations are sampled.
getter/setter pair