Releases: getsentry/sentry-java
7.1.0
Features
- Support multiple debug-metadata.properties (#3024)
- Automatically downsample transactions when the system is under load (#3072)
- You can opt into this behaviour by setting enable-backpressure-handling=true.
- We're happy to receive feedback, e.g. in this GitHub issue
- When the system is under load we start reducing the tracesSampleRateautomatically.
- Once the system goes back to healthy, we reset the tracesSampleRateto its original value.
 
- You can opt into this behaviour by setting 
- (Android) Experimental: Provide more detailed cold app start information (#3057)
- Attaches spans for Application, ContentProvider, and Activities to app-start timings
- Uses Process.startUptimeMillis to calculate app-start timings
- To enable this feature set options.isEnablePerformanceV2 = true
 
- Move slow+frozen frame calculation, as well as frame delay inside SentryFrameMetricsCollector (#3100)
- Extract Activity Breadcrumbs generation into own Integration (#3064)
Fixes
- Send breadcrumbs and client error in SentryOkHttpEventListenereven without transactions (#3087)
- Keep io.sentry.exception.SentryHttpClientExceptionfrom obfuscation to display proper issue title on Sentry (#3093)
- (Android) Fix wrong activity transaction duration in case SDK init is deferred (#3092)
Dependencies
7.0.0
Version 7 of the Sentry Android/Java SDK brings a variety of features and fixes. The most notable changes are:
- Bumping minSdklevel to 19 (Android 4.4)
- The SDK will now listen to connectivity changes and try to re-upload cached events when internet connection is re-established additionally to uploading events on app restart
- Sentry.getSpannow returns the root transaction, which should improve the span hierarchy and make it leaner
- Multiple improvements to reduce probability of the SDK causing ANRs
- New sentry-okhttpartifact is unbundled from Android and can be used in pure JVM-only apps- Thanks @ToppleTheNun for their contribution!
 
Sentry 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 using sentry.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
- Bump min API to 19 (#2883)
- If you're using sentry-kotlin-extensions, it requireskotlinx-coroutines-coreversion1.6.1or higher now (#2838)
- Move enableNdk from SentryOptions to SentryAndroidOptions (#2793)
- Apollo v2 BeforeSpanCallback now allows returning null (#2890)
- SentryOkHttpUtilswas removed from public API as it's been exposed by mistake (#3005)
- Scopenow implements the- IScopeinterface, therefore some methods like- ScopeCallback.runaccept- IScopenow (#3066)
- Cleanup startTransactionoverloads (#2964)- We have reduced the number of overloads by allowing to pass in a TransactionOptionsobject instead of having separate parameters for certain options
- TransactionOptionshas defaults set and can be customized, for example:
 
- We have reduced the number of overloads by allowing to pass in a 
// old
val transaction = Sentry.startTransaction("name", "op", bindToScope = true)
// new
val transaction = Sentry.startTransaction("name", "op", TransactionOptions().apply { isBindToScope = true })Behavioural Changes
- Android only: Sentry.getSpan()returns the root span/transaction instead of the latest span (#2855)
- Capture failed HTTP and GraphQL (Apollo) requests by default (#2794)
- This can increase your event consumption and may affect your quota, because we will report failed network requests as Sentry events by default, if you're using the sentry-android-okhttporsentry-apollo-3integrations. 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 we will report failed network requests as Sentry events by default, if you're using the 
- Measure AppStart time till First Draw instead of onResume(#2851)
- Automatic user interaction tracking: every click now starts a new automatic transaction (#2891)
- Previously performing a click on the same UI widget twice would keep the existing transaction running, the new behavior now better aligns with other SDKs
 
- Add deadline timeout for automatic transactions (#2865)
- This affects all automatically generated transactions on Android (UI, clicks), the default timeout is 30s, meaning the automatic transaction will be force-finished with status deadline_exceededwhen reaching the deadline
 
- This affects all automatically generated transactions on Android (UI, clicks), the default timeout is 30s, meaning the automatic transaction will be force-finished with status 
- Set ip_address to {{auto}} by default, even if sendDefaultPII is disabled (#2860)
- Instead use the "Prevent Storing of IP Addresses" option in the "Security & Privacy" project settings on sentry.io
 
- Raw logback message and parameters are now guarded by sendDefaultPiiif anencoderhas been configured (#2976)
- The maxSpanssetting (defaults to 1000) is enforced for nested child spans which means a single transaction can havemaxSpansnumber of children (nested or not) at most (#3065)
- The ScopeCallbackinwithScopeis now always executed (#3066)
Deprecations
- sentry-android-okhttpwas deprecated in favour of the new- sentry-okhttpmodule. Make sure to replace- io.sentry.android.okhttppackage name with- io.sentry.okhttpbefore the next major, where the classes will be removed (#3005)
Other Changes
Features
- Observe network state to upload any unsent envelopes (#2910)
- Android: it works out-of-the-box as part of the default SendCachedEnvelopeIntegration
- JVM: you'd have to install SendCachedEnvelopeFireAndForgetIntegrationas mentioned in https://docs.sentry.io/platforms/java/configuration/#configuring-offline-caching and provide your own implementation ofIConnectionStatusProviderviaSentryOptions
 
- Android: it works out-of-the-box as part of the default 
- Add sentry-okhttpmodule to support instrumenting OkHttp in non-Android projects (#3005)
- Do not filter out Sentry SDK frames in case of uncaught exceptions (#3021)
- Do not try to send and drop cached envelopes when rate-limiting is active (#2937)
Fixes
- Use getMyMemoryState()instead ofgetRunningAppProcesses()to retrieve process importance (#3004)- This should prevent some app stores from flagging apps as violating their privacy
 
- Reduce flush timeout to 4s on Android to avoid ANRs (#2858)
- Reduce timeout of AsyncHttpTransport to avoid ANR (#2879)
- Do not overwrite UI transaction status if set by the user (#2852)
- Capture unfinished transaction on Scope with status abortedin case a crash happens (#2938)- This will fix the link between transactions and corresponding crashes, you'll be able to see them in a single trace
 
- Fix Coroutine Context Propagation using CopyableThreadContextElement (#2838)
- Fix don't overwrite the span status of unfinished spans (#2859)
- Migrate from defaultinterface methods to proper implementations in each interface implementor (#2847)- This prevents issues when using the SDK on older AGP versions (< 4.x.x)
 
- Reduce main thread work on init (#3036)
- Move Integrations registration to background on init (#3043)
- Fix SentryOkHttpInterceptor.BeforeSpanCallbackwas not finishing span when it was dropped (#2958)
6.34.0
Features
- Add current activity name to app context (#2999)
- Add MonitorConfigparam toCheckInUtils.withCheckIn(#3038)- This makes it easier to automatically create or update (upsert) monitors.
 
- (Internal) Extract Android Profiler and Measurements for Hybrid SDKs (#3016)
- (Internal) Remove SentryOptions dependency from AndroidProfiler (#3051)
- (Internal) Add readBytesFromFilefor use in Hybrid SDKs (#3052)
- (Internal) Add getProguardUuidfor use in Hybrid SDKs (#3054)
Fixes
- Fix SIGSEV, SIGABRT and SIGBUS crashes happening after/around the August Google Play System update, see #2955 for more details (fix provided by Native SDK bump)
- Ensure DSN uses http/https protocol (#3044)
Dependencies
7.0.0-rc.2
6.33.2-beta.1
7.0.0-rc.1
Features
- Do not filter out Sentry SDK frames in case of uncaught exceptions (#3021)
Breaking changes:
- Cleanup startTransactionoverloads (#2964)- We have reduce the number of overloads by allowing to pass in TransactionOptionsinstead of having separate parameters for certain options.
- TransactionOptionshas defaults set and can be customized
 
- We have reduce the number of overloads by allowing to pass in 
- Raw logback message and parameters are now guarded by sendDefaultPiiif anencoderhas been configured (#2976)
Fixes
- Use getMyMemoryState()instead ofgetRunningAppProcesses()to retrieve process importance (#3004)- This should prevent some app stores from flagging apps as violating their privacy
 
6.33.1
6.33.0
Features
- Add thread information to spans (#2998)
- Use PixelCopy API for capturing screenshots on API level 24+ (#3008)
Fixes
- Fix crash when HTTP connection error message contains formatting symbols (#3002)
- Cap max number of stack frames to 100 to not exceed payload size limit (#3009)
- This will ensure we report errors with a big number of frames such as StackOverflowError
 
- This will ensure we report errors with a big number of frames such as 
- Fix user interaction tracking not working for Jetpack Compose 1.5+ (#3010)
- Make sure to close all Closeable resources (#3000)
6.32.0
6.31.0
Features
- Improve default debouncing mechanism (#2945)
- Add CheckInUtils.withCheckInwhich abstracts away some of the manual check-ins complexity (#2959)
- Add @SentryCaptureExceptionParameterannotation which captures exceptions passed into an annotated method (#2764)- This can be used to replace Sentry.captureExceptioncalls in@ExceptionHandlerof a@ControllerAdvice
 
- This can be used to replace 
- Add ServerWebExchangetoHintfor WebFlux asWEBFLUX_EXCEPTION_HANDLER_EXCHANGE(#2977)
- Allow filtering GraphQL errors (#2967)
- This list can be set directly when calling the constructor of SentryInstrumentation
- For Spring Boot it can also be set in application.propertiesassentry.graphql.ignored-error-types=SOME_ERROR,ANOTHER_ERROR
 
- This list can be set directly when calling the constructor of 
Fixes
- Add OkHttp span auto-close when response body is not read (#2923)
- Fix json parsing of nullable/empty fields for Hybrid SDKs (#2968)
- (Internal) Rename nextListtonextListOrNullto actually match what the method does
- (Hybrid) Check if there's any object in a collection before trying to parse it (which prevents the "Failed to deserilize object in list" log message)
- (Hybrid) If a date can't be parsed as an ISO timestamp, attempts to parse it as millis silently, without printing a log message
- (Hybrid) If opis not defined as part ofSpanContext, fallback to an empty string, because the filed is optional in the spec
 
- (Internal) Rename 
- Always attach OkHttp errors and Http Client Errors only to call root span (#2961)
- Fixed crash accessing Choreographer instance (#2970)