Hub class

SDK API contract which combines a client and scope management

Implementers

Constructors

Hub(SentryOptions options)
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
isEnabled → bool
Check if the Hub is enabled/active.
no setter
lastEventId → SentryId
Last event id recorded by the Hub
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addBreadcrumb(Breadcrumb crumb, {Hint? hint}) → Future<void>
Adds a breacrumb to the current Scope
bindClient(SentryClient client) → void
Binds a different client to the hub
captureEvent(SentryEvent event, {dynamic stackTrace, Hint? hint, ScopeCallback? withScope}) → Future<SentryId>
Captures the event.
captureException(dynamic throwable, {dynamic stackTrace, Hint? hint, ScopeCallback? withScope}) → Future<SentryId>
Captures the exception
captureFeedback(SentryFeedback feedback, {Hint? hint, ScopeCallback? withScope}) → Future<SentryId>
Captures the feedback.
captureMessage(String? message, {SentryLevel? level, String? template, List? params, Hint? hint, ScopeCallback? withScope}) → Future<SentryId>
Captures the message.
captureUserFeedback(SentryUserFeedback userFeedback) → Future<void>
clone() → Hub
Clones the Hub
close() → Future<void>
Flushes out the queue for up to timeout seconds and disable the Hub.
configureScope(ScopeCallback callback) → FutureOr<void>
Configures the scope through the callback.
getSpan() → ISentrySpan?
Gets the current active transaction or span.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startTransaction(String name, String operation, {String? description, DateTime? startTimestamp, bool? bindToScope, bool? waitForChildren, Duration? autoFinishAfter, bool? trimEnd, OnTransactionFinish? onFinish, Map<String, dynamic>? customSamplingContext}) → ISentrySpan
Creates a Transaction and returns the instance.
startTransactionWithContext(SentryTransactionContext transactionContext, {Map<String, dynamic>? customSamplingContext, DateTime? startTimestamp, bool? bindToScope, bool? waitForChildren, Duration? autoFinishAfter, bool? trimEnd, OnTransactionFinish? onFinish}) → ISentrySpan
Creates a Transaction and returns the instance.
toString() → String
A string representation of this object.
inherited

Operators

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