Releases: getsentry/sentry-java
Releases · getsentry/sentry-java
Release list
8.47.0
Behavioral Changes
SentryOkHttpInterceptor::interceptnow throwsIOException. This is a source-only and Java-only breaking change (#5654)
Fixes
- Don't start a redundant UI interaction transaction when a transaction is already bound to the Scope (#5491)
- Previously,
SentryGestureListeneralways started a UI transaction and only afterwards skipped binding it to the Scope when a manually-bound transaction already existed, leaving the new transaction to be dropped as an idle transaction without children.
- Previously,
- Fix potential NPE within
Scope.endSession()(#5657) - Fix memory leak in
ReplayIntegrationdue to persisting executor not being shut down (#5627) - Fix AbstractMethodError when compose-ui 1.11+ is used in combination with
Modifier.sentryTag()or the Sentry Kotlin compiler plugin (#5672)
Performance
- Speed up touch gesture target detection on deeply nested view hierarchies by hit-testing in local coordinates instead of calling
getLocationOnScreenper view (#5595) - Probe class availability without initializing the class during SDK init (#5635)
- Avoid constructing an exception per view when resolving view ids during view-hierarchy and gesture capture (#5631)
- Start the frame metrics thread lazily on first collection instead of during SDK init (#5641)
- Reduce
SentryIdandSpanIdallocation overhead by replacing their per-instanceLazyEvaluator(and its lock) with a lightweight lazily-generatedString. (#5645) - Lazily allocate the
ReentrantLockbackingAutoClosableReentrantLockto avoid eager lock allocations for SDK objects that never contend duringSentryAndroid.init(#5643)
8.46.0
Behavioral Changes
- Collections returned by scope (e.g.
getBreadcrumbs,getTags,getAttachments) are shared state and should not be mutated. (#5541)- Previously, when going through
CombinedScopeView, we were returning a copy where mutations didn't show up in the underlying scopes. - This has now changed in order to reduce SDK overhead.
- Previously, when going through
Dateobjects returned by SDK data model getters are shared state and should not be mutated. (#5603)- Previously, these getters returned defensive copies for some date fields.
- This has now changed in order to reduce SDK overhead.
Performance
- Reduce writer buffer size from 8192 to 512 (#5544)
- Remove redundant event map copies (#5536)
- Optimize combined scope by adding an early return if only one scope has data (#5541)
- Reduce model access overhead by avoiding defensive
Datecopies in SDK data model getters. (#5603) - Reduce timestamp parsing and formatting overhead with Sentry-specific ISO-8601 handling. (#5602)
- Reduce JSON serialization overhead by creating the reflection serializer only when unknown-object fallback serialization is needed. (#5601)
- Reduce JSON serialization overhead by allocating reflection cycle-tracking state only when reflection serialization is used. (#5600)
- Reduce context serialization overhead by sorting key snapshots with arrays instead of temporary lists. (#5599)
- Reduce breadcrumb allocation overhead by creating the
Breadcrumbdata map only when data is added. (#5598) - Reduce JSON serialization overhead by lowering the initial
JsonWriternesting stack size while preserving on-demand growth. (#5591) - Reduce timestamp helper overhead by replacing unnecessary
Calendarusage inDateUtilswith directDatecreation. (#5589) - Reduce Android startup overhead by using the default timezone directly on older devices or when no timezone info is available in the locale. (#5587)
8.45.0
Features
- On Android 15+ (API 35), the standalone
app.starttransaction now reports why the OS started the process viaapp.vitals.start.reasontrace data (e.g.launcher,broadcast,service,content_provider), derived fromApplicationStartInfo.getReason(). You can search and group by this attribute in the Trace Explorer. (#5552)
Fixes
- Use
System.nanoTime()for cron check-in duration measurement to avoid incorrect durations from wall-clock adjustments (#5611) - Fix crash when
getHistoricalProcessStartReasonsis called from an isolated or wrong-userId process (#5597) - Release
MediaMuxerwhen a replay segment has no encodable frames to avoid a resource leak (#5583)
Dependencies
8.43.3
Fixes
- Fix crash when
getHistoricalProcessStartReasonsis called from an isolated or wrong-userId process (#5597)
8.44.1
Fixes
- Fix
FirstDrawDoneListenerleaking anOnGlobalLayoutListenerper registration (#5567)
Features
- Add experimental
SentrySQLiteDrivertosentry-android-sqlitefor instrumentingandroidx.sqlite.SQLiteDriver(#5563)- To use it, pass
SQLiteDrivertoSentrySQLiteDriver.create(...) - Requires
androidx.sqlite:sqlite(2.5.0+) on runtime classpath (typically provided by Room or SQLDelight)
- To use it, pass
Dependencies
8.44.0
Features
- Add
enableStandaloneAppStartTracingoption to send app start as a standalone transaction instead of attaching it as a child span of the first activity transaction (#5342)- Disabled by default; opt in via
options.isEnableStandaloneAppStartTracing = trueor manifest meta-dataio.sentry.standalone-app-start-tracing.enable - Emits a transaction named
App Startwith opapp.start, carrying the existing app start measurements and phase spans (process.load,contentprovider.load,application.load, activity lifecycle spans) as direct children of the root - The standalone transaction shares the same
traceIdas the firstui.loadactivity transaction so they remain linked in the trace view - Also covers non-activity starts (broadcast receivers, services, content providers)
- Disabled by default; opt in via
Improvements
- Reduce boxing to improve performance (#5523, #5527, #5551)
- Replace
Datewith a unix timestamp inSentryNanotimeDateto improve performance (#5550)SentryNanotimeDateis now marked@ApiStatus.Internal. A new(long unixDateMillis, long nanos)constructor was added, whereunixDateMillisis milliseconds since the epoch. The existing(Date, long)constructor is retained but deprecated.
Dependencies
Fixes
8.43.2
8.43.1
8.43.0
Features
-
Session Replay: Add
ReplayFrameObserverfor observing captured replay frames (#5386)SentryAndroid.init(context) { options -> options.sessionReplay.frameObserver = SentryReplayOptions.ReplayFrameObserver { hint, frameTimestamp, screenName -> val bitmap = hint.getAs(TypeCheckHint.REPLAY_FRAME_BITMAP, Bitmap::class.java) if (bitmap != null) { try { // Process the masked replay frame myAnalyzer.processFrame(bitmap, frameTimestamp, screenName) } finally { bitmap.recycle() } } } }
-
Parse ART memory and garbage collector info from ANR tombstones into ART context (#5428)
8.42.0
Features
- Add option to attach raw tombstone protobuf on native crash events (#5446)
- Enable via
options.isAttachRawTombstone = trueor manifest:<meta-data android:name="io.sentry.tombstone.attach-raw" android:value="true" />
- Enable via
- Add API to clear feature flags from scopes (#5426)
- Add support to configure reporting historical ANRs via
AndroidManifest.xmlusing theio.sentry.anr.report-historicalattribute (#5387)