MetricsController class
Controller for metrics tracking and management Handles counters, gauges, histograms, and custom metrics
Properties
-
activeHistogramTimers
→ Map<
String, int> -
Get all active histogram timers
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInitialized → bool
-
Whether the controller is initialized
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - Dispose and cleanup
-
endHistogramTimer(
String key, String? fbl, String? operation, String? view, String? state, {int? timestamp}) → Future< void> - End a histogram timer and generate metric event
-
generateCrashMetric(
DateTime crashTimestamp) → Future< void> - Generate a crash metric using the same timestamp as the crash event Uses current session values for fbl, operation, and view (with automatic fallbacks)
-
getMetricsSummary(
) → Map< String, dynamic> - Get metrics summary
-
getMetricState(
String key, String fbl, String operation, String view) → MetricState? - Get metric state for debugging
-
incCounter(
String key, String fbl, String operation, String view, String state, {int? date, int increment = 1}) → Future< void> - Increment a counter metric
-
initialize(
{required ObslyHub hub}) → void - Initialize metrics controller
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setGauge(
String key, num value, {String fbl = '', String operation = '', String view = '', String state = 'occurred', int? timestamp}) → Future< void> - Set a gauge metric value
-
startHistogramTimer(
String key, String? fbl, String? operation, String? view, {int? timestamp}) → void - Start a histogram timer (only stores timestamp, no event generated)
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → MetricsController
-
no setter