buildMetricsRecorder function
Implementation
@pragma('vm:prefer-inline')
MetricsRecorder buildMetricsRecorder(String? channelId) {
if (!kMetrics ||
!MetricsConfig.enabled ||
channelId == null ||
channelId.isEmpty) {
return const NoopMetricsRecorder();
}
final m = MetricsRegistry().attach(channelId);
return ActiveMetricsRecorder(m);
}