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
- metricsAggregator → MetricsAggregator?
-
no setter
- metricsApi → MetricsApi
-
no setter
- options → SentryOptions
-
no setter
- profilerFactory ↔ SentryProfilerFactory?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scope → Scope
-
no setter
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.
-
captureMetrics(
Map< int, Iterable< metricsBuckets) → Future<Metric> >SentryId> -
captureTransaction(
SentryTransaction transaction, {SentryTraceContextHeader? traceContext}) → Future< SentryId> -
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
-
setSpanContext(
dynamic throwable, ISentrySpan span, String transaction) → void -
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