captureMetrics method

Future<SentryId> captureMetrics(
  1. Map<int, Iterable<Metric>> metricsBuckets
)

Reports the metricsBuckets to Sentry.io.

Implementation

Future<SentryId> captureMetrics(
    Map<int, Iterable<Metric>> metricsBuckets) async {
  final envelope = SentryEnvelope.fromMetrics(
    metricsBuckets,
    _options.sdk,
    dsn: _options.dsn,
  );
  final id = await _attachClientReportsAndSend(envelope);
  return id ?? SentryId.empty();
}