Skip to content

Commit e59791f

Browse files
sentry-junior[bot]antonisclaudeadinauercodex
authored
Update v9 branch (#6633)
* feat(android): Connect traces with web content in a WebView (#6395) * feat(android): Connect traces with web content in a WebView Add SentryWebViewTracing.addTracePropagation, which writes the current trace into pages from allowed hosts as sentry-trace and baggage meta tags before any page script runs, so @sentry/browser in the page continues the trace on pageload. It uses androidx.webkit's document-start script, a compileOnly dependency checked at runtime, and adds a sample screen and an instrumented test. Refs JAVA-716 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * changelog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Keep non-default ports and handle old androidx.webkit A WebView origin rule without a port only matches port 443, so a non-default port in an allowedHosts entry is now kept in the rule. androidx.webkit is compileOnly, so an app may ship an older version than the SDK was compiled against. A LinkageError is now caught, like for androidx.activity in the feedback form, and the call returns false. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Remove the previous WebView script after an off-thread call A call off the WebView's thread returns false without touching the WebView, which left Sentry's previous script installed. The removal is now posted to the WebView's thread, and skipped if a call on that thread replaced the script in the meantime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Track WebView script replacements per WebView The off-thread cleanup compared against one counter shared by all WebViews, bumped before the replacement finished. A concurrent off-thread call could then remove a script that was just installed, and a call on another WebView cancelled this WebView's cleanup. The count is now kept per WebView, with weak keys, and bumped once the replacement is done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ref(samples): Move the WebView trace screen to the Tracing tab The sample no longer shows an iframe; the instrumented test in sentry-uitest-android still checks that iframes don't get the trace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Match internationalized hosts in WebView trace propagation The page's location.hostname is in punycode, so an allowedHosts entry like münchen.de never matched. Non-ASCII entries are now converted with IDN.toASCII, and entries that cannot be converted are dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(changelog): Shorten WebView trace propagation entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Never throw from the posted WebView script removal Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Rethrow fatal errors from the posted WebView script removal Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add docs link to the changelog * Updated link to WebView documentation in CHANGELOG. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * chore(deps): Ignore OpenTelemetry Dependabot updates (#6531) Prevent independent OpenTelemetry dependency bumps because the SDK, agent, alpha artifacts, and semantic conventions must be updated together. Co-authored-by: Codex <noreply@openai.com> * feat(android): Add WebView tracing options with allowed hosts (#6516) * feat(android): Connect traces with web content in a WebView Add SentryWebViewTracing.addTracePropagation, which writes the current trace into pages from allowed hosts as sentry-trace and baggage meta tags before any page script runs, so @sentry/browser in the page continues the trace on pageload. It uses androidx.webkit's document-start script, a compileOnly dependency checked at runtime, and adds a sample screen and an instrumented test. Refs JAVA-716 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * changelog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Keep non-default ports and handle old androidx.webkit A WebView origin rule without a port only matches port 443, so a non-default port in an allowedHosts entry is now kept in the rule. androidx.webkit is compileOnly, so an app may ship an older version than the SDK was compiled against. A LinkageError is now caught, like for androidx.activity in the feedback form, and the call returns false. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Remove the previous WebView script after an off-thread call A call off the WebView's thread returns false without touching the WebView, which left Sentry's previous script installed. The removal is now posted to the WebView's thread, and skipped if a call on that thread replaced the script in the meantime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Track WebView script replacements per WebView The off-thread cleanup compared against one counter shared by all WebViews, bumped before the replacement finished. A concurrent off-thread call could then remove a script that was just installed, and a call on another WebView cancelled this WebView's cleanup. The count is now kept per WebView, with weak keys, and bumped once the replacement is done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ref(samples): Move the WebView trace screen to the Tracing tab The sample no longer shows an iframe; the instrumented test in sentry-uitest-android still checks that iframes don't get the trace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Match internationalized hosts in WebView trace propagation The page's location.hostname is in punycode, so an allowedHosts entry like münchen.de never matched. Non-ASCII entries are now converted with IDN.toASCII, and entries that cannot be converted are dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(changelog): Shorten WebView trace propagation entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Never throw from the posted WebView script removal Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Rethrow fatal errors from the posted WebView script removal Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add docs link to the changelog * Updated link to WebView documentation in CHANGELOG. * feat(android): Use tracePropagationTargets as the default WebView hosts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(android): Add WebView tracing options with allowed hosts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ref(android): Default WebView allowed hosts to an empty list Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * chore(deps): bump retrofit from 2.9.0 to 3.0.0 (#6534) Bumps `retrofit` from 2.9.0 to 3.0.0. Updates `com.squareup.retrofit2:retrofit` from 2.9.0 to 3.0.0 - [Release notes](https://github.com/square/retrofit/releases) - [Changelog](https://github.com/lysine-dev/retrofit/blob/trunk/CHANGELOG.md) - [Commits](https://github.com/square/retrofit/compare/2.9.0...3.0.0) Updates `com.squareup.retrofit2:converter-gson` from 2.9.0 to 3.0.0 - [Release notes](https://github.com/square/retrofit/releases) - [Changelog](https://github.com/lysine-dev/retrofit/blob/trunk/CHANGELOG.md) - [Commits](https://github.com/square/retrofit/compare/2.9.0...3.0.0) --- updated-dependencies: - dependency-name: com.squareup.retrofit2:retrofit dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: com.squareup.retrofit2:converter-gson dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs(android): Fix Javadoc that Error Prone flags in sentry-android-core (#6498) Error Prone never ran on sentry-android-core. Enabling it reports 34 Javadoc warnings, which fail the build under -Werror: - MissingSummary: turn the @return text into a "Returns ..." summary, and add summaries to Javadocs that only had block tags. - InvalidBlockTag: replace the @noinspection unused Javadoc tags with @SuppressWarnings("unused"), which IntelliJ honors too. - NotJavadoc: turn the Javadoc on methods of an anonymous class into regular comments. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * ref(android)!: Mark sentry-android-core classes final (#6494) * ref(android)!: Mark sentry-android-core classes final Error Prone's Nopen check requires every class to be final, abstract or @Open. It never ran on sentry-android-core, so 42 classes were left open. None of them is subclassed except ActivityLifecycleCallbacksAdapter, which becomes abstract since it is only extended, never instantiated. The protected members of the classes that are now final become package-private, as nothing can subclass them anymore. BREAKING CHANGE: AnrV2Integration, AnrProfilingIntegration, SentryUserFeedbackForm and its Builder, WindowContentChangedCallback and several internal classes can no longer be subclassed. ActivityLifecycleCallbacksAdapter can no longer be instantiated directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * changelog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ref(android)!: Adapt the final classes to main's deprecated feedback APIs On main, the deprecated SentryUserFeedbackDialog and its Builder still extend SentryUserFeedbackForm and its Builder, so those two stay @Open until the dialog is removed. The deprecated SentryUserFeedbackButton and SentryUserFeedbackDialog.Builder become final. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Don't block callers on network status registration (JAVA-828) (#6537) AndroidConnectionStatusProvider no longer makes callers wait while it registers its network and telephony callbacks with system services. That's good because one of those callers is Sentry.init. THE PROBLEM Before this commit, AndroidConnectionStatusProvider used one lock to guard three code paths: callback registration, connection cache refreshes, and adding or removing observers. The SDK executor held that lock across ConnectivityManager.registerDefaultNetworkCallback and, on API 31+, TelephonyManager.registerTelephonyCallback. Both are calls into system services that can occasionally block for seconds. The main thread waited on the same lock in two places: Session Replay adding its observer during Sentry.init. Every captured event reading the connection type or status. If the system service registrations took a while, the main thread would stall. Scenario (1) in particular could lead to ANRs during app startup. Oof. A ROAD NOT TAKEN Any fix has to isolate the slow part (registration) so that the main thread can return quickly when reading cached network info or adding observers. The narrowest approach would be to give registration its own lock and keep a second lock for the cache and observers. But a refresh would then either hold the cache lock while querying Android, making readers wait on that query, or need a version counter that every write must remember to update. Even worse, two locks would need to document order they're taken in to avoid deadlock, which would be easy to get wrong. A BETTER APPROACH The approach we ultimately landed on was to avoid having the main thread hold a lock entirely, and instead rely on atomically publishing cached network info (see commit 2). We did so by introducing a new ConnectionSnapshot class, which is immutable and can be safely shared across threads. We stored observers in copy-on-write lists rather than having them be explicitly locked, and we confined registration to the the SDK executor (it's still defensively guarded by its own lock). Callers that need to access cached network info or register observers can now return quickly. Either of approach would have allowed as much, of course, but the benefit of introducing the snapshot it that it also: - lets us consolidate a lot of related state that the provider previously had to handle separately - avoids the pain of managing (yet another) lock - lays the groundwork for future PRs that confine refreshes to the SDK executor and let snapshots tell a lost network from capabilities that are simply unknown. Co-authored-by: Lazizbek Ergashev <20501725+lazerg@users.noreply.github.com> * build: Upgrade Gradle to 9.9.0 (#6539) The wrapper jar was regenerated by the 9.9.0 wrapper task and matches the official 9.9.0 wrapper checksum. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * chore(deps): bump room2 from 2.8.4 to 2.8.5 (#6550) Bumps `room2` from 2.8.4 to 2.8.5. Updates `androidx.room:room-compiler` from 2.8.4 to 2.8.5 Updates `androidx.room:room-ktx` from 2.8.4 to 2.8.5 Updates `androidx.room:room-runtime` from 2.8.4 to 2.8.5 --- updated-dependencies: - dependency-name: androidx.room:room-compiler dependency-version: 2.8.5 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: androidx.room:room-ktx dependency-version: 2.8.5 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: androidx.room:room-runtime dependency-version: 2.8.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(android): Bump AGP to 9.5.1 (#6540) Raise the default Android Gradle Plugin from 9.4.0 to 9.5.1, the latest stable release. The AGP matrix moves to 9.0.0/9.4.0/9.5.1, keeping the minimum supported version and the previous default, and the replay snapshot upload follows the new default. Lint 9.5 can't load the custom checks bundled with older androidx.lifecycle releases and reports ObsoleteLintCustomCheck, which warningsAsErrors fails on. Disable it in the affected modules; the skipped checks cover lifecycle APIs those modules don't call. Lint 9.5's new ThreadConstraint check flags ScreenshotUtils.takeScreenshot, which is safe to call from any thread because captureScreenshot posts the view draw to the UI thread. Suppress it there. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(replay): Measure gesture batch durations on a monotonic clock (JAVA-830) (#6538) * fix(replay): Measure gesture batch durations on a monotonic clock Touch moves are batched and sent as one RRWebInteractionMoveEvent every 500ms. Both the batch timer and each position's timeOffset subtracted wall-clock readings, so a clock step corrupted them: a backward step held the batch back until the clock caught up, and dropped it if the finger lifted first; a forward step sent it at once with offsets stretched by the step. Both now come from one Stopwatch on the converter's MonotonicTicker, started with the first batched position. Without a clock step the output is unchanged. The event timestamps stay on the wall clock; they move to an AnchoredClock in v9. Fixes JAVA-830 Fixes #6523 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * changelog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(compose): Detect lazy layout scrolls on Compose foundation 1.10+ (#6548) Compose foundation 1.10 replaced ScrollingContainerElement with ScrollableAreaElement, so the gesture target locator no longer found LazyColumn/LazyRow/LazyGrid/Pager as scroll targets and dropped the scroll breadcrumb. Match ScrollableAreaElement and keep its class name under R8. Fixes #6547 --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Gene Wright <gene.wright@sentry.io> * build: Upgrade Gradle to 9.9.1 (#6552) The 9.9.1 wrapper task leaves gradle-wrapper.jar unchanged, and the jar matches the official 9.9.1 wrapper checksum. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * build: Move OpenTelemetry agent test wiring into a convention plugin (#6551) The Spring Boot 2, 3 and 4 modules each copied the setup that runs the agent tests in a child JVM. The io.sentry.otel-agent-tests plugin now owns it, so the modules keep only the dependencies of their Spring Boot line. Fixes #6378 Fixes JAVA-801 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * chore(deps): bump ktorClient from 3.0.0 to 3.6.1 (#6478) * chore(deps): bump ktorClient from 3.0.0 to 3.6.1 Bumps `ktorClient` from 3.0.0 to 3.6.1. Updates `io.ktor:ktor-client-core` from 3.0.0 to 3.6.1 - [Release notes](https://github.com/ktorio/ktor/releases) - [Changelog](https://github.com/ktorio/ktor/blob/3.6.1/CHANGELOG.md) - [Commits](https://github.com/ktorio/ktor/compare/3.0.0...3.6.1) Updates `io.ktor:ktor-client-java` from 3.0.0 to 3.6.1 - [Release notes](https://github.com/ktorio/ktor/releases) - [Changelog](https://github.com/ktorio/ktor/blob/3.6.1/CHANGELOG.md) - [Commits](https://github.com/ktorio/ktor/compare/3.0.0...3.6.1) --- updated-dependencies: - dependency-name: io.ktor:ktor-client-core dependency-version: 3.6.1 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.ktor:ktor-client-java dependency-version: 3.6.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix(ktor): [Ktor 3.6 2] Preserve Ktor 3.0 runtime compatibility (#6517) * fix(ktor): Preserve Ktor 3.0 runtime compatibility Avoid inlining Ktor 3.6's AttributeKey factory. The inlined code references a TypeInfo constructor unavailable in older Ktor 3.x runtimes. Construct TypeInfo explicitly through its stable two-argument constructor instead. * test(ktor): [Ktor 3.6 3] Add Ktor 3.0 compatibility suite (#6520) * test(ktor): Add Ktor 3.0 compatibility suite Compile the production integration against the catalog Ktor version while compiling and running the existing tests against Ktor 3.0.0. Add the compatibility suite to check so inline API binary incompatibilities fail CI. * test(ktor): Simplify Ktor 3.0 suite configuration Use Ktor's enforced platform to pin all compatibility test artifacts to 3.0.0 instead of maintaining a custom resolution strategy. Reuse the standard test source directories so the suite follows source changes. Co-Authored-By: Claude <noreply@anthropic.com> * Update sentry-ktor-client/build.gradle.kts Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> * ref(android): Fix Error Prone warnings in sentry-android-core (#6499) * ref(android): Fix Error Prone warnings in sentry-android-core Error Prone never ran on sentry-android-core. Enabling it reports 59 warnings outside Javadoc, which fail the build under -Werror. - Suppress FutureReturnValueIgnored, JavaUtilDate, and ReferenceEquality where identity is intended, as the sentry module does. - Keep the AnrProfilingIntegration updater a field, since removeCallbacks needs the instance that was posted, and suppress UnnecessaryLambda there. - Read the ANR thread dump and the app start profiling config as UTF-8, Android's default charset. - Remove unused fields and parameters, add missing @Override, make long-to-double conversions explicit, and narrow members that are effectively private or protected in a final class. - Explain the two catch blocks that ignore their exception. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ref(android): Fix the Error Prone warnings only main has - ANRWatchDog.monotonicTicker is never read (#6041), since the ticker lambda captures the constructor parameter. Remove the field and keep the parameter. - ActivityFramesTracker.lock is protected in a final class; make it package-private. - LifecycleWatcher reads the session start Date to seed the session window; suppress JavaUtilDate there, as the other Date uses are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ref(android): Keep the default charset reads as they were Android's default charset is always UTF-8, so DefaultCharset is disabled for the Android modules in #6493 instead of being fixed here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ref(android): Drop the UnnecessaryLambda suppressions #6493 disables UnnecessaryLambda for the Android modules, so the suppressions on the ANRWatchDog and AnrProfilingIntegration fields are redundant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ref(android): Drop the updater field comment Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(android): Make the local-class method comment a plain comment Error Prone's NotJavadoc flags Javadoc on methods of local classes, which #6537 added in AndroidConnectionStatusProvider. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Resolve NullAway findings in sentry-android-core (#6497) * fix(android): Resolve NullAway findings in sentry-android-core NullAway never ran on sentry-android-core. Enabling it reports 32 errors. Most are fields and return types that are nullable but not annotated, and fields NullAway cannot see as checked because a check happens in a different scope (a lambda, another method) than the dereference. - Annotate the nullable fields and return types, including ViewHierarchyNode.setType and UiElement.equals in the sentry module. - Read options once in lambdas, and pass scopes and options to createStandaloneAppStartTransaction, whose callers already check them. - Compute the device family once instead of through a LazyEvaluator, whose evaluator must not return null. - Create the system events HandlerThread in the branch that uses it, inside the existing try. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ref(android): Build the system events IntentFilter where it is registered The filter was a nullable field, built on the first registration and cleared in close(). It only depends on the final actions array, so build it in the registration task instead. That leaves nothing nullable to track. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Check options before finishing the app start span finishAppStartSpan passed the nullable options field to getAppStartTimeSpanWithFallback, which NullAway reports on main. The end time is only used when performance is enabled, which register() sets together with options, so return early when either is unset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Annotate the view hierarchy byte array as nullable @Nullable byte[] annotates the element type for TYPE_USE annotations, so Kotlin saw ByteArray instead of ByteArray?. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * build: Stop logging passed tests and test output to the console (#6554) Every passing test printed a PASSED line plus its stdout/stderr, which buried the failures in CI logs. The console now shows only skipped and failed tests. Test output is still in the HTML and XML test reports. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * feat(android): Add experimental out-of-process crash reporting (#6347) * feat(android): Add service-managed NDK crash daemon Run the NDK crash daemon from an isolated Android service process so it can release the crashing app, merge the resulting tombstone, and send the enriched envelope before shutdown. * Update CHANGELOG.md * fix(android): Narrow exception handling in the NDK crash service Replace the broad `Throwable` catches in `SentryNdkCrashService` with the exceptions the guarded code can throw, and restore the interrupt flag when the service bind is interrupted. * fix(android): Stop the NDK crash service when its daemon exits The service was started with `startService` but never stopped, so its process kept running after `Sentry.close()` or after the app process died. Call `stopSelf` with the start ID that was current when the worker started, so a newer start from a relaunched app is not stopped. * fix(android): Match the NDK crash service stop to its own start A new service process receives `onBind` before `onStartCommand`, so a worker started from the binder configuration could capture a stale start ID and never stop the service. Tag each start with its shared memory path and stop only when the latest start belongs to the exiting worker. * fix(android): Write the NDK tombstone marker after a successful send The marker was written as soon as the merged envelope existed. If the send then failed with a network error, the daemon discarded the envelope and the next launch skipped the tombstone as already reported, so the crash was lost. Write the marker only once the send succeeds. * fix(android): Bind the NDK crash service for the app's lifetime `startService` throws when the app starts in the background, and the started service stopped about a minute after the app left the foreground, so a later crash found no daemon. Native init then fell back to fork/exec, which cannot exec `libsentry-crash.so` from inside the APK with default packaging, and stalled startup for 10 s. Bind the service with `BIND_AUTO_CREATE` and keep the binding until `SentryNdk.close()`, so the service process keeps the app's importance and is not frozen. Let crash processing continue after `onDestroy`, which runs as soon as a crashed app's binding goes away. Fail NDK init instead of falling back to fork/exec when the service is unavailable: below API 30, without a context, or when binding or configuring fails. Move the inproc `SentryNdkTest` to inproc-only test sources, since outproc init now requires a context. * fix(android): Match NDK tombstones by the app's pid The crash service picked the native crash exit info closest to the event's timestamp and ignored its pid. In a crash loop, the first poll can run before the current crash has an exit info, and the previous crash's tombstone was merged instead. Skip exit infos of other pids. The worker captures the pid when it starts, so a later configure call cannot change it. * fix(android): Start an NDK crash daemon for each relaunch When the app relaunched while the previous daemon was still sending its crash, or before it noticed that its process was gone, the new config was stored but no worker started, and the old worker's cleanup then cleared it. The relaunched app's next crash waited 10 s in the handler and was lost, and its descriptors leaked. Keep the per-app daemon state in a config owned by its worker, and start a worker for each config right away. The old daemon is past crash processing or only waiting for its process to go away, so the two share only process-wide native state such as the logger. * ci(temp): Publish sentry-native-ndk-outproc to Maven Local `sentry-android-ndk-outproc` depends on `io.sentry:sentry-native-ndk-outproc`, which is not on Maven Central yet. Build it from the sentry-native feature branch and publish it to Maven Local so the Build job can resolve it. TODO: Revert. This is temporary until sentry-native publishes the artifact. * fix(android): Wait for the NDK tombstone outside the send budget The tombstone wait and the send shared `shutdownTimeoutMillis`, so a slow tombstone left the send no time at all. Wait for the app's exit info instead. The app exits right after debuggerd writes its tombstone, so the wait ends when the tombstone is there, capped at the 30 s match tolerance. Stop early when the app did not crash natively or the tombstone does not parse. Give the send the full `shutdownTimeoutMillis`, and write the marker for a merged envelope that was sent or kept for the next launch. * fix(android): Remove stale NDK crash IPC files Name the shared-memory file after the app pid and delete leftovers whose process no longer runs when the crash service starts. A setup that fails before the daemon attaches would otherwise leave the file behind, while other processes of a multi-process app keep theirs. * fix(android): Fall back to the 1-argument NDK init With a context, NdkIntegration only looked up `SentryNdk.init(Context, SentryAndroidOptions)`. An older sentry-android-ndk without it disabled NDK. Fall back to `SentryNdk.init(SentryAndroidOptions)` and log a warning. * ref(android): Stop passing the tombstone flag to NdkOptions sentry-native-ndk-outproc no longer reads it, because it always sends native crash envelopes without a minidump. The crash service still gets the tombstone flag through its configure call. * fix(android): Skip SDK init in the NDK crash service process The crash service runs in its own `.sentry_ndk_crash` process, which runs the app's `Application.onCreate`. Apps that call `SentryAndroid.init` there started a second SDK on every launch, with the tombstone, ANR and outbox senders working on the same cache directory as the app process. Return early from `SentryAndroid.init` in that process. * ref(android): Remove the NDK crash service process check SentryAndroid.init now returns early in the `.sentry_ndk_crash` process, so SentryNdk.init is no longer called there. * fix(android): Keep a newer NDK tombstone marker Crash service workers for processes that crash close together can finish out of order. A worker that wrote an older tombstone timestamp let `TombstoneIntegration` report the newer crash again on the next launch. Write the marker only when it is newer than the current one, and serialize the workers. * ci: Stop the sentry-native Gradle daemon after publishing The publish step left its 4 GB Gradle daemon running alongside the 8 GB daemon used by `make preMerge`. The job was killed about 12 minutes into the tests, most likely because the runner ran out of memory. * fix(android): Bind the NDK crash service as important Without `BIND_IMPORTANT`, a foreground app raises its bound crash service process only to the visible oom adj (100), so lmkd would kill the service before the app under memory pressure. The flag gives the service the app's own adj (0) while the app is on top, without lowering the app's priority the way `BIND_ABOVE_CLIENT` would. * Apply batched suggestions from code review Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com> * chore(android): Update the outproc API dump The outproc module shares NdkScopeObserver with the inproc module, which gained setEnvironment on main (#5772). * fix(android): Reattach the NDK crash daemon after a service restart When the crash service process died while the app was bound, Android restarted it and called `onServiceConnected` again, but the connection had already closed the descriptors it configured with, so the app ran without a crash daemon. Configure the restarted service with new pipes and the app's shared memory file, then reattach the native crash IPC. Bind again when the binding dies, and log a lost connection at ERROR. * ref(android): Build the NDK outproc package on top of sentry-android-ndk sentry-android-ndk-outproc compiled sentry-android-ndk's sources through extra source folders, shared its namespace and borrowed its ProGuard rules, so the same files belonged to both modules, and the deprecated `BaseExtension` wired it up. Depend on sentry-android-ndk instead, without its `sentry-native-ndk`, and keep only the crash service and the `SentryNdkOutproc` entry point in the `io.sentry.android.ndk.outproc` namespace. `NdkIntegration` now loads that entry point first and falls back to `SentryNdk`. * fix(android): Write the NDK tombstone marker before the send The native side keeps the envelope for the next launch until it is sent, so the crash is delivered whatever the send result. Write the marker before the send, so that a send that a frozen service finishes late no longer races TombstoneIntegration on the next launch. * fix(android): Close rejected NDK crash service fds `configureDaemon` left the file descriptors of a binder transaction open until garbage collection when it rejected the configuration. Close them before returning. * fix(android): Time the NDK tombstone poll with a monotonic clock The crash service polled for a matching tombstone until a wall clock deadline, so a clock step backward delayed the crash send by the size of the step. Use `SystemClock.uptimeMillis()`, which also drives `Thread.sleep()`. * fix(android): Narrow the NDK outproc library load catch The library loader thread swallowed every `Throwable`, including fatal errors. Catch only the `UnsatisfiedLinkError` of a missing or broken library, which `init()` reports later. `ExceptionUtils.rethrowIfFatal` does not fit, because it rethrows `LinkageError` and would turn a missing library into an app crash. * fix(android): Load the NDK outproc libraries before binding the service A missing or broken native library surfaced only in `initCrashDaemon`, after the crash service was bound and the IPC fds were detached. The `UnsatisfiedLinkError` left the service bound with `BIND_IMPORTANT` and the fds open for the app's lifetime. Load the libraries first, so the failure leaves nothing behind. * fix(android): Write the NDK tombstone marker when the merge fails When the crash service matched the app's native crash exit but could not merge its tombstone, because it stayed unavailable until the deadline or the merge threw, it sent the native event without writing the marker. On the next launch, `TombstoneIntegration` then reported the same crash again as a standalone tombstone event. Write the marker for a matched tombstone, merged or not. * docs(android): Remove the Gradle plugin from the NDK outproc README The `ndkBackend` option of the Gradle plugin is parked for now, so the outproc package is selected through its dependency only. * fix(android): Hand the NDK crash memfd to the crash service The NDK now backs the crash IPC with a memfd instead of a file, because the sparse file could raise `SIGBUS` on a full disk. Create the memfd before configuring the service and send it over Binder, which reattaching already does. This removes the file path from the protocol, and the cleanup of stale files. * docs(changelog): Move the outproc entry back to Unreleased The merge of `origin/main` placed it under `8.63.0`, which was released without out-of-process crash reporting. * build(deps): Bump sentry-native-ndk-outproc to 1.0.0-beta.1 sentry-native now publishes `sentry-native-ndk-outproc` to Maven Central, so CI no longer builds it from the sentry-native branch into Maven Local. * meta(android): Register the NDK outproc module for release Craft's `registry` target fails the release when a published module has no entry. Also list the module in the README packages table and the Android issue template. * ref(android): Pass the thread id as the NDK crash daemon's appTid `appTid` received `System.nanoTime()`, but the daemon expects the parent thread id. On Android it only names the shared memory file that the daemon unlinks, and none exists because the memory is a memfd. * ref(android): Time the NDK tombstone poll with a Deadline New code reads clocks through `io.sentry.time` instead of `SystemClock`. The poll deadline now comes from the options' monotonic ticker, which also counts time the device spends suspended. * ref(android): Document the NDK crash service's broad catches The exception rules in `AGENTS.md` allow a broad catch only at a boundary, with a comment on why and what happens on failure. The two `Exception` catches also call `ExceptionUtils.rethrowIfFatal`, which restores the interrupt flag of a swallowed `InterruptedException`. * fix(android): Unbind the NDK crash service on any native init failure `SentryNdkOutproc.init` only unbound the crash service when native init threw `IllegalStateException`. Any other throwable, such as an `UnsatisfiedLinkError`, left the service bound with `BIND_IMPORTANT`, and the disabled NDK integration never closed it. * docs(changelog): Explain how to enable Android outproc crash reporting --------- Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com> * test(android): Use fewer Robolectric SDK levels in core and replay (#6544) * collection: Robolectric CI speed-up * test(android): Use fewer Robolectric SDK levels in core and replay Robolectric starts a new sandbox for each SDK level a test JVM uses, and downloads one android-all jar per level. Move pinned levels to the nearest shared level that takes the same code branch: 23/25 -> 24, 26 -> 30, 31/34 -> 33. Level 28 stays because ReplaySmokeTest and AndroidConnectionStatusProviderTest behave differently at 30. Core and replay now use 6 levels instead of 11. Locally, core Robolectric tests go from about 82s to 71s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * chore(docs): Remove OkHttp version bump from changelog and add known issue for #6537 (#6561) * build(android): Run Error Prone and NullAway on the Android modules (#6493) * build(android): Run Error Prone and NullAway on the Android modules net.ltgt.errorprone dropped Android support in 3.0.0, which we have used since 6.7. Since then it only enables Error Prone and adds it to the processor path for Gradle's JVM source sets. On sentry-android-core and sentry-uitest-android the errorprone dependencies and the NullAway ERROR setting had no effect, and the Java compile tasks ran plain javac. Use the AGP variant API to add the errorprone configuration to each variant's annotation processor configuration and enable Error Prone on its JavaCompile task. Both APIs exist in AGP 9.0.0, the oldest version in the AGP matrix. Pass -XDandroidCompatible=true so Error Prone treats these modules as Android code: it skips checks that don't apply there, such as DefaultCharset, and runs its Android checks. sentry-uitest-android has no hand-written Java, so exclude the view binding classes AGP generates, which trip LabelledBreakTarget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Resolve NullAway findings in AndroidConnectionStatusProvider NullAway treats AtomicReference.get() as nullable, so the snapshot reads added in #6537 fail once NullAway runs on sentry-android-core. The snapshot is never set to null, so read it through one accessor that suppresses the finding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * release: 8.64.0 * build(android): Download Robolectric android-all jars with Gradle (#6553) Robolectric fetched ~0.95 GB of android-all jars from Maven Central while tests ran, and CI doesn't cache ~/.m2, so every Build run downloaded them again. A new io.sentry.robolectric build-logic plugin resolves them with Gradle before the tests start, so setup-gradle restores them from cache, and points Robolectric at them through robolectric-deps.properties instead of copying them into robolectric.dependency.dir. See https://robolectric.org/blog/2023/11/11/improving-android-all-downloading/ Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * feat(profiling): Store the thread state in ANR stack samples (#6587) * ref(android): Store the thread state in ANR stack samples * ref(android): Mark a null ANR sample state explicitly and document the format * ref(android): Remove narrating comments from AnrStackTrace * chore(docs): Add version for fix under Known Issues entries in changelog (#6569) * fix(android): Measure debounce windows on the monotonic ticker (JAVA-729) (#6590) * fix(android): Measure debounce windows on the monotonic ticker (JAVA-729) Debouncer read AndroidCurrentDateProvider, which is SystemClock.uptimeMillis() and stops in deep sleep. A window that expired while the device slept still looked open, so the first low-memory or battery breadcrumb after a long Doze could be dropped. Debouncer now measures its window with a Deadline on options.getMonotonicTicker(), which is CLOCK_BOOTTIME on Android. The screenshot, view hierarchy, system events and app components debouncers all use it. AndroidEnvelopeCache still uses AndroidCurrentDateProvider: it compares against TimeSpan's uptime start, so it can't move on its own. Refs JAVA-729 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * changelog --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * ref(android): Remove unused BreadcrumbFactory (#6598) * perf(core): Avoid allocations in log calls when debug is off (#6600) * perf(core): Avoid allocations in log calls when debug is off Every SDK log call allocated a varargs array at the call site, also when debug is off. ILogger now has fixed-arity default overloads for zero, one and two arguments, which DiagnosticLogger and NoOpLogger override. Recompiled call sites use them and do not allocate when logging is disabled. Hot-path log calls in DefaultCompositePerformanceCollector and SentryGestureListener also built their messages eagerly with string concatenation or toString(). They now pass format arguments, so the message is built only when logging is enabled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * changelog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * changelog: Narrow the allocation claim Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(android): Don't swallow interrupts while flushing a startup crash (#6568) * fix(android): Don't swallow interrupts while flushing a startup crash After a startup crash, SendCachedEnvelopeIntegration blocks the thread that calls Sentry.init until the cached envelopes are sent. If that thread was interrupted, future.get() cleared the interrupt and the trailing catch (Throwable) swallowed it, so the caller never saw it. It also logged that cached events will not be sent, although the task keeps sending them. Catch InterruptedException next to the timeout, restore the interrupt and continue in the background. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * changelog --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * feat(replay): Add pauseTouchTracking and resumeTouchTracking (#6546) Apps can stop recording touches on sensitive screens, such as a custom PIN pad, while the masked screen recording continues. Masking hides the content, but recorded touch positions could reveal the input. The flag is independent of pause()/resume() and is cleared only by resumeTouchTracking(), also across new replays. It is set directly instead of being queued on the main thread, so it applies to touch events that are already pending. Also mark debugMaskingEnabled as volatile, it is written and read on different threads. Fixes JAVA-658 Fixes #5787 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * test(okhttp): Wait until the reader is blocked before closing the body (#6604) The concurrent close test signaled right after the reader got the first chunk, before it entered the next read(). When close() landed in that gap, the reader's next read() threw Okio's "closed" IllegalStateException, the thread died, and the test timed out waiting for it. ParkingSource now signals right before it blocks, so close() always lands while the reader is inside read(). Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> * fix(android): Part 3 of Nav3 support for multi-Activity and multi-Fragment apps (JAVA-785, JAVA-823) (#6480) This commit constitutes part 3 of our Nav3 support for multi-Activity and multi-Fragment apps. In part 1 (https://github.com/getsentry/sentry-java/pull/6301) we provided the basic mechanism for coordinating multiple SentryNavEffects; and in part 2 (https://github.com/getsentry/sentry-java/pull/6398) we adapted our approach to the quirks of ViewPager2 and other oddball Fragment lifecycles. Both of those commits assumed that any Activities or Fragments that had a SentryNavEffect would only launch other Activities or Fragments that also had SentryNavEffects. This commit handles three remaining (and important) corner cases: 1. Ensuring spans don't get lost when the user returns to an Activity or Fragment they already visited. (We now start a new nav transaction when the user returns if the previous transaction finished in the meantime.) 2. Ensuring Activities or Fragments with SentryNavEffects play nicely with Activities or Fragments without them. (We no longer keep stale nav data in the shared IScope.) 3. Ensuring Activities' ui.load transactions interoperate well with Nav3 transactions. (Nav3 transactions now consistently defer to ui.load transactions, like we do for Nav2.) See the PR description of https://github.com/getsentry/sentry-java/pull/6480 for more details. * chore(deps): Scan one Gradle directory with Dependabot (#6603) The separate sample and test builds read the SDK build's version catalog, so listing them as Dependabot directories opened one PR per directory for the same catalog bump. The root directory covers the catalog; the three versions only the samples declared move into it. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> * build(deps): Bump OpenTelemetry to 2.33.1 (#6602) * build(deps): Bump OpenTelemetry to 2.33.1 Align the OpenTelemetry instrumentation and Java agent with SDK 1.67.0. Update tests for the SDK optimization that returns non-recording spans when no span processor is configured. Co-Authored-By: Claude <noreply@anthropic.com> * changelog * changelog * build(deps): Align OpenTelemetry semantic conventions Use the semantic convention versions tested with OpenTelemetry Java instrumentation 2.33.1. Co-Authored-By: Claude <noreply@anthropic.com> * docs(changelog): Clarify OpenTelemetry dependency bump List the semantic convention upgrades and explain how missing span processors affect outgoing Sentry trace headers. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> * build(deps): Prepare for Spring Boot 4.2 (#6532) * build(deps): Bump Spring Boot to 4.2.0-RC2 Align OpenTelemetry with the version managed by Spring Boot 4.2. Keep RestTemplate support compiling despite upstream removal warnings and update tests for OpenTelemetry's no-processor optimization. Co-Authored-By: Claude <noreply@anthropic.com> * changelog * fix(spring): Suppress RestTemplate removal warnings Keep the Spring 7 sample compiling with warnings treated as errors after the Spring Boot 4.2 dependency bump. Co-Authored-By: Claude <noreply@anthropic.com> * build(deps): Add Spring milestone repository Resolve Spring Boot 4.2 release candidate plugin and framework artifacts in clean CI environments. Co-Authored-By: Claude <noreply@anthropic.com> * test(spring): Build valid GraphQL operation documents Include a selection set so GraphQL Java 25 can print the test operations used by Spring subscription error reporting tests. Co-Authored-By: Claude <noreply@anthropic.com> * build(deps): Bump OpenTelemetry to 2.33.1 Align the OpenTelemetry instrumentation and Java agent with SDK 1.67.0. Update tests for the SDK optimization that returns non-recording spans when no span processor is configured. Co-Authored-By: Claude <noreply@anthropic.com> * changelog * build(spring): Keep Spring Boot 4.1 dependency Limit the preparation PR to forward-compatible source and test changes. Remove the Spring Boot 4.2 release candidate bump, milestone repositories, and dependency changelog entry. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> * chore(deps): bump org.hsqldb:hsqldb from 2.6.1 to 2.7.4 (#6572) Bumps org.hsqldb:hsqldb from 2.6.1 to 2.7.4. --- updated-dependencies: - dependency-name: org.hsqldb:hsqldb dependency-version: 2.7.4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump the github-actions group across 1 directory with 4 updates (#6610) Bumps the github-actions group with 4 updates in the / directory: [getsentry/github-workflows/danger](https://github.com/getsentry/github-workflows), [getsentry/craft](https://github.com/getsentry/craft), [getsentry/github-workflows/updater](https://github.com/getsentry/github-workflows) and [getsentry/github-workflows/validate-pr](https://github.com/getsentry/github-workflows). Updates `getsentry/github-workflows/danger` from 3.4.1 to 3.5.0 - [Release notes](https://github.com/getsentry/github-workflows/releases) - [Changelog](https://github.com/getsentry/github-workflows/blob/main/CHANGELOG.md) - [Commits](https://github.com/getsentry/github-workflows/compare/959162c159b866489d3fabe93327f48f9b8cb7ee...36529d71129a14967bea1fb81bcaf2a5943cf877) Updates `getsentry/craft` from 3.11.2 to 3.12.0 - [Release notes](https://github.com/getsentry/craft/releases) - [Changelog](https://github.com/getsentry/craft/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/craft/compare/9567926a606072678ef367b02445c4f99f374795...0da9309228741a4c300d3c87ed7dcafa8f703525) Updates `getsentry/github-workflows/updater` from 3.4.1 to 3.5.0 - [Release notes](https://github.com/getsentry/github-workflows/releases) - [Changelog](https://github.com/getsentry/github-workflows/blob/main/CHANGELOG.md) - [Commits](https://github.com/getsentry/github-workflows/compare/959162c159b866489d3fabe93327f48f9b8cb7ee...36529d71129a14967bea1fb81bcaf2a5943cf877) Updates `getsentry/github-workflows/validate-pr` from 3.4.1 to 3.5.0 - [Release notes](https://github.com/getsentry/github-workflows/releases) - [Changelog](https://github.com/getsentry/github-workflows/blob/main/CHANGELOG.md) - [Commits](https://github.com/getsentry/github-workflows/compare/959162c159b866489d3fabe93327f48f9b8cb7ee...36529d71129a14967bea1fb81bcaf2a5943cf877) --- updated-dependencies: - dependency-name: getsentry/github-workflows/danger dependency-version: 3.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: getsentry/craft dependency-version: 3.12.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: getsentry/github-workflows/updater dependency-version: 3.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: getsentry/github-workflows/validate-pr dependency-version: 3.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump com.github.ben-manes.versions from 0.42.0 to 0.67.0 (#6573) Bumps com.github.ben-manes.versions from 0.42.0 to 0.67.0. --- updated-dependencies: - dependency-name: com.github.ben-manes.versions dependency-version: 0.67.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): Bump Spotless to 8.11.0 (#6612) * build(deps): Bump Spotless to 8.11.0 Spotless 8.11.0 bumps the default google-java-format from 1.28.0 to 2.0.0 and ktfmt from 0.63 to 0.65, so this also reformats the codebase with make format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * build(android): Update detekt baseline for ktfmt trailing commas Detekt baseline IDs embed the flagged code, so the trailing commas ktfmt 0.65 adds no longer matched two entries in sentry-android-distribution. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ref(distribution): Use check, require and error instead of throwing Fixes the UseCheckOrError and UseRequire detekt issues instead of keeping them in the baseline. The thrown exception types and messages stay the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * ci: Add PR risk (Jev) workflow (#6615) * ci: Add PR risk (Jev) workflow Copy getsentry/toolkit's pr-risk-jev.yml, which labels non-draft PRs risk: low/medium/high via getsentry/pr-risk-action. Pin actions/upload-artifact to the SHA the other workflows here use. Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io> * ci: Bump pr-risk-action and align github-script pin Pin pr-risk-action to the latest main commit, which bumps Node to 22.23.4 for a security fix. Use the github-script v9.0.0 SHA the other workflows in this repo already use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * build(deps): Bump Room 3 to 3.0.3 (#6616) Room 3 is now stable, so move off 3.0.0-rc01. Room 3.0.3 only needs androidx.sqlite 2.7.x, so the sample's SQLite drivers go back from 2.8.0-alpha03 to stable 2.7.1. The sqliteRc catalog key is renamed to sqliteDrivers since it no longer tracks an RC, which also stops Dependabot from picking pre-releases for it. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * chore(deps): bump coroutines from 1.6.1 to 1.11.0 (#6609) Bumps `coroutines` from 1.6.1 to 1.11.0. Updates `org.jetbrains.kotlinx:kotlinx-coroutines-core` from 1.6.1 to 1.11.0 - [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases) - [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md) - [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.1...1.11.0) Updates `org.jetbrains.kotlinx:kotlinx-coroutines-android` from 1.6.1 to 1.11.0 - [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases) - [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md) - [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.1...1.11.0) Updates `org.jetbrains.kotlinx:kotlinx-coroutines-test` from 1.6.1 to 1.11.0 - [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases) - [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md) - [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.1...1.11.0) --- updated-dependencies: - dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android dependency-version: 1.11.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core dependency-version: 1.11.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-test dependency-version: 1.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(ktor-client): Send replay network timestamps in milliseconds (#6619) * fix(ktor-client): Send replay network timestamps in milliseconds Session Replay reads the HTTP start and end timestamps on a breadcrumb as epoch milliseconds, which is what sentry-okhttp sends. sentry-ktor-client divided the epoch nanoseconds by 1000, so it sent microseconds and its replay network spans landed 1000x too far in the future. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * changelog * changelog --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * chore(ai): Remove stale sentry-for-ai skills from agents.toml (#6620) getsentry/sentry-for-ai removed sentry-code-review and sentry-pr-code-review, dissolved the sentry-workflow router, and moved sentry-fix-issues to skills-legacy, which dotagents no longer resolves. Project install on main fails on the first of them. Also add --project to the dotagents commands in the header. Since dotagents 3.x the default scope is global (~/.agents/), so the commands as written do nothing for this repo. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * build(android): Include Android resources in navigation3 unit tests (#6618) AGP 9.5 registers a Compose Preview task for every Compose module and fails to create it when unit tests exclude Android resources. Normal builds never create that task, but anything that creates every task, such as an LSP's Gradle import or `./gradlew tasks --all`, fails on navigation3. Every other Android module already sets this. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * chore(deps): bump feign from 11.6 to 13.17 (#6606) Bumps `feign` from 11.6 to 13.17. Updates `io.github.openfeign:feign-core` from 11.6 to 13.17 - [Release notes](https://github.com/openfeign/feign/releases) - [Changelog](https://github.com/OpenFeign/feign/blob/13.17/CHANGELOG.md) - [Commits](https://github.com/openfeign/feign/compare/11.6...13.17) Updates `io.github.openfeign:feign-gson` from 11.6 to 13.17 - [Release notes](https://github.com/openfeign/feign/releases) - [Changelog](https://github.com/OpenFeign/feign/blob/13.17/CHANGELOG.md) - [Commits](https://github.com/openfeign/feign/compare/11.6...13.17) --- updated-dependencies: - dependency-name: io.github.openfeign:feign-core dependency-version: '13.17' dependency-type: direct:production update-type: version-update:semver-major - dependency-name: io.github.openfeign:feign-gson dependency-version: '13.17' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump slf4j from 1.7.30 to 2.0.20 (#6536) * chore(deps): bump slf4j from 1.7.30 to 2.0.20 Bumps `slf4j` from 1.7.30 to 2.0.20. Updates `org.slf4j:slf4j-api` from 1.7.30 to 2.0.20 Updates `org.slf4j:slf4j-jdk14` from 1.7.30 to 2.0.20 --- updated-dependencies: - dependency-name: org.slf4j:slf4j-api dependency-version: 2.0.20 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: org.slf4j:slf4j-jdk14 dependency-version: 2.0.20 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Apply suggestion from @adinauer --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com> * chore(deps): bump com.google.devtools.ksp from 2.3.13 to 2.3.14 (#6630) Bumps [com.google.devtools.ksp](https://github.com/google/ksp) from 2.3.13 to 2.3.14. - [Release notes](https://github.com/google/ksp/releases) - [Commits](https://github.com/google/ksp/compare/2.3.13...2.3.14) --- updated-dependencies: - dependency-name: com.google.devtools.ksp dependency-version: 2.3.14 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump androidx.annotation:annotation from 1.9.1 to 1.11.0 (#6627) Bumps androidx.annotation:annotation from 1.9.1 to 1.11.0. --- updated-dependencies: - dependency-name: androidx.annotation:annotation dependency-version: 1.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump org.apache.tomcat:tomcat-catalina from 9.0.108 to 11.0.27 (#6628) * chore(deps): bump org.apache.tomcat:tomcat-catalina Bumps org.apache.tomcat:tomcat-catalina from 9.0.108 to 11.0.27. --- updated-dependencies: - dependency-name: org.apache.tomcat:tomcat-catalina dependency-version: 11.0.27 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Apply suggestion from @runningcode --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Antonis Lilis <antonis.lilis@sentry.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> Co-authored-by: Adam Brown <adam.brown@sentry.io> Co-authored-by: Lazizbek Ergashev <20501725+lazerg@users.noreply.github.com> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Gene Wright <gene.wright@sentry.io> Co-authored-by: J-P Nurmi <jpnurmi@gmail.com> Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com> Co-authored-by: 0xadam-brown <281682121+0xadam-brown@users.noreply.github.com> Co-authored-by: sentry-release-bot[bot] <180476844+sentry-release-bot[bot]@users.noreply.github.com> Co-authored-by: Markus Hintersteiner <markus.hintersteiner@sentry.io>
1 parent da410bc commit e59791f

729 files changed

Lines changed: 14953 additions & 6644 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.craft.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ targets:
119119
packageUrl: https://central.sonatype.com/artifact/io.sentry/sentry-android-ndk
120120
mainDocsUrl: https://docs.sentry.io/platforms/android/
121121
apiDocsUrl: https://javadoc.io/doc/io.sentry
122+
maven:io.sentry:sentry-android-ndk-outproc:
123+
name: io.sentry:sentry-android-ndk-outproc
124+
packageUrl: https://central.sonatype.com/artifact/io.sentry/sentry-android-ndk-outproc
125+
mainDocsUrl: https://docs.sentry.io/platforms/android/configuration/using-ndk/
126+
apiDocsUrl: https://javadoc.io/doc/io.sentry
122127
maven:io.sentry:sentry-android-timber:
123128
name: io.sentry:sentry-android-timber
124129
packageUrl: https://central.sonatype.com/artifact/io.sentry/sentry-android-timber

‎.cursor/rules/e2e_tests.mdc‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,14 @@ match on values only they produce.
5656
## The OpenTelemetry agent
5757

5858
The agent must not run in the test's JVM, because it would instrument the test's own HTTP client
59-
and server. The Spring Boot modules have an `agentFixture` source set with the app. `AgentApp`
60-
starts it once per test JVM in a child process, with `ChildJvmApp` and the agent jar passed through
59+
and server. The `io.sentry.otel-agent-tests` plugin in `build-logic` gives the Spring Boot modules
60+
an `agentFixture` source set with the app, the `integrationTestOtelAgent` suite and the built agent
61+
jar; each module adds only the dependencies of its Spring Boot line. `AgentApp` starts the app once
62+
per test JVM in a child process, with `ChildJvmApp` and the agent jar passed through
6163
`ChildJvmTestArguments`. The suite's task runs with the agent initializing Sentry, and
6264
`integrationTestOtelAgentWithoutAutoInit` runs the same tests with the Spring Boot starter doing
63-
it. Gradle runs the two in parallel.
65+
it. Gradle runs the two in parallel. `otelAgentTests()` in a `springBootMatrix` block registers
66+
both on each version.
6467

6568
## Running them
6669

‎.github/ISSUE_TEMPLATE/bug_report_android.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ body:
1010
options:
1111
- sentry-android
1212
- sentry-android-ndk
13+
- sentry-android-ndk-outproc
1314
- sentry-android-timber
1415
- sentry-android-fragment
1516
- sentry-android-navigation3

‎.github/dependabot.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ registries:
77
password: dummy # Required by dependabot
88
updates:
99
- package-ecosystem: "gradle"
10-
# The root build doesn't include the separate sample and test builds.
11-
directories:
12-
- "/"
13-
- "/sentry-samples/sentry-samples-android"
14-
- "/sentry-android-integration-tests"
15-
- "/sentry-samples"
10+
# The separate sample and test builds read this build's version catalog, so one directory
11+
# covers them. Listing them too opens one PR per directory for the same bump.
12+
directory: "/"
1613
registries:
1714
- gradle-plugin-portal
1815
schedule:
1916
interval: "daily"
2017
ignore:
2118
- dependency-name: "org.springframework.boot*"
19+
- dependency-name: "io.opentelemetry*"
20+
# DGS 5+ needs Spring Boot 3; the sample is on Spring Boot 2.
21+
- dependency-name: "com.netflix.graphql.dgs*"
2222
commit-message:
2323
prefix: "chore(deps)"
2424
- package-ecosystem: "github-actions"

‎.github/workflows/agp-matrix.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
agp: [ '9.0.0', '9.2.1', '9.4.0' ]
20+
agp: [ '9.0.0', '9.4.0', '9.5.1' ]
2121
integrations: [ true, false ]
2222

2323
name: AGP Matrix Release - AGP ${{ matrix.agp }} - Integrations ${{ matrix.integrations }}
2424
env:
2525
VERSION_AGP: ${{ matrix.agp }}
2626
APPLY_SENTRY_INTEGRATIONS: ${{ matrix.integrations }}
2727
# Upload replay snapshots from one cell only. Forks don't have access to the upload secret.
28-
UPLOAD_REPLAY_SNAPSHOTS: ${{ matrix.agp == '9.4.0' && matrix.integrations && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
28+
UPLOAD_REPLAY_SNAPSHOTS: ${{ matrix.agp == '9.5.1' && matrix.integrations && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
2929

3030
steps:
3131
- name: Checkout Repo

‎.github/workflows/danger.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ jobs:
88
danger:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: getsentry/github-workflows/danger@959162c159b866489d3fabe93327f48f9b8cb7ee # v3
11+
- uses: getsentry/github-workflows/danger@36529d71129a14967bea1fb81bcaf2a5943cf877 # v3

‎.github/workflows/pr-risk-jev.yml‎

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: PR Risk (Jev)
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened, ready_for_review, edited]
6+
workflow_dispatch:
7+
inputs:
8+
pr_number:
9+
description: Pull request number to analyze
10+
required: true
11+
type: number
12+
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
17+
concurrency:
18+
group: pr-risk-jev-${{ github.event.pull_request.number || inputs.pr_number }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
risk:
23+
name: PR risk (Jev)
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 10
26+
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false
27+
steps:
28+
# The Action reads PR Git objects without checking out or executing PR code.
29+
- name: Classify PR risk
30+
id: risk
31+
uses: getsentry/pr-risk-action@1cdeab5ada06969e5376666b3a79f444c2f41a67 # main
32+
env:
33+
AI_GATEWAY_API_KEY: ${{ secrets.AI_GATEWAY_API_KEY }}
34+
with:
35+
repo: ${{ github.repository }}
36+
pr-number: ${{ github.event.pull_request.number || inputs.pr_number }}
37+
expected-head-sha: ${{ github.event.pull_request.head.sha }}
38+
result-path: risk-pr-result.json
39+
40+
- name: Publish risk label
41+
if: ${{ !cancelled() && steps.risk.outcome != 'skipped' }}
42+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
43+
env:
44+
PR_NUMBER: ${{ github.event.pull_request.number || inputs.pr_number }}
45+
with:
46+
script: |
47+
// Only this trusted workflow publishes labels; PR source is never executed.
48+
const fs = require('node:fs');
49+
if (!fs.existsSync('risk-pr-result.json')) {
50+
core.warning('Risk analysis did not produce a result; no label was published.');
51+
return;
52+
}
53+
const result = JSON.parse(fs.readFileSync('risk-pr-result.json', 'utf8'));
54+
const prNumber = Number(process.env.PR_NUMBER);
55+
const repo = context.repo;
56+
const colors = { low: '0E8A16', medium: 'FBCA04', high: 'B60205' };
57+
const riskLabels = Object.keys(colors).map(risk => `risk: ${risk}`);
58+
if (!Number.isSafeInteger(prNumber) || prNumber <= 0
59+
|| result.number !== prNumber || result.repo !== `${repo.owner}/${repo.repo}`
60+
|| typeof result.status !== 'string'
61+
|| (result.status === 'ok' && !Object.hasOwn(colors, result.risk_label))) {
62+
throw new Error('Risk result does not match this PR or a valid risk class.');
63+
}
64+
const snapshot = result.snapshot;
65+
if (result.status === 'pr_changed' || !snapshot?.source_head_sha || !snapshot?.source_base_sha) {
66+
core.warning('Risk analysis has no current revision; no label was published.');
67+
return;
68+
}
69+
const { data: pr } = await github.rest.pulls.get({ ...repo, pull_number: prNumber });
70+
if (pr.state !== 'open' || pr.head.sha !== snapshot.source_head_sha
71+
|| pr.base.sha !== snapshot.source_base_sha) {
72+
core.warning('PR changed after risk analysis; no label was published.');
73+
return;
74+
}
75+
const target = result.status === 'ok' ? `risk: ${result.risk_label}` : null;
76+
const existing = pr.labels.map(label => label.name);
77+
if (target && !existing.includes(target)) {
78+
try {
79+
await github.rest.issues.getLabel({ ...repo, name: target });
80+
} catch (error) {
81+
if (error.status !== 404) throw error;
82+
try {
83+
await github.rest.issues.createLabel({
84+
...repo, name: target, color: colors[result.risk_label],
85+
description: `PR risk score: ${result.risk_label}`,
86+
});
87+
} catch (error) {
88+
if (error.status !== 422) throw error;
89+
// Another PR may have created the shared repository label.
90+
await github.rest.issues.getLabel({ ...repo, name: target });
91+
}
92+
}
93+
await github.rest.issues.addLabels({ ...repo, issue_number: prNumber, labels: [target] });
94+
}
95+
// A failed classification must not leave an earlier low/medium/high verdict.
96+
for (const name of existing.filter(name => riskLabels.includes(name) && name !== target)) {
97+
try {
98+
await github.rest.issues.removeLabel({ ...repo, issue_number: prNumber, name });
99+
} catch (error) {
100+
if (error.status !== 404) throw error;
101+
}
102+
}
103+
const { data: latest } = await github.rest.pulls.get({ ...repo, pull_number: prNumber });
104+
if (target && (latest.state !== 'open' || latest.head.sha !== pr.head.sha
105+
|| latest.base.sha !== pr.base.sha || latest.title !== pr.title || latest.body !== pr.body)) {
106+
await github.rest.issues.removeLabel({ ...repo, issue_number: prNumber, name: target });
107+
core.warning('PR changed while publishing; removed the outdated risk label.');
108+
return;
109+
}
110+
if (!target) core.warning(`PR remains unclassified: ${result.status}. Previous risk labels were cleared.`);
111+
core.info(target ? `Published ${target}` : 'No risk label published.');
112+
113+
- name: Upload risk result
114+
if: always()
115+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
116+
with:
117+
name: pr-risk-jev-${{ github.event.pull_request.number || inputs.pr_number }}
118+
path: risk-pr-result.json
119+
if-no-files-found: warn
120+
retention-days: 30

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
# Needs to be set, otherwise git describe --tags will fail with: No names found, cannot describe anything
3434
fetch-depth: 0
3535
- name: Prepare release
36-
uses: getsentry/craft@9567926a606072678ef367b02445c4f99f374795 # 3.11.2
36+
uses: getsentry/craft@0da9309228741a4c300d3c87ed7dcafa8f703525 # 3.12.0
3737
env:
3838
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
3939
with:

‎.github/workflows/update-deps.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
native:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: getsentry/github-workflows/updater@959162c159b866489d3fabe93327f48f9b8cb7ee # v3
21+
- uses: getsentry/github-workflows/updater@36529d71129a14967bea1fb81bcaf2a5943cf877 # v3
2222
with:
2323
path: scripts/update-sentry-native-ndk.sh
2424
name: Native SDK

‎.github/workflows/validate-pr.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
permissions:
1111
pull-requests: write
1212
steps:
13-
- uses: getsentry/github-workflows/validate-pr@959162c159b866489d3fabe93327f48f9b8cb7ee # v3
13+
- uses: getsentry/github-workflows/validate-pr@36529d71129a14967bea1fb81bcaf2a5943cf877 # v3
1414
with:
1515
app-id: ${{ vars.SDK_MAINTAINER_BOT_APP_ID }}
1616
private-key: ${{ secrets.SDK_MAINTAINER_BOT_PRIVATE_KEY }}

0 commit comments

Comments
 (0)