CouchbaseLiteIntegration class final

A Sentry Integration that integrates CBL Dart with Sentry.

Logging

CBL Dart emits log messages that can be used to record Sentry breadcrumbs. Messages at breadcrumbLogLevel level or higher will be recorded as breadcrumbs. LogLevel.none disables all recording of logging breadcrumbs. The default is LogLevel.warning.

This integration configures Database.log.custom to use a BreadcrumbLogger, which can also be used by itself.

Operations

CBL Dart has support for tracing of operations through the TracingDelegate API. This integration configures a TracingDelegate to record Sentry breadcrumbs and transaction spans for TracedOperations.

For TracedOperations that signify a direct interaction with the CBL Dart API a breadcrumb is recorded at their start. This means that internal operations are not recorded as breadcrumbs.

Recording of these types of breadcrumbs is enabled by default and can be disabled by setting operationBreadcrumbs to false.

Transaction spans

Sentry transaction spans for TracedOperations are recorded if a parent span is available though Sentry.getSpan or cblSentrySpan, when the operation is executed.

Tracing of operations is by default enabled if Sentry has been configured for tracing. This can be overridden by setting tracingEnabled.

Whether or not internal operations are traced is controlled by the traceInternalOperations option (defaults to false).

Constructors

CouchbaseLiteIntegration({bool? tracingEnabled, bool traceInternalOperations = false, bool operationBreadcrumbs = true, LogLevel breadcrumbLogLevel = LogLevel.warning})
Creates a Sentry Integration that integrates CBL Dart with Sentry.

Properties

The log level at which Couchbase Lite logs are added as Sentry breadcrumbs.
final
hashCode int
The hash code for this object.
no setterinherited
operationBreadcrumbs bool
Whether to record breadcrumbs for direct interactions with the CBL Dart API.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
traceInternalOperations bool
Whether to trace internal operations.
final
tracingEnabled bool?
Whether tracing of Couchbase Lite operations is enabled.
final

Methods

call(Hub hub, SentryOptions options) FutureOr<void>
A Callable method for the Integration interface
close() FutureOr<void>
NoOp by default : only closeable integrations need to override
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