captureException static method
Manually captures an exception with structured context and stack trace.
Returns the generated BloomTelemetryEvent if captured, or null if dropped by sampling or beforeSend.
Example:
try {
await syncData();
} catch (e, stack) {
await Bloom.captureException(e, stackTrace: stack);
}
Implementation
static Future<BloomTelemetryEvent?> captureException(
dynamic exception, {
dynamic stackTrace,
Map<String, dynamic>? context,
List<String>? fingerprint,
String? exceptionType,
BloomErrorLevel level = BloomErrorLevel.error,
}) {
return BloomObservability.captureException(
exception,
stackTrace: stackTrace,
context: context,
fingerprint: fingerprint,
exceptionType: exceptionType,
level: level,
);
}