getMetricsSummary method
Get metrics summary
Implementation
Map<String, dynamic> getMetricsSummary() {
final counters = _metricStates.values.where((s) => s.type == MetricType.counter).length;
final gauges = _metricStates.values.where((s) => s.type == MetricType.gauge).length;
final histograms = _metricStates.values.where((s) => s.type == MetricType.histogram).length;
return {
'total_metrics': _metricStates.length,
'active_histogram_timers': _histogramTimers.length,
'counters': counters,
'gauges': gauges,
'histograms': histograms,
'is_initialized': _isInitialized,
'current_session_id': _currentSessionId,
'metric_keys': _metricStates.keys.toList(),
'histogram_timer_keys': _histogramTimers.keys.toList(),
};
}