Releases: getsentry/sentry-java
Releases · getsentry/sentry-java
Release list
8.50.1
Fixes
- Pin the published Sentry Android SDK's AAR metadata
minCompileSdkto ourminSdk(21) instead of AGP 9's new default of the SDK's owncompileSdk(37), so apps that depend on the SDK aren't forced to raise theircompileSdk(#5823)
8.50.0
Android 17 support
- We've put Android 17 through a set of rigorous tests. We're now officially giving it the Sentry stamp of compatibility .(#5796)
Fixes
- Reduce main-thread work during
Sentry.initby resolving the shake-detector accelerometer off the main thread (~1.75ms on a Pixel 10) (#5784) - Backfill release, environment, distribution, tags, and app version/build—and use the matching replay-on-error sample rate—for
ApplicationExitInfoANR and native crash events captured before SDK initialization, without reusing options cached by a later app update (#5762) SentryTagModifierNode.isImportantForBoundsnow matches the default behavior and returnstrue(#5789)- Prevent a
StackOverflowErrorwhen abeforeSend,beforeBreadcrumb,beforeSendLog, orbeforeEnvelopecallback triggers another capture (directly or through a logging integration such as Timber) (#5737)- Captures made from within a user callback (event, transaction, breadcrumb, log, envelope, or check-in) are now dropped while that callback runs, instead of recursing. Captures made by event processors are unaffected.
- Replace deprecated
ThrowableProxywithLogEvent#getThrown()insentry-log4j2(#5751)
Dependencies
8.49.0
Features
-
Session Replay: Record segment names (transaction names) (#5763)
-
Add
io.sentry:sentry-opentelemetry-bomto align Sentry OpenTelemetry modules with tested OpenTelemetry dependencies (#5629)- Spring Boot Gradle plugin: add the Sentry BOM to
dependencyManagement; explicit imports are applied after Spring Boot's implicit BOMdependencyManagement { imports { mavenBom("io.sentry:sentry-opentelemetry-bom:<sentry-version>") } } - Gradle: import it as a platform and omit versions from Sentry OpenTelemetry and OpenTelemetry dependencies
implementation(platform("io.sentry:sentry-opentelemetry-bom:<sentry-version>")) - Maven: import it before Spring Boot's BOM in the same
<dependencyManagement>block, or in the child POM when usingspring-boot-starter-parent<dependency> <groupId>io.sentry</groupId> <artifactId>sentry-opentelemetry-bom</artifactId> <version>${sentry.version}</version> <type>pom</type> <scope>import</scope> </dependency>
- Spring Boot Gradle plugin: add the Sentry BOM to
Fixes
- Session Replay: Fix first recording segment missing for replays in
buffermode (#5753) - Session Replay: Fix error-to-replay linkage in
buffermode (#5754) - Prevent logs and metrics from remaining queued after a flush scheduling race (#5756)
- Fix main thread identification for tombstone (native crash) events (#5742)
- Prevent malformed JDBC URLs, which may contain credentials, from being printed to stdout (#5656)
- Restrict JVM-global proxy authentication credentials to challenges from the configured proxy host (#5656)
- Sanitize Spring 7 and Spring Jakarta WebClient span descriptions to prevent embedded URL credentials from being sent to Sentry (#5656)
- Respect
tracePropagationTargetswhen injecting Sentry tracing headers through the OpenTelemetry OTLP propagator (#5656)
Performance
- Schedule transaction idle/deadline timeouts on a shared, dedicated executor instead of spawning a
Timerthread per transaction (#5670)
Dependencies
- Bump OpenTelemetry to support Spring Boot 4.1 (#5573)
- If this causes issues for you because you are also using Spring Boot Dependency Management Plugin (io.spring.dependency-management),
which may downgrade the OpenTelemetry SDK, please have a look at the changelog entry above that explains how to usesentry-opentelemetry-bom. - OpenTelemetry to 1.63.0 (was 1.60.1)
- OpenTelemetry Instrumentation to 2.29.0 (was 2.26.0)
- OpenTelemetry Instrumentation Alpha to 2.29.0-alpha (was 2.26.0-alpha)
- OpenTelemetry Semantic Conventions to 1.42.0 (was 1.40.0)
- OpenTelemetry Semantic Conventions Alpha to 1.42.0-alpha (was 1.40.0-alpha)
- If this causes issues for you because you are also using Spring Boot Dependency Management Plugin (io.spring.dependency-management),
- Bump Native SDK from v0.15.2 to v0.15.3 (#5728)
8.48.0
Features
-
Add
Sentry.extendAppStart(),Sentry.finishExtendedAppStart(), andSentry.getExtendedAppStartSpan()to extend the app start measurement past the first frame for extra launch-time work on Android (#5604)- Requires standalone app start tracing (
options.isEnableStandaloneAppStartTracing). CallextendAppStart()inApplication.onCreateafter SDK init andfinishExtendedAppStart()when done:
Sentry.extendAppStart() // Optionally, retrieve the extended app start span to attach your own child spans val child = Sentry.getExtendedAppStartSpan()?.startChild("preload", "Preload resources") // ... extra launch-time work ... child?.finish() Sentry.finishExtendedAppStart()
- Requires standalone app start tracing (
-
Add
trace_metric_bytedata category and record byte-level client reports when trace metrics are discarded (#5626) -
Support the
io.sentry.tombstone.report-historicalmanifest option to enable historical tombstone reporting viaAndroidManifest.xml<meta-data>(#5683)
Fixes
- Fix
NoSuchMethodErrorfrom usingMath.floorDiv/Math.floorModoverloads that are unavailable on Java 8 (#5743) - Fix main thread identification parsing for ApplicationExitInfo ANRs (#5733)
- Do not send threads without stacktraces for ApplicationExitInfo ANRs (#5733)
- Record byte-level client reports when event processors discard logs or trace metrics (#5718)
- Name the device-info caching thread
SentryDeviceInfoCacheso all threads spawned by the SDK are identifiable (#5684) - Apply byte-category rate limits to log and trace metric envelope items (#5716)
Performance
- Skip
Hintallocation inScope.addBreadcrumbwhen nobeforeBreadcrumbcallback is set (#5689) - Speed up scope persistence by detecting the Sentry executor thread via a marker instead of a
Thread.getName()name scan on every scope mutation (#5691) - Remove executor prewarm during SDK init (#5681)
- The single-threaded
SentryExecutorServicequeued the prewarm work ahead of the first useful task, so it could only delay init work, never speed it up; the thread and class loading it warmed are paid identically by the first real task submitted right after.
- The single-threaded
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.