json method

Future<Map<String, dynamic>> json({
  1. Map<String, String>? globalLabels,
})

Returns all metrics gathered up to this point in json format.

Implementation

Future<Map<String, dynamic>> json({Map<String, String>? globalLabels}) async {
  final result = await _engine.metrics(
      globalLabels: globalLabels, format: MetricsFormat.json);

  return result as Map<String, dynamic>;
}