Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getsentry/sentry-java
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8.5.0
Choose a base ref
...
head repository: getsentry/sentry-java
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8.6.0
Choose a head ref

Commits on Mar 18, 2025

  1. Merge branch 'release/8.5.0'

    getsentry-bot committed Mar 18, 2025
    Copy the full SHA
    e72bad7 View commit details

Commits on Mar 19, 2025

  1. fix(sdk-init): Do not override user-defined SentryOptions (#4262)

    * Do not override user-defined SentryOptions
    
    * Changelog
    romtsn authored Mar 19, 2025
    Copy the full SHA
    b5b9f8b View commit details

Commits on Mar 21, 2025

  1. Copy the full SHA
    22a6316 View commit details
  2. chore: update scripts/update-sentry-native-ndk.sh to 0.8.2 (#4267)

    Co-authored-by: GitHub <noreply@github.com>
    github-actions[bot] and web-flow authored Mar 21, 2025
    Copy the full SHA
    d07899f View commit details
  3. chore(http-client): Increase http timeouts from 5s to 30s (#4276)

    * Increase http timeouts from 5s to 30s
    
    * Changelog
    romtsn authored Mar 21, 2025
    Copy the full SHA
    a859567 View commit details

Commits on Mar 24, 2025

  1. Bump github/codeql-action from 3.28.11 to 3.28.12 (#4281)

    Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.11 to 3.28.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@6bb031a...5f8171a)
    
    ---
    updated-dependencies:
    - dependency-name: github/codeql-action
      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>
    dependabot[bot] authored Mar 24, 2025
    Copy the full SHA
    dae158f View commit details
  2. Bump actions/create-github-app-token from 1.11.6 to 1.11.7 (#4280)

    Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 1.11.6 to 1.11.7.
    - [Release notes](https://github.com/actions/create-github-app-token/releases)
    - [Commits](actions/create-github-app-token@21cfef2...af35eda)
    
    ---
    updated-dependencies:
    - dependency-name: actions/create-github-app-token
      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>
    dependabot[bot] authored Mar 24, 2025
    Copy the full SHA
    f074625 View commit details
  3. fix(replay): Change bitmap config to ARGB_8888 for screenshots (#4282)

    * fix(replay): Change bitmap config to ARGB_8888 for screenshots
    
    * Changelog
    romtsn authored Mar 24, 2025
    Copy the full SHA
    2521792 View commit details

Commits on Mar 25, 2025

  1. chore: bump Spring Boot from 2.7.5 to 2.7.18 (#3496)

    * chore: bump Spring Boot from 2.7.5 to 2.7.18
    
    This update patches at least 13 vulnerabilities according to Maven Central [1].
    
    Additionally, this is the final open-source, vendor-supported version in the Spring Boot 2 release line.
    
    [1] https://mvnrepository.com/artifact/org.springframework.boot/spring-boot
    [2] https://spring.io/blog/2023/11/23/spring-boot-2-7-18-available-now#end-of-open-source-support-for-spring-boot-2x
    
    * fix changelog
    
    * add link to changelog entry
    
    ---------
    
    Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com>
    Co-authored-by: Alexander Dinauer <alexander.dinauer@sentry.io>
    3 people authored Mar 25, 2025
    Copy the full SHA
    c4c33c3 View commit details
  2. Copy the full SHA
    a27ecb4 View commit details

Commits on Mar 26, 2025

  1. added platform to SentryEnvelopeItemHeader (#4287)

    * Added `platform` to SentryEnvelopeItemHeader
    * Set platform "android" in ProfileChunk envelope items
    stefanosiano authored Mar 26, 2025
    Copy the full SHA
    801e677 View commit details
  2. Keep baggage sample rate/rand as doubles (#4279)

    * Keep baggage sample rate/rand as doubles
    
    * Fix tests
    
    * Update Changelog
    
    * Fix test
    
    * Lazily generate PropagationContext
    
    * Update sentry/src/main/java/io/sentry/Baggage.java
    
    Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com>
    
    * Revert "Lazily generate PropagationContext"
    
    This reverts commit 398c5df.
    
    ---------
    
    Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com>
    markushi and adinauer authored Mar 26, 2025
    Copy the full SHA
    1090788 View commit details

Commits on Mar 27, 2025

  1. Check for mixed SDK versions (#4270)

    * Check for mixed SDK versions
    
    * Format code
    
    * format + api
    
    ---------
    
    Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
    adinauer and getsentry-bot authored Mar 27, 2025
    Copy the full SHA
    c6e6bbc View commit details
  2. Do not enable Sentry SDK for Android when mixed versions are detected (

    …#4271)
    
    * Check for mixed SDK versions
    
    * Format code
    
    * format + api
    
    * Init noops if mixed versions detected
    
    * Add BuildConfig
    
    * config entries for agentless module sdk names
    
    ---------
    
    Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
    adinauer and getsentry-bot authored Mar 27, 2025
    Copy the full SHA
    0a04d7f View commit details
  3. Add MANIFEST.MF to Sentry JARs (#4272)

    * Check for mixed SDK versions
    
    * Format code
    
    * format + api
    
    * Init noops if mixed versions detected
    
    * Add BuildConfig
    
    * config entries for agentless module sdk names
    
    * Add MANIFEST.MF for JARs
    
    * changelog
    
    ---------
    
    Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
    adinauer and getsentry-bot authored Mar 27, 2025
    Copy the full SHA
    10dfe0c View commit details
  4. Crash the SDK on startup if mixed versions have been detected (#4277)

    * Check for mixed SDK versions
    
    * Format code
    
    * format + api
    
    * Init noops if mixed versions detected
    
    * Add BuildConfig
    
    * config entries for agentless module sdk names
    
    * Add MANIFEST.MF for JARs
    
    * Throw on startup; use manifests for backend; reuse code for otel
    
    * Format code
    
    * Format code
    
    * changelog
    
    * api
    
    * changelog
    
    * Update sentry/src/main/java/io/sentry/util/InitUtil.java
    
    Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
    
    ---------
    
    Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
    Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
    3 people authored Mar 27, 2025
    Copy the full SHA
    bfbc9e1 View commit details
  5. Remove duplicate calls to addPackage (#4285)

    * Check for mixed SDK versions
    
    * Format code
    
    * format + api
    
    * Init noops if mixed versions detected
    
    * Add BuildConfig
    
    * config entries for agentless module sdk names
    
    * Add MANIFEST.MF for JARs
    
    * Throw on startup; use manifests for backend; reuse code for otel
    
    * Format code
    
    * Format code
    
    * changelog
    
    * api
    
    * changelog
    
    * Remove duplicate addPackage calls
    
    * remove test assertion for package
    
    * remove test assertion for package
    
    ---------
    
    Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
    adinauer and getsentry-bot authored Mar 27, 2025
    Copy the full SHA
    98fbe0e View commit details
  6. Introduce fatal SDK logger (#4288)

    * Check for mixed SDK versions
    
    * Format code
    
    * format + api
    
    * Init noops if mixed versions detected
    
    * Add BuildConfig
    
    * config entries for agentless module sdk names
    
    * Add MANIFEST.MF for JARs
    
    * Throw on startup; use manifests for backend; reuse code for otel
    
    * Format code
    
    * Format code
    
    * changelog
    
    * api
    
    * changelog
    
    * Remove duplicate addPackage calls
    
    * remove test assertion for package
    
    * Introduce fatal SDK logger
    
    * Format code
    
    * changelog
    
    * api
    
    ---------
    
    Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
    adinauer and getsentry-bot authored Mar 27, 2025
    Copy the full SHA
    460594f View commit details
  7. Use Implementation-Version as raw version (#4291)

    * Check for mixed SDK versions
    
    * Format code
    
    * format + api
    
    * Init noops if mixed versions detected
    
    * Add BuildConfig
    
    * config entries for agentless module sdk names
    
    * Add MANIFEST.MF for JARs
    
    * Throw on startup; use manifests for backend; reuse code for otel
    
    * Format code
    
    * Format code
    
    * changelog
    
    * api
    
    * changelog
    
    * Remove duplicate addPackage calls
    
    * remove test assertion for package
    
    * Introduce fatal SDK logger
    
    * Use Implementation-Version as raw version
    
    * Format code
    
    * changelog
    
    * remove duplicate attr def
    
    ---------
    
    Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
    adinauer and getsentry-bot authored Mar 27, 2025
    Copy the full SHA
    ce3873d View commit details
  8. Add tests for checking mixed versions (#4292)

    * Check for mixed SDK versions
    
    * Format code
    
    * format + api
    
    * Init noops if mixed versions detected
    
    * Add BuildConfig
    
    * config entries for agentless module sdk names
    
    * Add MANIFEST.MF for JARs
    
    * Throw on startup; use manifests for backend; reuse code for otel
    
    * Format code
    
    * Format code
    
    * changelog
    
    * api
    
    * changelog
    
    * Remove duplicate addPackage calls
    
    * remove test assertion for package
    
    * Introduce fatal SDK logger
    
    * Use Implementation-Version as raw version
    
    * Add tests for checking mixed versions
    
    * Format code
    
    * clear storage after test to not affect other tests
    
    ---------
    
    Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
    adinauer and getsentry-bot authored Mar 27, 2025
    Copy the full SHA
    087248f View commit details

Commits on Mar 28, 2025

  1. Fix tags missing for compose view hierarchies (#4275)

    * Fix tags missing for compose view hierarchies
    
    * Update Changelog
    
    * Extract Jetpack Compose Tag extraction into a single method
    
    * Cache internal fields
    
    * Transfer Compose Helper to Compose library, Kotlin-ify
    
    * Improve bounds calculation for ViewHierarchy and Gesture Target location
    
    * Fix formatting
    
    * Fix tests
    
    * Minor cleanup
    
    * Fix lint + Kotlin compiler warnings
    markushi authored Mar 28, 2025
    Copy the full SHA
    5b39391 View commit details

Commits on Mar 31, 2025

  1. Bump reactivecircus/android-emulator-runner from 2.33.0 to 2.34.0 (#4301

    )
    
    Bumps [reactivecircus/android-emulator-runner](https://github.com/reactivecircus/android-emulator-runner) from 2.33.0 to 2.34.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@62dbb60...1dcd009)
    
    ---
    updated-dependencies:
    - dependency-name: reactivecircus/android-emulator-runner
      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>
    dependabot[bot] authored Mar 31, 2025
    Copy the full SHA
    70afa2e View commit details
  2. Bump github/codeql-action from 3.28.12 to 3.28.13 (#4300)

    Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.12 to 3.28.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@5f8171a...1b549b9)
    
    ---
    updated-dependencies:
    - dependency-name: github/codeql-action
      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>
    dependabot[bot] authored Mar 31, 2025
    Copy the full SHA
    a1ad6ae View commit details
  3. Bump gradle/actions (#4299)

    Bumps [gradle/actions](https://github.com/gradle/actions) from 4a417b5b1a01db0b076987546b67f8de18e7d340 to 06832c7b30a0129d7fb559bcc6e43d26f6374244.
    - [Release notes](https://github.com/gradle/actions/releases)
    - [Commits](gradle/actions@4a417b5...06832c7)
    
    ---
    updated-dependencies:
    - dependency-name: gradle/actions
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 31, 2025
    Copy the full SHA
    008761b View commit details
  4. Bump actions/create-github-app-token from 1.11.7 to 1.12.0 (#4302)

    Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 1.11.7 to 1.12.0.
    - [Release notes](https://github.com/actions/create-github-app-token/releases)
    - [Commits](actions/create-github-app-token@af35eda...d72941d)
    
    ---
    updated-dependencies:
    - dependency-name: actions/create-github-app-token
      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>
    dependabot[bot] authored Mar 31, 2025
    Copy the full SHA
    4762170 View commit details
  5. fix(file-io): Do not leak SentryFileInputStream/SentryFileOutputStrea…

    …m descriptors and channels (#4296)
    
    * fix(file-io): Do not leak SentryFileInputStream/SentryFileOutputStream descriptors and channels
    
    * Revert
    
    * Changelog
    
    * Update sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/android/MainActivity.java
    
    Co-authored-by: Stefano <stefano.siano@sentry.io>
    
    ---------
    
    Co-authored-by: Stefano <stefano.siano@sentry.io>
    romtsn and stefanosiano authored Mar 31, 2025
    Copy the full SHA
    de2136e View commit details

Commits on Apr 1, 2025

  1. Remove "not yet implemented" from flush comments (#4305)

    * Remove not yet implemented from flush comments
    
    * changelog
    
    * move changelog entry
    adinauer authored Apr 1, 2025
    Copy the full SHA
    708d339 View commit details
  2. chore(deps): update Native SDK to v0.8.3 (#4298)

    * chore: update scripts/update-sentry-native-ndk.sh to 0.8.3
    
    * chore: update scripts/update-sentry-native-ndk.sh to 0.8.3
    
    * Add glue code and additional tests
    
    ---------
    
    Co-authored-by: GitHub <noreply@github.com>
    Co-authored-by: Markus Hintersteiner <markus.hintersteiner@sentry.io>
    3 people authored Apr 1, 2025
    Copy the full SHA
    0d0e1d3 View commit details
  3. release: 8.6.0

    getsentry-bot committed Apr 1, 2025
    Copy the full SHA
    8875a00 View commit details
Showing with 2,103 additions and 845 deletions.
  1. +2 −2 .github/workflows/agp-matrix.yml
  2. +1 −1 .github/workflows/build.yml
  3. +3 −3 .github/workflows/codeql-analysis.yml
  4. +1 −1 .github/workflows/enforce-license-compliance.yml
  5. +1 −1 .github/workflows/generate-javadocs.yml
  6. +2 −2 .github/workflows/integration-tests-benchmarks.yml
  7. +2 −2 .github/workflows/integration-tests-ui-critical.yml
  8. +1 −1 .github/workflows/integration-tests-ui.yml
  9. +1 −1 .github/workflows/release-build.yml
  10. +1 −1 .github/workflows/release.yml
  11. +1 −1 .github/workflows/system-tests-backend.yml
  12. +69 −0 CHANGELOG.md
  13. +1 −1 build.gradle.kts
  14. +12 −2 buildSrc/src/main/java/Config.kt
  15. +1 −1 gradle.properties
  16. +9 −0 sentry-android-core/api/sentry-android-core.api
  17. +1 −2 sentry-android-core/build.gradle.kts
  18. +66 −0 sentry-android-core/src/main/java/io/sentry/android/core/AndroidFatalLogger.java
  19. +26 −5 sentry-android-core/src/main/java/io/sentry/android/core/AndroidOptionsInitializer.java
  20. +30 −0 sentry-android-core/src/test/java/io/sentry/android/core/AndroidOptionsInitializerTest.kt
  21. +2 −2 sentry-android-core/src/test/java/io/sentry/android/core/InternalSentrySdkTest.kt
  22. +7 −2 sentry-android-fragment/src/main/java/io/sentry/android/fragment/FragmentLifecycleIntegration.kt
  23. +0 −1 sentry-android-integration-tests/sentry-uitest-android/build.gradle.kts
  24. +5 −2 sentry-android-navigation/src/main/java/io/sentry/android/navigation/SentryNavigationListener.kt
  25. +8 −0 sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdk.java
  26. +6 −0 sentry-android-ndk/src/main/java/io/sentry/android/ndk/SentryNdkUtil.java
  27. +72 −0 sentry-android-ndk/src/test/java/io/sentry/android/ndk/SentryNdkTest.kt
  28. +7 −2 sentry-android-replay/src/main/java/io/sentry/android/replay/ReplayIntegration.kt
  29. +5 −3 sentry-android-replay/src/main/java/io/sentry/android/replay/ScreenshotRecorder.kt
  30. +7 −1 sentry-android-timber/src/main/java/io/sentry/android/timber/SentryTimberIntegration.kt
  31. +5 −2 sentry-apollo-3/src/main/java/io/sentry/apollo3/SentryApollo3HttpInterceptor.kt
  32. +0 −3 sentry-apollo-3/src/test/java/io/sentry/apollo3/SentryApollo3InterceptorTest.kt
  33. +5 −2 sentry-apollo-4/src/main/java/io/sentry/apollo4/SentryApollo4HttpInterceptor.kt
  34. +0 −3 sentry-apollo-4/src/test/java/io/sentry/apollo4/SentryApollo4HttpInterceptorTest.kt
  35. +6 −1 sentry-apollo/src/main/java/io/sentry/apollo/SentryApolloInterceptor.kt
  36. +1 −2 sentry-bom/build.gradle.kts
  37. +0 −10 sentry-compose-helper/README.md
  38. +0 −22 sentry-compose-helper/api/sentry-compose-helper.api
  39. +0 −67 sentry-compose-helper/build.gradle.kts
  40. +0 −41 sentry-compose-helper/src/jvmMain/java/io/sentry/compose/SentryComposeHelper.java
  41. +0 −159 sentry-compose-helper/src/jvmMain/java/io/sentry/compose/gestures/ComposeGestureTargetLocator.java
  42. +0 −135 ...compose-helper/src/jvmMain/java/io/sentry/compose/viewhierarchy/ComposeViewHierarchyExporter.java
  43. +0 −106 ...ose-helper/src/jvmTest/java/io/sentry/compose/viewhierarchy/ComposeViewHierarchyExporterTest.java
  44. +20 −0 sentry-compose/api/android/sentry-compose.api
  45. +1 −23 sentry-compose/build.gradle.kts
  46. +1 −0 sentry-compose/proguard-rules.pro
  47. +163 −0 sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryComposeHelper.kt
  48. +6 −1 sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryNavigationIntegration.kt
  49. +145 −0 sentry-compose/src/androidMain/kotlin/io/sentry/compose/gestures/ComposeGestureTargetLocator.kt
  50. +92 −0 ...ry-compose/src/androidMain/kotlin/io/sentry/compose/viewhierarchy/ComposeViewHierarchyExporter.kt
  51. +110 −0 sentry-compose/src/androidUnitTest/kotlin/io/sentry/compose/ComposeIntegrationTests.kt
  52. +2 −2 sentry-compose/src/androidUnitTest/kotlin/io/sentry/compose/SentryModifierComposeTest.kt
  53. +113 −0 ...se/src/androidUnitTest/kotlin/io/sentry/compose/viewhierarchy/ComposeViewHierarchyExporterTest.kt
  54. +13 −0 sentry-graphql-22/build.gradle.kts
  55. +5 −2 sentry-graphql-22/src/main/java/io/sentry/graphql22/SentryInstrumentation.java
  56. +13 −0 sentry-graphql-core/build.gradle.kts
  57. +13 −0 sentry-graphql/build.gradle.kts
  58. +5 −2 sentry-graphql/src/main/java/io/sentry/graphql/SentryInstrumentation.java
  59. +13 −0 sentry-jdbc/build.gradle.kts
  60. +5 −2 sentry-jdbc/src/main/java/io/sentry/jdbc/SentryJdbcEventListener.java
  61. +13 −0 sentry-jul/build.gradle.kts
  62. +5 −2 sentry-jul/src/main/java/io/sentry/jul/SentryHandler.java
  63. +13 −0 sentry-kotlin-extensions/build.gradle.kts
  64. +13 −0 sentry-log4j2/build.gradle.kts
  65. +5 −2 sentry-log4j2/src/main/java/io/sentry/log4j2/SentryAppender.java
  66. +13 −0 sentry-logback/build.gradle.kts
  67. +5 −2 sentry-logback/src/main/java/io/sentry/logback/SentryAppender.java
  68. +13 −0 sentry-okhttp/build.gradle.kts
  69. +7 −2 sentry-okhttp/src/main/java/io/sentry/okhttp/SentryOkHttpInterceptor.kt
  70. +13 −0 sentry-openfeign/build.gradle.kts
  71. +5 −2 sentry-openfeign/src/main/java/io/sentry/openfeign/SentryFeignClient.java
  72. +5 −2 sentry-opentelemetry/sentry-opentelemetry-agent/build.gradle.kts
  73. +13 −0 sentry-opentelemetry/sentry-opentelemetry-agentcustomization/build.gradle.kts
  74. +9 −69 ...ustomization/src/main/java/io/sentry/opentelemetry/SentryAutoConfigurationCustomizerProvider.java
  75. +21 −0 sentry-opentelemetry/sentry-opentelemetry-agentless-spring/build.gradle.kts
  76. +10 −1 ...telemetry-agentless-spring/src/main/java/io/sentry/opentelemetry/agent/AgentlessSpringMarker.java
  77. +21 −0 sentry-opentelemetry/sentry-opentelemetry-agentless/build.gradle.kts
  78. +9 −1 ...y/sentry-opentelemetry-agentless/src/main/java/io/sentry/opentelemetry/agent/AgentlessMarker.java
  79. +13 −0 sentry-opentelemetry/sentry-opentelemetry-bootstrap/build.gradle.kts
  80. +13 −0 sentry-opentelemetry/sentry-opentelemetry-core/build.gradle.kts
  81. +1 −1 sentry-opentelemetry/sentry-opentelemetry-core/src/test/kotlin/SentrySpanProcessorTest.kt
  82. +13 −0 sentry-quartz/build.gradle.kts
  83. +5 −2 sentry-quartz/src/main/java/io/sentry/quartz/SentryJobListener.java
  84. +13 −0 sentry-reactor/build.gradle.kts
  85. +0 −1 sentry-samples/sentry-samples-android/build.gradle.kts
  86. +5 −14 sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/android/MainActivity.java
  87. +13 −0 sentry-servlet-jakarta/build.gradle.kts
  88. +6 −2 ...ry-servlet-jakarta/src/main/java/io/sentry/servlet/jakarta/SentryServletContainerInitializer.java
  89. +13 −0 sentry-servlet/build.gradle.kts
  90. +6 −2 sentry-servlet/src/main/java/io/sentry/servlet/SentryServletContainerInitializer.java
  91. +13 −0 sentry-spring-boot-jakarta/build.gradle.kts
  92. +5 −3 sentry-spring-boot-jakarta/src/main/java/io/sentry/spring/boot/jakarta/SentryAutoConfiguration.java
  93. +13 −0 sentry-spring-boot-starter-jakarta/build.gradle.kts
  94. +13 −0 sentry-spring-boot-starter/build.gradle.kts
  95. +13 −0 sentry-spring-boot/build.gradle.kts
  96. +5 −2 sentry-spring-boot/src/main/java/io/sentry/spring/boot/SentryAutoConfiguration.java
  97. +13 −0 sentry-spring-jakarta/build.gradle.kts
  98. +5 −2 sentry-spring-jakarta/src/main/java/io/sentry/spring/jakarta/SentryHubRegistrar.java
  99. +13 −0 sentry-spring/build.gradle.kts
  100. +5 −2 sentry-spring/src/main/java/io/sentry/spring/SentryHubRegistrar.java
  101. +47 −10 sentry/api/sentry.api
  102. +13 −0 sentry/build.gradle.kts
  103. +68 −42 sentry/src/main/java/io/sentry/Baggage.java
  104. +20 −0 sentry/src/main/java/io/sentry/DefaultVersionDetector.java
  105. +1 −1 sentry/src/main/java/io/sentry/IScopes.java
  106. +1 −1 sentry/src/main/java/io/sentry/ISentryClient.java
  107. +11 −0 sentry/src/main/java/io/sentry/IVersionDetector.java
  108. +22 −0 sentry/src/main/java/io/sentry/ManifestVersionDetector.java
  109. +17 −0 sentry/src/main/java/io/sentry/NoopVersionDetector.java
  110. +2 −6 sentry/src/main/java/io/sentry/PropagationContext.java
  111. +1 −1 sentry/src/main/java/io/sentry/Scopes.java
  112. +8 −1 sentry/src/main/java/io/sentry/Sentry.java
  113. +3 −0 sentry/src/main/java/io/sentry/SentryClient.java
  114. +3 −1 sentry/src/main/java/io/sentry/SentryEnvelopeItem.java
  115. +29 −2 sentry/src/main/java/io/sentry/SentryEnvelopeItemHeader.java
  116. +39 −0 sentry/src/main/java/io/sentry/SentryIntegrationPackageStorage.java
  117. +37 −2 sentry/src/main/java/io/sentry/SentryOptions.java
  118. +1 −1 sentry/src/main/java/io/sentry/TransactionContext.java
  119. +1 −0 sentry/src/main/java/io/sentry/instrumentation/file/SentryFileInputStream.java
  120. +1 −0 sentry/src/main/java/io/sentry/instrumentation/file/SentryFileOutputStream.java
  121. +134 −0 sentry/src/main/java/io/sentry/internal/ManifestVersionReader.java
  122. +1 −1 sentry/src/main/java/io/sentry/transport/ITransport.java
  123. +21 −0 sentry/src/main/java/io/sentry/util/InitUtil.java
  124. +2 −2 sentry/src/main/java/io/sentry/util/TracingUtils.java
  125. +18 −24 sentry/src/test/java/io/sentry/BaggageTest.kt
  126. +12 −0 sentry/src/test/java/io/sentry/SentryEnvelopeItemTest.kt
  127. +75 −0 sentry/src/test/java/io/sentry/SentryIntegrationPackageStorageTest.kt
  128. +2 −2 sentry/src/test/java/io/sentry/SpanContextTest.kt
  129. +2 −2 sentry/src/test/java/io/sentry/TransactionContextTest.kt
  130. +12 −0 sentry/src/test/java/io/sentry/instrumentation/file/SentryFileInputStreamTest.kt
  131. +12 −0 sentry/src/test/java/io/sentry/instrumentation/file/SentryFileOutputStreamTest.kt
  132. +2 −1 sentry/src/test/java/io/sentry/protocol/SentryEnvelopeItemHeaderSerializationTest.kt
  133. +5 −5 sentry/src/test/java/io/sentry/util/TracingUtilsTest.kt
  134. +1 −0 sentry/src/test/resources/json/sentry_envelope_item_header.json
  135. +0 −1 settings.gradle.kts
4 changes: 2 additions & 2 deletions .github/workflows/agp-matrix.yml
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@4a417b5b1a01db0b076987546b67f8de18e7d340 # pin@v3
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # pin@v3
with:
gradle-home-cache-cleanup: true
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
@@ -61,7 +61,7 @@ jobs:

# We tried to use the cache action to cache gradle stuff, but it made tests slower and timeout
- name: Run instrumentation tests
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # pin@v2
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # pin@v2
with:
api-level: 30
force-avd-creation: false
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ jobs:
key: build-logic-${{ hashFiles('buildSrc/src/**', 'buildSrc/build.gradle.kts','buildSrc/settings.gradle.kts') }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@4a417b5b1a01db0b076987546b67f8de18e7d340 # pin@v3
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # pin@v3
with:
gradle-home-cache-cleanup: true
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -34,13 +34,13 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@4a417b5b1a01db0b076987546b67f8de18e7d340 # pin@v3
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # pin@v3
with:
gradle-home-cache-cleanup: true
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Initialize CodeQL
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # pin@v2
uses: github/codeql-action/init@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # pin@v2
with:
languages: 'java'

@@ -49,4 +49,4 @@ jobs:
./gradlew buildForCodeQL
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # pin@v2
uses: github/codeql-action/analyze@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # pin@v2
2 changes: 1 addition & 1 deletion .github/workflows/enforce-license-compliance.yml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4a417b5b1a01db0b076987546b67f8de18e7d340 # pin@v3
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # pin@v3
with:
gradle-home-cache-cleanup: true

2 changes: 1 addition & 1 deletion .github/workflows/generate-javadocs.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@4a417b5b1a01db0b076987546b67f8de18e7d340 # pin@v3
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # pin@v3
with:
gradle-home-cache-cleanup: true

4 changes: 2 additions & 2 deletions .github/workflows/integration-tests-benchmarks.yml
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@4a417b5b1a01db0b076987546b67f8de18e7d340 # pin@v3
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # pin@v3
with:
gradle-home-cache-cleanup: true
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
@@ -89,7 +89,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@4a417b5b1a01db0b076987546b67f8de18e7d340 # pin@v3
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # pin@v3
with:
gradle-home-cache-cleanup: true
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests-ui-critical.yml
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@4a417b5b1a01db0b076987546b67f8de18e7d340 # pin@v3
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # pin@v3
with:
gradle-home-cache-cleanup: true
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
@@ -102,7 +102,7 @@ jobs:
version: ${{env.MAESTRO_VERSION}}

- name: Run tests
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # pin@v2.33.0
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # pin@v2.34.0
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests-ui.yml
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@4a417b5b1a01db0b076987546b67f8de18e7d340 # pin@v3
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # pin@v3
with:
gradle-home-cache-cleanup: true
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@4a417b5b1a01db0b076987546b67f8de18e7d340 # pin@v3
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # pin@v3
with:
gradle-home-cache-cleanup: true

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/system-tests-backend.yml
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@4a417b5b1a01db0b076987546b67f8de18e7d340 # pin@v3
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # pin@v3
with:
gradle-home-cache-cleanup: true
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
69 changes: 69 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Changelog

## 8.6.0

### Behavioral Changes

- The Sentry SDK will now crash on startup if mixed versions have been detected ([#4277](https://github.com/getsentry/sentry-java/pull/4277))
- On `Sentry.init` / `SentryAndroid.init` the SDK now checks if all Sentry Java / Android SDK dependencies have the same version.
- While this may seem like a bad idea at first glance, mixing versions of dependencies has a very high chance of causing a crash later. We opted for a controlled crash that's hard to miss.
- Note: This detection only works for new versions of the SDK, so please take this as a reminder to check your SDK version alignment manually when upgrading the SDK to this version and then you should be good.
- The SDK will also print log messages if mixed versions have been detected at a later point. ([#4270](https://github.com/getsentry/sentry-java/pull/4270))
- This takes care of cases missed by the startup check above due to older versions.

### Features

- Increase http timeouts from 5s to 30s to have a better chance of events being delivered without retry ([#4276](https://github.com/getsentry/sentry-java/pull/4276))
- Add `MANIFEST.MF` to Sentry JARs ([#4272](https://github.com/getsentry/sentry-java/pull/4272))
- Retain baggage sample rate/rand values as doubles ([#4279](https://github.com/getsentry/sentry-java/pull/4279))
- Introduce fatal SDK logger ([#4288](https://github.com/getsentry/sentry-java/pull/4288))
- We use this to print out messages when there is a problem that prevents the SDK from working correctly.
- One example for this is when the SDK has been configured with mixed dependency versions where we print out details, which module and version are affected.

### Fixes

- Do not override user-defined `SentryOptions` ([#4262](https://github.com/getsentry/sentry-java/pull/4262))
- Session Replay: Change bitmap config to `ARGB_8888` for screenshots ([#4282](https://github.com/getsentry/sentry-java/pull/4282))
- The `MANIFEST.MF` of `sentry-opentelemetry-agent` now has `Implementation-Version` set to the raw version ([#4291](https://github.com/getsentry/sentry-java/pull/4291))
- An example value would be `8.6.0`
- The value of the `Sentry-Version-Name` attribute looks like `sentry-8.5.0-otel-2.10.0`
- Fix tags missing for compose view hierarchies ([#4275](https://github.com/getsentry/sentry-java/pull/4275))
- Do not leak SentryFileInputStream/SentryFileOutputStream descriptors and channels ([#4296](https://github.com/getsentry/sentry-java/pull/4296))
- Remove "not yet implemented" from `Sentry.flush` comment ([#4305](https://github.com/getsentry/sentry-java/pull/4305))

### Internal

- Added `platform` to SentryEnvelopeItemHeader ([#4287](https://github.com/getsentry/sentry-java/pull/4287))
- Set `android` platform to ProfileChunk envelope item header

### Dependencies

- Bump Native SDK from v0.8.1 to v0.8.3 ([#4267](https://github.com/getsentry/sentry-java/pull/4267), [#4298](https://github.com/getsentry/sentry-java/pull/4298))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#083)
- [diff](https://github.com/getsentry/sentry-native/compare/0.8.1...0.8.3)
- Bump Spring Boot from 2.7.5 to 2.7.18 ([#3496](https://github.com/getsentry/sentry-java/pull/3496))

## 8.5.0

### Features
@@ -554,6 +597,32 @@ If you have been using `8.0.0-rc.4` of the Java SDK, here's the new changes that
- We are planning to improve this in the future but opted for this fix first.
- Fix swallow NDK loadLibrary errors ([#4082](https://github.com/getsentry/sentry-java/pull/4082))

## 7.22.5

### Fixes

- Session Replay: Change bitmap config to `ARGB_8888` for screenshots ([#4282](https://github.com/getsentry/sentry-java/pull/4282))

## 7.22.4

### Fixes

- Session Replay: Fix crash when a navigation breadcrumb does not have "to" destination ([#4185](https://github.com/getsentry/sentry-java/pull/4185))
- Session Replay: Cap video segment duration to maximum 5 minutes to prevent endless video encoding in background ([#4185](https://github.com/getsentry/sentry-java/pull/4185))
- Avoid logging an error when a float is passed in the manifest ([#4266](https://github.com/getsentry/sentry-java/pull/4266))

## 7.22.3

### Fixes

- Reduce excessive CPU usage when serializing breadcrumbs to disk for ANRs ([#4181](https://github.com/getsentry/sentry-java/pull/4181))

## 7.22.2

### Fixes

- Fix AbstractMethodError when using SentryTraced for Jetpack Compose ([#4256](https://github.com/getsentry/sentry-java/pull/4256))

## 7.22.1

### Fixes
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@ subprojects {
}
}

if (!this.name.contains("sample") && !this.name.contains("integration-tests") && this.name != "sentry-system-test-support" && this.name != "sentry-test-support" && this.name != "sentry-compose-helper") {
if (!this.name.contains("sample") && !this.name.contains("integration-tests") && this.name != "sentry-system-test-support" && this.name != "sentry-test-support") {
apply<DistributionPlugin>()
apply<com.vanniktech.maven.publish.MavenPublishPlugin>()

14 changes: 12 additions & 2 deletions buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ object Config {
val kotlinVersion = "1.9.24"
val kotlinStdLib = "stdlib-jdk8"

val springBootVersion = "2.7.5"
val springBootVersion = "2.7.18"
val springBoot3Version = "3.4.2"
val kotlinCompatibleLanguageVersion = "1.6"

@@ -161,7 +161,7 @@ object Config {
val apolloKotlin = "com.apollographql.apollo3:apollo-runtime:3.8.2"
val apolloKotlin4 = "com.apollographql.apollo:apollo-runtime:4.1.1"

val sentryNativeNdk = "io.sentry:sentry-native-ndk:0.8.1"
val sentryNativeNdk = "io.sentry:sentry-native-ndk:0.8.3"

object OpenTelemetry {
val otelVersion = "1.44.1"
@@ -251,12 +251,21 @@ object Config {
val SENTRY_SPRING_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.spring"
val SENTRY_SPRING_JAKARTA_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.spring.jakarta"
val SENTRY_SPRING_BOOT_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.spring-boot"
val SENTRY_SPRING_BOOT_STARTER_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.spring-boot-starter"
val SENTRY_SPRING_BOOT_JAKARTA_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.spring-boot.jakarta"
val SENTRY_SPRING_BOOT_STARTER_JAKARTA_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.spring-boot-starter.jakarta"
val SENTRY_OPENTELEMETRY_BOOTSTRAP_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.opentelemetry.bootstrap"
val SENTRY_OPENTELEMETRY_CORE_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.opentelemetry.core"
val SENTRY_OPENTELEMETRY_AGENT_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.opentelemetry.agent"
val SENTRY_OPENTELEMETRY_AGENTLESS_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.opentelemetry.agentless"
val SENTRY_OPENTELEMETRY_AGENTLESS_SPRING_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.opentelemetry.agentless-spring"
val SENTRY_OPENTELEMETRY_AGENTCUSTOMIZATION_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.opentelemetry.agentcustomization"
val SENTRY_OPENFEIGN_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.openfeign"
val SENTRY_APOLLO3_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.apollo3"
val SENTRY_APOLLO4_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.apollo4"
val SENTRY_APOLLO_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.apollo"
val SENTRY_GRAPHQL_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.graphql"
val SENTRY_GRAPHQL_CORE_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.graphql-core"
val SENTRY_GRAPHQL22_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.graphql22"
val SENTRY_QUARTZ_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.quartz"
val SENTRY_JDBC_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.jdbc"
@@ -265,6 +274,7 @@ object Config {
val SENTRY_COMPOSE_HELPER_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.compose.helper"
val SENTRY_OKHTTP_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.okhttp"
val SENTRY_REACTOR_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.reactor"
val SENTRY_KOTLIN_EXTENSIONS_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.kotlin-extensions"
val group = "io.sentry"
val description = "SDK for sentry.io"
val versionNameProp = "versionName"
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ org.gradle.workers.max=2
android.useAndroidX=true

# Release information
versionName=8.5.0
versionName=8.6.0

# Override the SDK name on native crashes on Android
sentryAndroidSdkName=sentry.native.android
9 changes: 9 additions & 0 deletions sentry-android-core/api/sentry-android-core.api
Original file line number Diff line number Diff line change
@@ -63,6 +63,15 @@ public final class io/sentry/android/core/AndroidDateUtils {
public static fun getCurrentSentryDateTime ()Lio/sentry/SentryDate;
}

public final class io/sentry/android/core/AndroidFatalLogger : io/sentry/ILogger {
public fun <init> ()V
public fun <init> (Ljava/lang/String;)V
public fun isEnabled (Lio/sentry/SentryLevel;)Z
public fun log (Lio/sentry/SentryLevel;Ljava/lang/String;Ljava/lang/Throwable;)V
public fun log (Lio/sentry/SentryLevel;Ljava/lang/String;[Ljava/lang/Object;)V
public fun log (Lio/sentry/SentryLevel;Ljava/lang/Throwable;Ljava/lang/String;[Ljava/lang/Object;)V
}

public final class io/sentry/android/core/AndroidLogger : io/sentry/ILogger {
public fun <init> ()V
public fun <init> (Ljava/lang/String;)V
3 changes: 1 addition & 2 deletions sentry-android-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -81,7 +81,6 @@ dependencies {
compileOnly(projects.sentryAndroidTimber)
compileOnly(projects.sentryAndroidReplay)
compileOnly(projects.sentryCompose)
compileOnly(projects.sentryComposeHelper)

// lifecycle processor, session tracking
implementation(Config.Libs.lifecycleProcess)
@@ -109,7 +108,7 @@ dependencies {
testImplementation(projects.sentryAndroidFragment)
testImplementation(projects.sentryAndroidTimber)
testImplementation(projects.sentryAndroidReplay)
testImplementation(projects.sentryComposeHelper)
testImplementation(projects.sentryCompose)
testImplementation(projects.sentryAndroidNdk)
testRuntimeOnly(Config.Libs.composeUi)
testRuntimeOnly(Config.Libs.timber)
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package io.sentry.android.core;

import android.util.Log;
import io.sentry.ILogger;
import io.sentry.SentryLevel;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@ApiStatus.Internal
public final class AndroidFatalLogger implements ILogger {

private final @NotNull String tag;

public AndroidFatalLogger() {
this("Sentry");
}

public AndroidFatalLogger(final @NotNull String tag) {
this.tag = tag;
}

@SuppressWarnings("AnnotateFormatMethod")
@Override
public void log(
final @NotNull SentryLevel level,
final @NotNull String message,
final @Nullable Object... args) {
if (args == null || args.length == 0) {
Log.println(toLogcatLevel(level), tag, message);
} else {
Log.println(toLogcatLevel(level), tag, String.format(message, args));
}
}

@SuppressWarnings("AnnotateFormatMethod")
@Override
public void log(
final @NotNull SentryLevel level,
final @Nullable Throwable throwable,
final @NotNull String message,
final @Nullable Object... args) {
if (args == null || args.length == 0) {
log(level, message, throwable);
} else {
log(level, String.format(message, args), throwable);
}
}

@Override
public void log(
final @NotNull SentryLevel level,
final @NotNull String message,
final @Nullable Throwable throwable) {
Log.wtf(tag, message, throwable);
}

@Override
public boolean isEnabled(@Nullable SentryLevel level) {
return true;
}

private int toLogcatLevel(final @NotNull SentryLevel sentryLevel) {
return Log.ASSERT;
}
}
Loading