Migrating Version 6.x to 7.0
Learn about migrating from version 6.x to 7.0.0
- The
sentry-android-okhttpclasses were deprecated in favor ofsentry-okhttp, which is a pure Java module and can be used in non-Android projects. Check the OkHttp Integration documentation to see how to use it.- The
SentryOkHttpUtilsclass was removed from the public API. If you were using it, consider filing a feature request.
- The
- If you're using
sentry-kotlin-extensions, it now requireskotlinx-coroutines-coreversion1.6.1or higher. - Changed the return type of
SentryApolloInterceptor.BeforeSpanCallbackfromISpantoISpan?. Scopenow implements theIScopeinterface, therefore some methods likeScopeCallback.runacceptIScopenow.- Some
Sentry.startTransactionoverloads do not exist anymore, and instead, you can set old options by passing aTransactionOptionsobject in.
For example:
Copied
// old
val transaction = Sentry.startTransaction("name", "op", bindToScope = true)
// new
val transaction = Sentry.startTransaction("name", "op", TransactionOptions().apply { isBindToScope = true })
- The SDK now captures failed HTTP and GraphQL (Apollo) requests by default.
- This can increase your event consumption and may affect your quota, because the SDK will report failed network requests as Sentry events if you're using the
sentry-okhttporsentry-apollo-3integrations by default. You can customize what errors you want/don't want to have reported for OkHttp and Apollo3 respectively.
- This can increase your event consumption and may affect your quota, because the SDK will report failed network requests as Sentry events if you're using the
- The SDK now sets
ip_addressto {{auto}} by default, even if sendDefaultPII is disabled.- We recommend you instead use the "Prevent Storing of IP Addresses" option in the "Security & Privacy" project settings on sentry.io.
- The
maxSpanssetting (defaults to 1000) is now enforced for nested child spans. This means a single transaction can havemaxSpansnumber of children (nested or not) at most.
- Starting with version
7.0.0of the SDK, Sentry's version >= v22.12.0 is required to properly ingest transactions with unfinished spans. This only applies to self-hosted Sentry. If you are using sentry.io, no action is needed.
Was this helpful?
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").