Releases: getsentry/sentry-java
Releases · getsentry/sentry-java
6.24.0
Features
- Add debouncing mechanism and before-capture callbacks for screenshots and view hierarchies (#2773)
- Improve ANRv2 implementation (#2792)
- Add a proguard rule to keep
ApplicationNotResponding
class from obfuscation - Add a new option
setReportHistoricalAnrs
; when enabled, it will report all of the ANRs from the getHistoricalExitReasons list.
By default, the SDK only reports and enriches the latest ANR and only this one counts towards ANR rate.
Worth noting that this option is mainly useful when updating the SDK to the version where ANRv2 has been introduced, to report all ANRs happened prior to the SDK update. After that, the SDK will always pick up the latest ANR from the historical exit reasons list on next app restart, so there should be no historical ANRs to report.
These ANRs are reported with theHistoricalAppExitInfo
mechanism. - Add a new option
setAttachAnrThreadDump
to send ANR thread dump from the system as an attachment.
This is only useful as additional information, because the SDK attempts to parse the thread dump into proper threads with stacktraces by default. - If ApplicationExitInfo#getTraceInputStream returns null, the SDK no longer reports an ANR event, as these events are not very useful without it.
- Enhance regex patterns for native stackframes
- Add a proguard rule to keep
6.23.0
Features
- Add profile rate limiting (#2782)
- Support for automatically capturing Failed GraphQL (Apollo 3) Client errors (#2781)
import com.apollographql.apollo3.ApolloClient
import io.sentry.apollo3.sentryTracing
val apolloClient = ApolloClient.Builder()
.serverUrl("https://example.com/graphql")
.sentryTracing(captureFailedRequests = true)
.build()
Dependencies
6.22.0
Features
- Add
lock
attribute to theSentryStackFrame
protocol to better highlight offending frames in the UI (#2761) - Enrich database spans with blocked main thread info (#2760)
- Add
api_target
toRequest
anddata
toResponse
Protocols (#2775)
Fixes
- No longer use
String.join
inBaggage
as it requires API level 26 (#2778)
6.21.0
Features
- Introduce new
sentry-android-sqlite
integration (#2722)- This integration replaces the old
androidx.sqlite
database instrumentation in the Sentry Android Gradle plugin - A new capability to manually instrument your
androidx.sqlite
databases.- You can wrap your custom
SupportSQLiteOpenHelper
instance intoSentrySupportSQLiteOpenHelper(myHelper)
if you're not using the Sentry Android Gradle plugin and still benefit from performance auto-instrumentation.
- You can wrap your custom
- This integration replaces the old
- Add SentryWrapper for Callable and Supplier Interface (#2720)
- Load sentry-debug-meta.properties (#2734)
- This enables source context for Java
- For more information on how to enable source context, please refer to #633
Fixes
- Finish WebFlux transaction before popping scope (#2724)
- Use daemon threads for SentryExecutorService (#2747)
- We started using
SentryExecutorService
in6.19.0
which caused the application to hang on shutdown unlessSentry.close()
was called. By using daemon threads we no longer block shutdown.
- We started using
- Use Base64.NO_WRAP to avoid unexpected char errors in Apollo (#2745)
- Don't warn R8 on missing
ComposeViewHierarchyExporter
class (#2743)
6.20.0
Features
- Add support for Sentry Kotlin Compiler Plugin (#2695)
- In conjunction with our sentry-kotlin-compiler-plugin we improved Jetpack Compose support for
- View Hierarchy support for Jetpack Compose screens
- Automatic breadcrumbs for user interactions
- In conjunction with our sentry-kotlin-compiler-plugin we improved Jetpack Compose support for
- More granular http requests instrumentation with a new SentryOkHttpEventListener (#2659)
- Create spans for time spent on:
- Proxy selection
- DNS resolution
- HTTPS setup
- Connection
- Requesting headers
- Receiving response
- You can attach the event listener to your OkHttpClient through
client.eventListener(new SentryOkHttpEventListener()).addInterceptor(new SentryOkHttpInterceptor()).build();
- In case you already have an event listener you can use the SentryOkHttpEventListener as well through
client.eventListener(new SentryOkHttpEventListener(myListener)).addInterceptor(new SentryOkHttpInterceptor()).build();
- Create spans for time spent on:
- Add a new option to disable
RootChecker
(#2735)
Fixes
6.19.1
6.19.0
Features
- Add Screenshot and ViewHierarchy to integrations list (#2698)
- New ANR detection based on ApplicationExitInfo API (#2697)
- This implementation completely replaces the old one (based on a watchdog) on devices running Android 11 and above:
- New implementation provides more precise ANR events/ANR rate detection as well as system thread dump information. The new implementation reports ANRs exactly as Google Play Console, without producing false positives or missing important background ANR events.
- New implementation reports ANR events with a new mechanism
mechanism:AppExitInfo
. - However, despite producing many false positives, the old implementation is capable of better enriching ANR errors (which is not available with the new implementation), for example:
- Capturing screenshots at the time of ANR event;
- Capturing transactions and profiling data corresponding to the ANR event;
- Auxiliary information (such as current memory load) at the time of ANR event.
- If you would like us to provide support for the old approach working alongside the new one on Android 11 and above (e.g. for raising events for slow code on main thread), consider upvoting this discussion.
- The old watchdog implementation will continue working for older API versions (Android < 11)
- The old implementation reports ANR events with the existing mechanism
mechanism:ANR
- The old implementation reports ANR events with the existing mechanism
- This implementation completely replaces the old one (based on a watchdog) on devices running Android 11 and above:
- Open up
TransactionOptions
,ITransaction
andIHub
methods allowing consumers modify start/end timestamp of transactions and spans (#2701) - Send source bundle IDs to Sentry to enable source context (#2663)
- For more information on how to enable source context, please refer to #633
Fixes
- Android Profiler on calling thread (#2691)
- Use
configureScope
instead ofwithScope
inHub.close()
. This ensures that the main scope releases the in-memory data when closing a hub instance. (#2688) - Remove null keys/values before creating concurrent hashmap in order to avoid NPE (#2708)
- Exclude SentryOptions from R8/ProGuard obfuscation (#2699)
- This fixes AGP 8.+ incompatibility, where full R8 mode is enforced
Dependencies
6.18.1
6.18.0
Features
- Attach Trace Context when an ANR is detected (ANRv1) (#2583)
- Make log4j2 integration compatible with log4j 3.0 (#2634)
- Instead of relying on package scanning, we now use an annotation processor to generate
Log4j2Plugins.dat
- Instead of relying on package scanning, we now use an annotation processor to generate
- Create
User
andBreadcrumb
from map (#2614) - Add
sent_at
to envelope header item (#2638)
Fixes
- Fix timestamp intervals of PerformanceCollectionData in profiles (#2648)
- Fix timestamps of PerformanceCollectionData in profiles (#2632)
- Fix missing propagateMinConstraints flag for SentryTraced (#2637)
- Fix potential SecurityException thrown by ConnectivityManager on Android 11 (#2653)
- Fix aar artifacts publishing for Maven (#2641)
Dependencies
6.17.0
Features
- Add
name
andgeo
toUser
(#2556) - Add breadcrumbs on network changes (#2608)
- Add time-to-initial-display and time-to-full-display measurements to Activity transactions (#2611)
- Read integration list written by sentry gradle plugin from manifest (#2598)
- Add Logcat adapter (#2620)
- Provide CPU count/frequency data as device context (#2622)
Fixes
- Trim time-to-full-display span if reportFullyDisplayed API is never called (#2631)
- Fix Automatic UI transactions having wrong durations (#2623)
- Fix wrong default environment in Session (#2610)
- Pass through unknown sentry baggage keys into SentryEnvelopeHeader (#2618)
- Fix missing null check when removing lifecycle observer (#2625)