BloomObservability class

Core Error Observability, Crash Reporting, and Telemetry Engine for Bloom.

Automatically hooks Flutter error handlers and provides manual APIs to record breadcrumbs, capture exceptions, and dispatch telemetry payloads.

Example:

await BloomObservability.initialize(
  BloomObservabilityConfig(
    transport: BloomHttpTelemetryTransport(endpoint: myUri),
  ),
);

BloomObservability.addBreadcrumb(
  category: 'auth',
  message: 'User logged in',
);

Constructors

BloomObservability()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

Current chronological list of recorded breadcrumbs.
no setter
config BloomObservabilityConfig
The active configuration.
no setter
isInitialized bool
Whether observability is actively initialized and enabled.
no setter
nativeChannel MethodChannel
Method channel for native crash bridge (used for testing or custom native hooks).
no setter

Static Methods

addBreadcrumb({required String category, required String message, BloomBreadcrumbLevel level = BloomBreadcrumbLevel.info, Map<String, dynamic>? data}) → void
Records a new breadcrumb in the in-memory timeline.
captureException(dynamic exception, {dynamic stackTrace, Map<String, dynamic>? context, List<String>? fingerprint, String? exceptionType, BloomErrorLevel level = BloomErrorLevel.error}) Future<BloomTelemetryEvent?>
Captures a handled or unhandled exception with context and breadcrumbs.
captureMessage(String message, {BloomErrorLevel level = BloomErrorLevel.info, Map<String, dynamic>? context, List<String>? fingerprint}) Future<BloomTelemetryEvent?>
Captures a structured log message as a telemetry event.
clearBreadcrumbs() → void
Clears in-memory breadcrumbs.
initialize(BloomObservabilityConfig config) Future<void>
Initializes the observability pipeline and attaches automated error hooks.
reset() Future<void>
Resets the observability subsystem and restores original error handlers.