Sentry class
Sentry SDK main entry point
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
- currentHub → Hub
-
no setter
- isEnabled → bool
-
Check if the current Hub is enabled/active.
no setter
- lastEventId → SentryId
-
Last event id recorded by the current Hub
no setter
Static Methods
-
addBreadcrumb(
Breadcrumb crumb, {Hint? hint}) → Future< void> - Adds a breadcrumb to the current Scope
-
bindClient(
SentryClient client) → void - Binds a different client to the current hub
-
captureEvent(
SentryEvent event, {dynamic stackTrace, Hint? hint, ScopeCallback? withScope}) → Future< SentryId> -
Reports an
event
to Sentry.io. -
captureException(
dynamic throwable, {dynamic stackTrace, Hint? hint, ScopeCallback? withScope}) → Future< SentryId> -
Reports the
throwable
and optionally itsstackTrace
to Sentry.io. -
captureFeedback(
SentryFeedback feedback, {Hint? hint, ScopeCallback? withScope}) → Future< SentryId> - Reports SentryFeedback to Sentry.io.
-
captureMessage(
String? message, {SentryLevel? level = SentryLevel.info, String? template, List? params, Hint? hint, ScopeCallback? withScope}) → Future< SentryId> -
Reports a
message
to Sentry.io. -
captureUserFeedback(
SentryUserFeedback userFeedback) → Future< void> -
Reports a
userFeedback
to Sentry.io. -
clone(
) → Hub - Clones the current Hub
-
close(
) → Future< void> - Close the client SDK
-
configureScope(
ScopeCallback callback) → FutureOr< void> - Configures the scope through the callback.
-
getSpan(
) → ISentrySpan? - Gets the current active transaction or span bound to the scope.
-
init(
OptionsConfiguration optionsConfiguration, {AppRunner? appRunner, bool callAppRunnerInRunZonedGuarded = true, RunZonedGuardedOnError? runZonedGuardedOnError, SentryOptions? options}) → Future< void> -
Initializes the SDK
passing a AppRunner callback allows to run the app within its own error
zone (
runZonedGuarded
) -
metrics(
) → MetricsApi - Gets access to the metrics API for the current hub.
-
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.