Migrating Version 5.x to 6.0

Learn about migrating from version 5.x to 6.0.0

  • Kotlin plugin is upgraded to 1.5.

  • Kotlin languageVersion is upgraded to 1.4.

  • Gson is removed as a transitive dependency and vendored in the SDK.

    • Protocol classes now implement the JsonSerializable and JsonDeserializer interfaces.
  • Spring Boot has been upgraded to 2.5.13

  • SentryOptions#shutdownTimeout is renamed to shutdownTimeoutMillis.

  • Removed @Deprecated and @ApiStatus.ScheduledForRemoval methods

    • ITransaction#setRequest
    • ITransaction#getRequest
    • ITransaction#getContexts
    • SentryBaseEvent#getOriginThrowable
    • SentryOptions#getCacheDirSize
    • SentryOptions#setCacheDirSize
    • SentryOptions#isEnableSessionTracking
    • SentryOptions#setEnableSessionTracking
    • sentry.enable-tracing property
    • SentrySpringRequestListener, SentrySpringFilter is used instead.
    • SentryUserProviderEventProcessor, please use SentryUserProvider instead.
  • SentryOptions#enableScopeSync is now enabled by default.

  • ISpan now has higher precision using the System#nanoTime instead of milliseconds.

  • TransactionNameProvider is now an interface and SpringMvcTransactionNameProvider is the default implementation.

  • Hints changed its type from Object to io.sentry.Hint


Sentry.captureException(RuntimeException("exception"), "myStringHint")


val hints = mutableMapOf<String, Any>("myHint" to "myStringHint")
Sentry.captureException(RuntimeException("exception"), hints)

  • Starting with version 6.0.0 of sentry, Sentry's version >= v21.9.0 is required or you have to manually disable sending client reports via the sendClientReports option. This only applies to self-hosted Sentry. If you are using sentry.io, no action is needed.

There are more changes and refactors, but they are not user breaking changes.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").