Migrating Version 5.x to 6.0
Kotlin plugin is upgraded to
1.5
.Kotlin
languageVersion
is upgraded to1.4
.Gson
is removed as a transitive dependency and vendored in the SDK.- Protocol classes now implement the
JsonSerializable
andJsonDeserializer
interfaces.
- Protocol classes now implement the
Spring Boot has been upgraded to
2.5.13
SentryOptions#shutdownTimeout
is renamed toshutdownTimeoutMillis
.Removed
@Deprecated
and@ApiStatus.ScheduledForRemoval
methodsITransaction#setRequest
ITransaction#getRequest
ITransaction#getContexts
SentryBaseEvent#getOriginThrowable
SentryOptions#getCacheDirSize
SentryOptions#setCacheDirSize
SentryOptions#isEnableSessionTracking
SentryOptions#setEnableSessionTracking
sentry.enable-tracing
propertySentrySpringRequestListener
,SentrySpringFilter
is used instead.SentryUserProviderEventProcessor
, please useSentryUserProvider
instead.
SentryOptions#enableScopeSync
is now enabled by default.ISpan
now has higher precision using theSystem#nanoTime
instead of milliseconds.TransactionNameProvider
is now an interface andSpringMvcTransactionNameProvider
is the default implementation.Hints changed its type from
Object
toio.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#sendClientReports
is now enabled by default. To disable it, see sendClientReports. For more information on the option see sendClientReports.
- Starting with version
6.0.0
ofsentry
, Sentry's version >= v21.9.0 is required or you have to manually disable sending client reports via thesendClientReports
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").
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").
- Package:
- maven:io.sentry:sentry
- Version:
- 7.8.0
- Repository:
- https://github.com/getsentry/sentry-java
- API Documentation:
- https://javadoc.io/doc/io.sentry