chore(deps): update Java SDK to v7.0.0 #2932
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bumps scripts/update-java.ps1 from 6.34.0 to 7.0.0.
Auto-generated by a dependency updater.
Changelog
7.0.0
Version 7 of the Sentry Android/Java SDK brings a variety of features and fixes. The most notable changes are:
minSdk
level to 19 (Android 4.4)Sentry.getSpan
now returns the root transaction, which should improve the span hierarchy and make it leanersentry-okhttp
artifact is unbundled from Android and can be used in pure JVM-only appsSentry Self-hosted Compatibility
This SDK version is compatible with a self-hosted version of Sentry
22.12.0
or higher. If you are using an older version of self-hosted Sentry (aka onpremise), you will need to upgrade. If you're usingsentry.io
no action is required.Sentry Integrations Version Compatibility (Android)
Make sure to align all Sentry dependencies to the same version when bumping the SDK to 7.+, otherwise it will crash at runtime due to binary incompatibility. (E.g. if you're using
-timber
,-okhttp
or other packages)For example, if you're using the Sentry Android Gradle plugin with the
autoInstallation
feature (enabled by default), make sure to use version 4.+ of the gradle plugin together with version 7.+ of the SDK. If you can't do that for some reason, you can specify sentry version via the plugin config block:sentry { autoInstallation { sentryVersion.set("7.0.0") } }
Similarly, if you have a Sentry SDK (e.g.
sentry-android-core
) dependency on one of your Gradle modules and you're updating it to 7.+, make sure the Gradle plugin is at 4.+ or specify the SDK version as shown in the snippet above.Breaking Changes
sentry-kotlin-extensions
, it requireskotlinx-coroutines-core
version1.6.1
or higher now (#2838)SentryOkHttpUtils
was removed from public API as it's been exposed by mistake (#3005)Scope
now implements theIScope
interface, therefore some methods likeScopeCallback.run
acceptIScope
now (#3066)startTransaction
overloads (#2964)TransactionOptions
object instead of having separate parameters for certain optionsTransactionOptions
has defaults set and can be customized, for example:Behavioural Changes
Sentry.getSpan()
returns the root span/transaction instead of the latest span (#2855)sentry-android-okhttp
orsentry-apollo-3
integrations. You can customize what errors you want/don't want to have reported for OkHttp and Apollo3 respectively.onResume
(#2851)deadline_exceeded
when reaching the deadlinesendDefaultPii
if anencoder
has been configured (#2976)maxSpans
setting (defaults to 1000) is enforced for nested child spans which means a single transaction can havemaxSpans
number of children (nested or not) at most (#3065)ScopeCallback
inwithScope
is now always executed (#3066)Deprecations
sentry-android-okhttp
was deprecated in favour of the newsentry-okhttp
module. Make sure to replaceio.sentry.android.okhttp
package name withio.sentry.okhttp
before the next major, where the classes will be removed (#3005)Other Changes
Features
SendCachedEnvelopeIntegration
SendCachedEnvelopeFireAndForgetIntegration
as mentioned in https://docs.sentry.io/platforms/java/configuration/#configuring-offline-caching and provide your own implementation ofIConnectionStatusProvider
viaSentryOptions
sentry-okhttp
module to support instrumenting OkHttp in non-Android projects (#3005)Fixes
getMyMemoryState()
instead ofgetRunningAppProcesses()
to retrieve process importance (#3004)aborted
in case a crash happens (#2938)default
interface methods to proper implementations in each interface implementor (#2847)SentryOkHttpInterceptor.BeforeSpanCallback
was not finishing span when it was dropped (#2958)