Skip to content

Commit 19c10ca

Browse files
maxhovdependabot[bot]stefanosianoromtsngetsentry-bot
authored
Extend CheckInUtils with check-in for a specific environment (#3889)
* Bump reactivecircus/android-emulator-runner from 2.30.1 to 2.31.0 (#3530) Bumps [reactivecircus/android-emulator-runner](https://github.com/reactivecircus/android-emulator-runner) from 2.30.1 to 2.31.0. - [Release notes](https://github.com/reactivecircus/android-emulator-runner/releases) - [Changelog](https://github.com/ReactiveCircus/android-emulator-runner/blob/main/CHANGELOG.md) - [Commits](ReactiveCircus/android-emulator-runner@6b0df4b...77986be) --- updated-dependencies: - dependency-name: reactivecircus/android-emulator-runner dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump codecov/codecov-action from 4.3.1 to 4.5.0 (#3533) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.3.1 to 4.5.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@5ecb98a...e28ff12) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stefano <[email protected]> * [SR] Session Replay (#3339) * Add new sentry-android-replay module * Add screenshot recorder * Add sentry replay envelope and event * Add TODOs and license headers * Api dump * Formatting * Lint * Format code * More comments * Disable detekt plugin for now * WIP * Add replay envelopes * Remove jsonValue * Remove * Fix json * Finalize replay envelopes * Introduce MapObjectReader * Add missing test * Add test for MapObjectReader * Add MapObjectWriter change * Add finals * Fix test * Fix test * Address review * Add finals and annotations * Specify SHA for license headers * Address review from Dhiogo * Address review from Markus * Remove public captureReplay method * Fix test * api dump * api dump * Address review from Markus * Api dump * Add replay integration * Uncomment redacting * Update proguard rules * Add missing rule for AndroidTest * Add ReplayCache tests * Add tests * Add SessionReplayOptions * Call listeners when installing RootViewsSpy * Call listeners when installing RootViewsSpy * SessionReplayOptions -> SentryReplayOptions * Fix test * Add AndroidManifest options for replays * Add buffer mode and link replays with events/transactions * Pass hint to captureReplay * Better error handling * recycler lastScreenshot before re-assigning * Expose ReplayCache as public api * Fix redacting out of sync * _experimental -> experimental * Merge conflicts * Fix tests * Add more tests * Improve ReplayCache logic * frameUsec -> frameDurationUsec * bottom/right -> height/width * add todos * duration -> durationMs * replaId non-nullable * More conflicts * More conflicts * Fix tests * Address PR review * Add kdoc * Add kdoc * Fix tests * Add comment for experimental options * Do not run recorder if full session was not sampled * Add more tests * Add session deadline of 1h * Clean up older replays when starting a new one * Remove unnecessary extension fun * Safe executors * Fix crashing MediaCodec and use density to determine recording resolution * Add redact options and align naming * Fix tests * Fix tests * WIP * Try-catch release of encoder * Support orientation change for session mode * WIP * Spotless * TODO * Update sentry/src/main/java/io/sentry/SentryReplayOptions.java Co-authored-by: Markus Hintersteiner <[email protected]> * More gates * Revert addAll * Fix conflicts * fix test * release: 7.8.0-alpha.0 * Introduce CaptureStrategy for buffer and session modes * Formatting * WIP * Expose public API for flutter * Spotless * Spotless * Remove breadcrumb import * Send temporary breadcrumbs and add test * Formatting * Sort rrweb events * Formatting * Expose replayCacheDir * Capture network requests * Change op name to resource.http * feat(replay): Add `sendReplay` method for Hybrid SDKs * fix apiDump * Address PR review * Capture motion events as incremental rrweb events * Spotless * Revert * Changelog * release: 7.9.0-alpha.1 * Fix test * WIP * Adhere to rrweb move event expectations * formatting * Align breadcrumbs with frontend and iOS * Add tests and fix deserialization * Rotate buffered motion events in buffer mode * Add Nullables * Address PR feedback * Formatting * Rotate current events until segment end exclusively * Allow rrweb breadcrumb customization from hybrid SDKs * Fix proguard rules * WIP * Add tests * Detect obscured views * revert some thigns * Remove commented code * Suppress lint * Support multi-touch gestures * Address PR feedback * Changelog * release: 7.11.0-alpha.2 * Make multi-touch work * Fix tests * WIP * Capture screen names as urls for replay * Fix * Ignore warning * Address PR feedback * Tests * Add quality settings * Fix redacting out of sync * Remove time measuring * Mark isEnableScreenTracking as experimental * Format code * Address PR feedback * Clean up * Spotless * Format code * Changelog * release: 7.12.0-alpha.3 * [SR] Add `redactClasses` option (#3546) Co-authored-by: Roman Zavarnitsyn <[email protected]> * misc(changelog): Prepare for next alpha * fix(changelog): Bump alpha version number * release: 7.12.0-alpha.4 * Redaction fixes for RN * Add stopgap for offline session recording * Recycle unused bitmap * Add tests for sentry * Add ReplayIntegrationTest * Replay SmokeTest * Fix test * Fix test * Fix events linking with buffered replays * Changelog --------- Co-authored-by: Sentry Github Bot <[email protected]> Co-authored-by: Markus Hintersteiner <[email protected]> Co-authored-by: getsentry-bot <[email protected]> Co-authored-by: getsentry-bot <[email protected]> Co-authored-by: Krystof Woldrich <[email protected]> Co-authored-by: Krystof Woldrich <[email protected]> * release: 7.12.0 * Bump github/codeql-action from 3.25.10 to 3.25.11 (#3529) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.10 to 3.25.11. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@23acc5c...b611370) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump JamesIves/github-pages-deploy-action from 4.5.0 to 4.6.1 (#3531) Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.5.0 to 4.6.1. - [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases) - [Commits](JamesIves/github-pages-deploy-action@65b5dfd...5c6e9e9) --- updated-dependencies: - dependency-name: JamesIves/github-pages-deploy-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump gradle/actions (#3532) Bumps [gradle/actions](https://github.com/gradle/actions) from 2cd2a6e951bd0b53f55a08e4e4c6f2586f3a36b9 to cdbbabd09cff07936e1c9dbe8c9d4b6ac2ef7156. - [Release notes](https://github.com/gradle/actions/releases) - [Commits](gradle/actions@2cd2a6e...cdbbabd) --- updated-dependencies: - dependency-name: gradle/actions dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add sentry-android-replay module to craft and readme (#3578) * Check app start spans time and foreground state (#3550) * App start now takes AppStartMetrics.appLaunchedInForeground variable to add spans to the transaction * App starts longer than 1 minute are dropped (same as Firebase) * added Activity lifecycle registration to check start launch time and foreground status * added AppStartMetrics.registerApplicationForegroundCheck in the SentryPerformanceProvider and SentryAndroid.init, other than AppStartMetrics.onApplicationCreate * ActivityLifecycleIntegration now reads first activity creation on create instead of class instantiation * AppStartMetrics stops app start profiler if no activity is being created * release: 7.12.1 * Bump github/codeql-action from 3.25.11 to 3.25.13 (#3591) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.11 to 3.25.13. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@b611370...2d79040) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump reactivecircus/android-emulator-runner from 2.31.0 to 2.32.0 (#3573) Bumps [reactivecircus/android-emulator-runner](https://github.com/reactivecircus/android-emulator-runner) from 2.31.0 to 2.32.0. - [Release notes](https://github.com/reactivecircus/android-emulator-runner/releases) - [Changelog](https://github.com/ReactiveCircus/android-emulator-runner/blob/main/CHANGELOG.md) - [Commits](ReactiveCircus/android-emulator-runner@77986be...f0d1ed2) --- updated-dependencies: - dependency-name: reactivecircus/android-emulator-runner dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump JamesIves/github-pages-deploy-action from 4.6.1 to 4.6.3 (#3590) Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.6.1 to 4.6.3. - [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases) - [Commits](JamesIves/github-pages-deploy-action@5c6e9e9...94f3c65) --- updated-dependencies: - dependency-name: JamesIves/github-pages-deploy-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump gradle/actions (#3597) Bumps [gradle/actions](https://github.com/gradle/actions) from cdbbabd09cff07936e1c9dbe8c9d4b6ac2ef7156 to fd87365911aa12c016c307ea21313f351dc53551. - [Release notes](https://github.com/gradle/actions/releases) - [Commits](gradle/actions@cdbbabd...fd87365) --- updated-dependencies: - dependency-name: gradle/actions dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump gradle/wrapper-validation-action from 3.4.2 to 3.5.0 (#3589) Bumps [gradle/wrapper-validation-action](https://github.com/gradle/wrapper-validation-action) from 3.4.2 to 3.5.0. - [Release notes](https://github.com/gradle/wrapper-validation-action/releases) - [Commits](gradle/wrapper-validation-action@8842585...f9c9c57) --- updated-dependencies: - dependency-name: gradle/wrapper-validation-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump Spring Boot to 3.3.2 (#3541) * Bump Spring Boot to 3.3.1 * changelog * add specific classpath dependency for commons compress * bump to latest patch release of spring boot --------- Co-authored-by: Lukas Bloder <[email protected]> * [SR] Capture Replays for ANRs and crashes (#3565) * release: 7.13.0 * Fix lazy select queries instrumentation (#3604) * added SentryCrossProcessCursor wrapper * SQLiteSpanManager now wraps CrossProcessCursors to start a span only when the cursor is filled with data * Avoid ArrayIndexOutOfBoundsException on Android cpu data collection (#3598) * added ArrayIndexOutOfBoundsException to try catch block in AndroidCpuCollector * [SR] ANR with buffered Replay integration test (#3612) * [SR] Buffer mode improvements (#3622) * Persist buffer replay type when switching to session * Ensure no gaps in segment timestamps when converting strategies * Properly store screen name at start for buffer mode * Changelog * [SR] Gesture/touch support for Flutter (#3623) * Persist buffer replay type when switching to session * Ensure no gaps in segment timestamps when converting strategies * Properly store screen name at start for buffer mode * Changelog * Decouple gesture tracking from WindowRecorder * Format code * Add tests * Changelog * Fix app start spans missing from Pixel devices (#3634) * added post on main thread to post check on main thread * [SR] Fix Session Replay crashes (#3628) * release: 7.14.0 * Verify sentry-android-replay for Google Play SDK Console (#3651) * Add verification file for Play Console * Update Changelog * Update Changelog * [SR] Rename errorSampleRate to onErrorSampleRate (#3637) * Rename errorSampleRate to onErrorSampleRate * pr id * Avoid stopping appStartProfiler after application creation (#3630) * AppStartMetrics stops appStartProfiler only if no activity ever started * Bump JamesIves/github-pages-deploy-action from 4.6.3 to 4.6.4 (#3681) Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.6.3 to 4.6.4. - [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases) - [Commits](JamesIves/github-pages-deploy-action@94f3c65...920cbb3) --- updated-dependencies: - dependency-name: JamesIves/github-pages-deploy-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump github/codeql-action from 3.25.13 to 3.26.6 (#3672) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.13 to 3.26.6. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@2d79040...4dd1613) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [SR] Detect dominant color for TextViews with Spans (#3682) * Bump github/codeql-action from 3.26.6 to 3.26.7 (#3692) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.6 to 3.26.7. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@4dd1613...8214744) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump gradle/actions (#3691) Bumps [gradle/actions](https://github.com/gradle/actions) from fd87365911aa12c016c307ea21313f351dc53551 to 0d30c9111cf47a838eb69c06d13f3f51ab2ed76f. - [Release notes](https://github.com/gradle/actions/releases) - [Commits](gradle/actions@fd87365...0d30c91) --- updated-dependencies: - dependency-name: gradle/actions dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [SR] Add custom redaction options (#3689) * Add support for `feedback` envelope header item type (#3687) * Bump github/codeql-action from 3.26.7 to 3.26.8 (#3708) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.7 to 3.26.8. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@8214744...294a9d9) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Ensure app context is used even when SDK is initialized via Activity Context (#3669) * Ensure app context is used even when SDK is initialized via Activity Context * Update Changelog * Exclude saucelabs from leakcanary * Exclude saucelabs TouchListener from leakCanary * Allow leakcanary for non-debug ui-test builds * Fix lint * Adds breadcrumb origin field (#3727) * Adds breadcrumb origin field * Updates api dump * Updates test cases * Updates serialisation tests * Adds changelog * Exclude testfairy from obfuscation * Revert "Exclude testfairy from obfuscation" This reverts commit 9900d1e. * Exclude any testfairy touchlistener static fields from LeakCanary --------- Co-authored-by: Markus Hintersteiner <[email protected]> * Replace Calendar.getInstance with System.currentTimeMillis for breadcrumb ctor (#3736) * chore(readme): Add info about updated release channels (#3773) * Update README.md * fix copy/paste error * [QA] Lazily load SentryOptions members (#3749) * Make AtomicClientReportStorage constructor lazy * Lazily initialize things we dont need * Empty experimental options * Format code * Make LazyEvaluator thread-safe * Fix tests * Fix .api * Use LazyEvaluator for heavy SentryOptions * Changelog * revert * tests --------- Co-authored-by: Sentry Github Bot <[email protected]> Co-authored-by: Markus Hintersteiner <[email protected]> * [QA] Fix potential ANRs due to default integrations (#3778) * Fix don't register any full drawn listeners if feature is not enabled * Offload app components breadcrumbs to background thread * Offload system events breadcrumbs to background thread * Update Changelog * Fix flaky tests * Remove session breadcrumbs * Fix tests * Address PR feedback * [SR] Support Jetpack Compose redaction (#3739) * WIP * Compose works * Custom redaction works for Compose * Formatting * Clean up * Test * Add tests * Changelog * Replace logo with sentry * formatting * Faster boundsInWindow for compose * api dump * Dont use liveliterals * [SR] Change terminology from redact/ignore to mask/unmask (#3741) * WIP * Compose works * Custom redaction works for Compose * Formatting * Clean up * Test * Add tests * Changelog * Change terminology from redact/ignore to mask/unmask * Changelog * [SR] Mask web and video views (#3775) * Replace logo with sentry * Add missing proguard rules * formatting * Faster boundsInWindow for compose * api dump * Dont use liveliterals * Remove redundant test * Increase timeout in failing test * release: 7.15.0 * Deprecate `enableTracing` in v7 (#3777) * deprecate enableTracing * changelog * [QA] Replace SecureRandom with vendored Random (#3783) * Replace SecureRandom with vendored Random * Changelog * Fix failing test * [QA] Move NDK scope sync to background thread (#3754) * Move NDK scope sync to background thread * Update Changelog * Cleanup code * [QA] Offload System.loadLibrary call to background thread (#3670) * Offload System.loadLibrary call to background thread * Update Changelog * Update CHANGELOG.md * Add meta option to attach ANR thread dumps (#3791) * Add meta option to attach ANR thread dumps * Update Changelog * fix invalid profiles when the transaction name is empty (#3747) * when the transaction name is empty, the profiles default to "unknown" * chore: Add action to warn about potentially risky PR changes (#3726) * adds config+action to warn about risky PR changes * updates wording of warning PR comment * added risky files * Bump reactivecircus/android-emulator-runner from 2.32.0 to 2.33.0 (#3786) Bumps [reactivecircus/android-emulator-runner](https://github.com/reactivecircus/android-emulator-runner) from 2.32.0 to 2.33.0. - [Release notes](https://github.com/reactivecircus/android-emulator-runner/releases) - [Changelog](https://github.com/ReactiveCircus/android-emulator-runner/blob/main/CHANGELOG.md) - [Commits](ReactiveCircus/android-emulator-runner@f0d1ed2...62dbb60) --- updated-dependencies: - dependency-name: reactivecircus/android-emulator-runner dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [QA] Make logging faster on startup (#3793) * Make logging faster on startup * Changelog * [QA] Hardcode integration names (#3794) * Hardcode integration names for tracking * Changelog * Fix tests * Fix ANRv2 test flakyness (#3798) * try to fix ANRv2 test flakyness * try to fix ANRv2 test flakyness * [QA] Make replay lazy and faster (#3799) * Make replay lazy and faster * Changelog * Bump codecov/codecov-action from 4.5.0 to 4.6.0 (#3768) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.5.0 to 4.6.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@e28ff12...b9fd7d1) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump github/codeql-action from 3.26.8 to 3.26.12 (#3787) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.8 to 3.26.12. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@294a9d9...c36620d) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump gradle/actions (#3788) Bumps [gradle/actions](https://github.com/gradle/actions) from 0d30c9111cf47a838eb69c06d13f3f51ab2ed76f to bb0c460cbf5354b0cddd15bacdf0d6aaa3e5a32b. - [Release notes](https://github.com/gradle/actions/releases) - [Commits](gradle/actions@0d30c91...bb0c460) --- updated-dependencies: - dependency-name: gradle/actions dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix ensure ndk libs are loaded before calling close (#3797) * docs(okhttp): update documented default value to match actual (#3800) Co-authored-by: Alexander Dinauer <[email protected]> Co-authored-by: Stefano <[email protected]> * Bump JamesIves/github-pages-deploy-action from 4.6.4 to 4.6.8 (#3728) Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.6.4 to 4.6.8. - [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases) - [Commits](JamesIves/github-pages-deploy-action@920cbb3...881db53) --- updated-dependencies: - dependency-name: JamesIves/github-pages-deploy-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [QA] Cache parsed Dsn (#3796) * parsed Dsn object is now cached * updated LazyEvaluator javadoc * setting a new dsn resets the cached parsed dsn * release: 7.16.0-alpha.1 * [QA] Replace setOf with HashSet.add (#3801) * remove kotlin setOf() and replace it with HashSet<>() + add() * [QA] Load lazy fields on init in the background (#3803) * Lazy fields in SentryOptions are now loaded on init in the background * use option's executor instead of a new thread to load fields * test(ui): Add critical tests run by Maestro (#3802) * ci(build): Lower gradle workers to max 2 (#3814) * Prepare Changelog for 7.16.0 release (#3816) * release: 7.16.0 * Bump github/codeql-action from 3.26.12 to 3.26.13 (#3808) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.12 to 3.26.13. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@c36620d...f779452) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump androidx test libraries (#3743) * Add callout about `addIntegrationToSdkVersion` breaking change (#3829) * Accept manifest integer values when requiring floating values (#3823) * ManifestMetadataReader now accepts integers other than floats * update benchmark devices on saucelabs (#3822) * Bump reactivecircus/android-emulator-runner from 2.32.0 to 2.33.0 (#3826) Bumps [reactivecircus/android-emulator-runner](https://github.com/reactivecircus/android-emulator-runner) from 2.32.0 to 2.33.0. - [Release notes](https://github.com/reactivecircus/android-emulator-runner/releases) - [Changelog](https://github.com/ReactiveCircus/android-emulator-runner/blob/main/CHANGELOG.md) - [Commits](ReactiveCircus/android-emulator-runner@v2.32.0...62dbb60) --- updated-dependencies: - dependency-name: reactivecircus/android-emulator-runner dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump github/codeql-action from 3.26.13 to 3.27.0 (#3827) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.13 to 3.27.0. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@f779452...6624720) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * test(critical): Add API Level matrix (#3810) * Use `Random` through `ThreadLocal<Random>` (#3835) * Use Random as a ThreadLocal<> * changelog * code review changes * Fix: Allow MaxBreadcrumb 0 / Expose MaxBreadcrumb metadata. (#3836) * expose max-breadcrumbs on meta data and implement disabled queue when maxbreadcrumbs sets to 0 * missing queue class and test * update changelog --------- Co-authored-by: Lucas <[email protected]> Co-authored-by: Stefano <[email protected]> * Bump gradle/actions (#3842) Bumps [gradle/actions](https://github.com/gradle/actions) from bb0c460cbf5354b0cddd15bacdf0d6aaa3e5a32b to 707359876a764dbcdb9da0b0ed08291818310c3d. - [Release notes](https://github.com/gradle/actions/releases) - [Commits](gradle/actions@bb0c460...7073598) --- updated-dependencies: - dependency-name: gradle/actions dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Limit emulator size to 4096M (#3875) CI runs recently started to fail due to disk size issues when creating the emulator: > ERROR | Not enough space to create userdata partition. Available: 7329.925781 MB at /home/runner/.android/avd/../avd/test.avd, need 7372.800000 MB. #skip-changelog * Fix standalone tomcat jndi issue (#3873) * fix standalone tomcat jndi issue * format * add changelog entry * adapt changelog * release: 7.17.0 * Ensure android initialization process continues even if options configuration block throws an exception (#3887) * Ensure android event processors are added even if options configuration block throws * Changelog * Add support for 16KB page sizes (Android 15) (#3620) * Add support for 16KB page sizes (Android 15) * Update Changelog * Revert NDK/min API level bump, properly apply link options instead * Fix Changelog * Exclude sentry-native Java code from being spotless-checked * Bump sentry-native to 0.7.8 * Update Changelog * Update CHANGELOG.md * release: 7.17.0-alpha.1 --------- Co-authored-by: getsentry-bot <[email protected]> Co-authored-by: getsentry-bot <[email protected]> * Do not report parsing ANR error when there are no threads (#3888) * Ensure android event processors are added even if options configuration block throws * Changelog * Do not report parsing ANR error when there are no threads * Changelog * Fix tests * [QA] Avoid collecting normal frames (#3782) * avoid keeping normal frames in memory when collecting slow/frozen frames * renamed SpanFrameMetricsCollector.getTotalFrameCount method to getSlowFrozenFrameCount * confirm no delay in UI test when there are no slow/frozen frames collected * Extend CheckInUtils with check-in for a specific environment * changelog --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stefano <[email protected]> Co-authored-by: Roman Zavarnitsyn <[email protected]> Co-authored-by: Sentry Github Bot <[email protected]> Co-authored-by: Markus Hintersteiner <[email protected]> Co-authored-by: getsentry-bot <[email protected]> Co-authored-by: getsentry-bot <[email protected]> Co-authored-by: Krystof Woldrich <[email protected]> Co-authored-by: Krystof Woldrich <[email protected]> Co-authored-by: Alexander Dinauer <[email protected]> Co-authored-by: Lukas Bloder <[email protected]> Co-authored-by: Denis Andrašec <[email protected]> Co-authored-by: Antonis Lilis <[email protected]> Co-authored-by: Karl Heinz Struggl <[email protected]> Co-authored-by: Marcin Koziński <[email protected]> Co-authored-by: LucasZF <[email protected]> Co-authored-by: Lucas <[email protected]> Co-authored-by: Stefano <[email protected]> Co-authored-by: Alexander Dinauer <[email protected]>
1 parent 5c3a5c6 commit 19c10ca

File tree

4 files changed

+91
-1
lines changed

4 files changed

+91
-1
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Features
6+
7+
- Allow passing `environment` to `CheckinUtils.withCheckIn` ([3889](https://github.com/getsentry/sentry-java/pull/3889))
8+
39
## 8.0.0-beta.2
410

511
### Breaking Changes

sentry/api/sentry.api

+2
Original file line numberDiff line numberDiff line change
@@ -5919,6 +5919,8 @@ public final class io/sentry/util/CheckInUtils {
59195919
public fun <init> ()V
59205920
public static fun isIgnored (Ljava/util/List;Ljava/lang/String;)Z
59215921
public static fun withCheckIn (Ljava/lang/String;Lio/sentry/MonitorConfig;Ljava/util/concurrent/Callable;)Ljava/lang/Object;
5922+
public static fun withCheckIn (Ljava/lang/String;Ljava/lang/String;Lio/sentry/MonitorConfig;Ljava/util/concurrent/Callable;)Ljava/lang/Object;
5923+
public static fun withCheckIn (Ljava/lang/String;Ljava/lang/String;Ljava/util/concurrent/Callable;)Ljava/lang/Object;
59225924
public static fun withCheckIn (Ljava/lang/String;Ljava/util/concurrent/Callable;)Ljava/lang/Object;
59235925
}
59245926

sentry/src/main/java/io/sentry/util/CheckInUtils.java

+43-1
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ public final class CheckInUtils {
2222
*
2323
* @param monitorSlug - the slug of the monitor
2424
* @param monitorConfig - configuration of the monitor, can be used for upserting schedule
25+
* @param environment - the name of the environment
2526
* @param callable - the {@link Callable} to be called
2627
* @return the return value of the {@link Callable}
2728
* @param <U> - the result type of the {@link Callable}
2829
*/
2930
public static <U> U withCheckIn(
3031
final @NotNull String monitorSlug,
32+
final @Nullable String environment,
3133
final @Nullable MonitorConfig monitorConfig,
3234
final @NotNull Callable<U> callable)
3335
throws Exception {
@@ -43,6 +45,9 @@ public static <U> U withCheckIn(
4345
if (monitorConfig != null) {
4446
inProgressCheckIn.setMonitorConfig(monitorConfig);
4547
}
48+
if (environment != null) {
49+
inProgressCheckIn.setEnvironment(environment);
50+
}
4651
@Nullable SentryId checkInId = scopes.captureCheckIn(inProgressCheckIn);
4752
try {
4853
return callable.call();
@@ -52,12 +57,49 @@ public static <U> U withCheckIn(
5257
} finally {
5358
final @NotNull CheckInStatus status = didError ? CheckInStatus.ERROR : CheckInStatus.OK;
5459
CheckIn checkIn = new CheckIn(checkInId, monitorSlug, status);
60+
if (environment != null) {
61+
checkIn.setEnvironment(environment);
62+
}
5563
checkIn.setDuration(DateUtils.millisToSeconds(System.currentTimeMillis() - startTime));
5664
scopes.captureCheckIn(checkIn);
5765
}
5866
}
5967
}
6068

69+
/**
70+
* Helper method to send monitor check-ins for a {@link Callable}
71+
*
72+
* @param monitorSlug - the slug of the monitor
73+
* @param monitorConfig - configuration of the monitor, can be used for upserting schedule
74+
* @param callable - the {@link Callable} to be called
75+
* @return the return value of the {@link Callable}
76+
* @param <U> - the result type of the {@link Callable}
77+
*/
78+
public static <U> U withCheckIn(
79+
final @NotNull String monitorSlug,
80+
final @Nullable MonitorConfig monitorConfig,
81+
final @NotNull Callable<U> callable)
82+
throws Exception {
83+
return withCheckIn(monitorSlug, null, monitorConfig, callable);
84+
}
85+
86+
/**
87+
* Helper method to send monitor check-ins for a {@link Callable}
88+
*
89+
* @param monitorSlug - the slug of the monitor
90+
* @param environment - the name of the environment
91+
* @param callable - the {@link Callable} to be called
92+
* @return the return value of the {@link Callable}
93+
* @param <U> - the result type of the {@link Callable}
94+
*/
95+
public static <U> U withCheckIn(
96+
final @NotNull String monitorSlug,
97+
final @Nullable String environment,
98+
final @NotNull Callable<U> callable)
99+
throws Exception {
100+
return withCheckIn(monitorSlug, environment, null, callable);
101+
}
102+
61103
/**
62104
* Helper method to send monitor check-ins for a {@link Callable}
63105
*
@@ -68,7 +110,7 @@ public static <U> U withCheckIn(
68110
*/
69111
public static <U> U withCheckIn(
70112
final @NotNull String monitorSlug, final @NotNull Callable<U> callable) throws Exception {
71-
return withCheckIn(monitorSlug, null, callable);
113+
return withCheckIn(monitorSlug, null, null, callable);
72114
}
73115

74116
/** Checks if a check-in for a monitor (CRON) has been ignored. */

sentry/src/test/java/io/sentry/util/CheckInUtilsTest.kt

+40
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,46 @@ class CheckInUtilsTest {
9292
}
9393
}
9494

95+
@Test
96+
fun `sends check-in for wrapped supplier with environment`() {
97+
Mockito.mockStatic(Sentry::class.java).use { sentry ->
98+
val scopes = mock<IScopes>()
99+
val lifecycleToken = mock<ISentryLifecycleToken>()
100+
sentry.`when`<Any> { Sentry.getCurrentScopes() }.thenReturn(scopes)
101+
sentry.`when`<Any> { Sentry.forkedScopes(any()) }.then {
102+
scopes.forkedScopes("test")
103+
}
104+
whenever(scopes.forkedScopes(any())).thenReturn(scopes)
105+
whenever(scopes.makeCurrent()).thenReturn(lifecycleToken)
106+
whenever(scopes.options).thenReturn(SentryOptions())
107+
val returnValue = CheckInUtils.withCheckIn("monitor-1", "environment-1") {
108+
return@withCheckIn "test1"
109+
}
110+
111+
assertEquals("test1", returnValue)
112+
inOrder(scopes, lifecycleToken) {
113+
verify(scopes).forkedScopes(any())
114+
verify(scopes).makeCurrent()
115+
verify(scopes).configureScope(any())
116+
verify(scopes).captureCheckIn(
117+
check {
118+
assertEquals("monitor-1", it.monitorSlug)
119+
assertEquals("environment-1", it.environment)
120+
assertEquals(CheckInStatus.IN_PROGRESS.apiName(), it.status)
121+
}
122+
)
123+
verify(scopes).captureCheckIn(
124+
check {
125+
assertEquals("monitor-1", it.monitorSlug)
126+
assertEquals("environment-1", it.environment)
127+
assertEquals(CheckInStatus.OK.apiName(), it.status)
128+
}
129+
)
130+
verify(lifecycleToken).close()
131+
}
132+
}
133+
}
134+
95135
@Test
96136
fun `sends check-in for wrapped supplier with exception`() {
97137
Mockito.mockStatic(Sentry::class.java).use { sentry ->

0 commit comments

Comments
 (0)