Skip to content

Releases: getsentry/sentry-java

8.47.0

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 02 Jul 10:26

Behavioral Changes

  • SentryOkHttpInterceptor::intercept now throws IOException. 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, SentryGestureListener always 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.
  • Fix potential NPE within Scope.endSession() (#5657)
  • Fix memory leak in ReplayIntegration due 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 getLocationOnScreen per 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 SentryId and SpanId allocation overhead by replacing their per-instance LazyEvaluator (and its lock) with a lightweight lazily-generated String. (#5645)
  • Lazily allocate the ReentrantLock backing AutoClosableReentrantLock to avoid eager lock allocations for SDK objects that never contend during SentryAndroid.init (#5643)

8.46.0

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 25 Jun 14:56

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.
  • Date objects 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 Date copies 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 Breadcrumb data map only when data is added. (#5598)
  • Reduce JSON serialization overhead by lowering the initial JsonWriter nesting stack size while preserving on-demand growth. (#5591)
  • Reduce timestamp helper overhead by replacing unnecessary Calendar usage in DateUtils with direct Date creation. (#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

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 24 Jun 15:56

Features

  • On Android 15+ (API 35), the standalone app.start transaction now reports why the OS started the process via app.vitals.start.reason trace data (e.g. launcher, broadcast, service, content_provider), derived from ApplicationStartInfo.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 getHistoricalProcessStartReasons is called from an isolated or wrong-userId process (#5597)
  • Release MediaMuxer when a replay segment has no encodable frames to avoid a resource leak (#5583)

Dependencies

8.43.3

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 24 Jun 12:18

Fixes

  • Fix crash when getHistoricalProcessStartReasons is called from an isolated or wrong-userId process (#5597)

8.44.1

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 19 Jun 13:49

Fixes

  • Fix FirstDrawDoneListener leaking an OnGlobalLayoutListener per registration (#5567)

Features

  • Add experimental SentrySQLiteDriver to sentry-android-sqlite for instrumenting androidx.sqlite.SQLiteDriver (#5563)
    • To use it, pass SQLiteDriver to SentrySQLiteDriver.create(...)
    • Requires androidx.sqlite:sqlite (2.5.0+) on runtime classpath (typically provided by Room or SQLDelight)

Dependencies

8.44.0

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 17 Jun 16:05

Features

  • Add enableStandaloneAppStartTracing option 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 = true or manifest meta-data io.sentry.standalone-app-start-tracing.enable
    • Emits a transaction named App Start with op app.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 traceId as the first ui.load activity transaction so they remain linked in the trace view
    • Also covers non-activity starts (broadcast receivers, services, content providers)

Improvements

  • Reduce boxing to improve performance (#5523, #5527, #5551)
  • Replace Date with a unix timestamp in SentryNanotimeDate to improve performance (#5550)
    • SentryNanotimeDate is now marked @ApiStatus.Internal. A new (long unixDateMillis, long nanos) constructor was added, where unixDateMillis is milliseconds since the epoch. The existing (Date, long) constructor is retained but deprecated.

Dependencies

Fixes

  • Fix attachments being duplicated on native events that carry scope attachments (#5548)
  • Fix performance collector scheduling many tasks in a row (#5524)

8.43.2

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 10 Jun 17:46

Improvements

  • Improve SDK init performance by replacing java.net.URI with custom string parsing for DSN (#5448)
  • Remove unnecessary boxing to improve performance (#5520)

Fixes

  • Session Replay: Fix VerifyError in Compose masking under DexGuard/R8 obfuscation (#5507)
  • Session Replay: Fix Compose view masking not working on obfuscated/minified builds (#5503)

8.43.1

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 03 Jun 21:34

Fixes

  • Session Replay: Fix replay recording freezing on screens with continuous animations (#5489)
  • Session Replay: Populate trace_ids in replay events to enable searching replays by trace ID (#5473)

8.43.0

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 27 May 16:01

Features

  • Session Replay: Add ReplayFrameObserver for 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

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 20 May 13:11

Features

  • Add option to attach raw tombstone protobuf on native crash events (#5446)
    • Enable via options.isAttachRawTombstone = true or manifest: <meta-data android:name="io.sentry.tombstone.attach-raw" android:value="true" />
  • Add API to clear feature flags from scopes (#5426)
  • Add support to configure reporting historical ANRs via AndroidManifest.xml using the io.sentry.anr.report-historical attribute (#5387)

Dependencies