Sentry

object Sentry

Sentry Kotlin Multiplatform SDK API entry point.

Functions

Link copied to clipboard
fun addBreadcrumb(breadcrumb: Breadcrumb)

Adds a breadcrumb to the current Scope.

Link copied to clipboard
fun Sentry.captureError(error: NSError)
Link copied to clipboard
fun captureException(throwable: Throwable, scopeCallback: ScopeCallback): SentryId

Captures the exception.

Link copied to clipboard
fun Sentry.captureException(exception: NSException)
Link copied to clipboard

Captures the message.

fun captureMessage(message: String, scopeCallback: ScopeCallback): SentryId

Captures the exception.

Link copied to clipboard

Captures a manually created user feedback and sends it to Sentry.

Link copied to clipboard
fun close()

Closes the SDK.

Link copied to clipboard
fun configureScope(scopeCallback: ScopeCallback)

Configures the scope through the callback.

Link copied to clipboard
fun crash()

Throws a RuntimeException, useful for testing.

Link copied to clipboard
fun init(configuration: OptionsConfiguration)

Sentry initialization with an option configuration handler. This is a convenience init for direct initialization on Apple platforms.

fun init(context: Context, configuration: OptionsConfiguration)

Sentry initialization with an option configuration handler.

Link copied to clipboard

Sentry initialization with an option configuration handler for platform options.

Link copied to clipboard

Returns true if the app crashed during last run.

Link copied to clipboard

Checks if the SDK is enabled.

Link copied to clipboard
fun setUser(user: User?)

Sets the user to the current scope.

Properties

Link copied to clipboard

The Sentry logger API for sending structured logs.