createHttpTrace method
Implementation
@override
Future<SentryHttpMetric> createHttpTrace({
required String name,
required String url,
required MonitoringHttpMethod method,
}) async {
if (!isReady) {
logger.warning(this, '$providerName: Sentry is not initialized');
throw Exception('$providerName: Sentry is not initialized');
}
logger.debug(this, 'Creating Http Metric:$name');
SentryHttpMetric metric = SentryHttpMetric(
name: name,
url: url,
method: method,
);
await metric.initialize(
autoStart: true,
canTrace: (settings?.mode == TraceMode.httpOnly ||
settings?.mode == TraceMode.both),
);
return metric;
}