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
languageVersionis upgraded to1.4.Gsonis removed as a transitive dependency and vendored in the SDK.- Protocol classes now implement the
JsonSerializableandJsonDeserializerinterfaces.
- Protocol classes now implement the
Spring Boot has been upgraded to
2.5.13SentryOptions#shutdownTimeoutis renamed toshutdownTimeoutMillis.Removed
@Deprecatedand@ApiStatus.ScheduledForRemovalmethodsITransaction#setRequestITransaction#getRequestITransaction#getContextsSentryBaseEvent#getOriginThrowableSentryOptions#getCacheDirSizeSentryOptions#setCacheDirSizeSentryOptions#isEnableSessionTrackingSentryOptions#setEnableSessionTrackingsentry.enable-tracingpropertySentrySpringRequestListener,SentrySpringFilteris used instead.SentryUserProviderEventProcessor, please useSentryUserProviderinstead.
SentryOptions#enableScopeSyncis now enabled by default.ISpannow has higher precision using theSystem#nanoTimeinstead of milliseconds.TransactionNameProvideris now an interface andSpringMvcTransactionNameProvideris the default implementation.Hints changed its type from
Objecttoio.sentry.Hint
Old:
Copied
Sentry.captureException(RuntimeException("exception"), "myStringHint")
New:
Copied
val hints = mutableMapOf<String, Any>("myHint" to "myStringHint")
Sentry.captureException(RuntimeException("exception"), hints)
SentryOptions#sendClientReportsis now enabled by default. To disable it, see sendClientReports. For more information on the option see sendClientReports.
- Starting with version
6.0.0ofsentry, Sentry's version >= v21.9.0 is required or you have to manually disable sending client reports via thesendClientReportsoption. 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").
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").