Skip to content

Releases: getsentry/sentry-java

8.25.0

29 Oct 15:59

Choose a tag to compare

Fixes

  • [ANR] Removed AndroidTransactionProfiler lock (#4817)
  • Avoid ExecutorService for DefaultCompositePerformanceCollector timeout (#4841)
    • This avoids infinite data collection for never stopped transactions, leading to OOMs
  • Fix wrong .super() call in SentryTimberTree (#4844)

Improvements

  • [ANR] Defer some class availability checks (#4825)
  • Collect PerformanceCollectionData only for sampled transactions (#4834)
    • Breaking change: Transactions with a deferred sampling decision (sampled == null) won't be collecting any performance data anymore (CPU, RAM, slow/frozen frames).

Dependencies

8.24.0

22 Oct 12:08

Choose a tag to compare

Features

  • Attach MDC properties to logs as attributes (#4786)
    • MDC properties set using supported logging frameworks (Logback, Log4j2, java.util.Logging) are now attached to structured logs as attributes.
    • The attribute reflected on the log is mdc.<key>, where <key> is the original key in the MDC.
    • This means that you will be able to filter/aggregate logs in the product based on these properties.
    • Only properties with keys matching the configured contextTags are sent as log attributes.
      • You can configure which properties are sent using options.setContextTags if initalizing manually, or by specifying a comma-separated list of keys with a context-tags entry in sentry.properties or sentry.context-tags in application.properties.
      • Note that keys containing spaces are not supported.
  • Add experimental Sentry Android Distribution module for integrating with Sentry Build Distribution to check for and install updates (#4804)
  • Allow passing a different Handler to SystemEventsBreadcrumbsIntegration and AndroidConnectionStatusProvider so their callbacks are deliver to that handler (#4808)
  • Session Replay: Add new experimental Canvas Capture Strategy (#4777)
    • A new screenshot capture strategy that uses Android's Canvas API for more accurate and reliable text and image masking
    • Any .drawText() or .drawBitmap() calls are replaced by rectangles, ensuring no text or images are present in the resulting output
    • Note: If this strategy is used, all text and images will be masked, regardless of any masking configuration
    • To enable this feature, set the screenshotStrategy, either via code:
      SentryAndroid.init(context) { options ->
        options.sessionReplay.screenshotStrategy = ScreenshotStrategyType.CANVAS
      }
      or AndroidManifest.xml:
      <application>
        <meta-data android:name="io.sentry.session-replay.screenshot-strategy" android:value="canvas" />
      </application>

Fixes

  • Avoid StrictMode warnings (#4724)
  • Use logger from options for JVM profiler (#4771)
  • Session Replay: Avoid deadlock when pausing replay if no connection (#4788)
  • Session Replay: Fix capturing roots with no windows (#4805)
  • Session Replay: Fix java.lang.IllegalArgumentException: width and height must be > 0 (#4805)
  • Handle NoOpScopes in Context when starting a span through OpenTelemetry (#4823)
    • This fixes "java.lang.IllegalArgumentException: The DSN is required" when combining WebFlux and OpenTelemetry
  • Session Replay: Do not use recycled screenshots for masking (#4790)
    • This fixes native crashes seen in Canvas.<init>/ScreenshotRecorder.capture
  • Session Replay: Ensure bitmaps are recycled properly (#4820)

Miscellaneous

  • Mark SentryClient(SentryOptions) constructor as not internal (#4787)

Dependencies

8.24.0-alpha.2

17 Oct 16:22

Choose a tag to compare

8.24.0-alpha.2 Pre-release
Pre-release

Features

  • Attach MDC properties to logs as attributes (#4786)
    • MDC properties set using supported logging frameworks (Logback, Log4j2, java.util.Logging) are now attached to structured logs as attributes.
    • The attribute reflected on the log is mdc.<key>, where <key> is the original key in the MDC.
    • This means that you will be able to filter/aggregate logs in the product based on these properties.
    • Only properties with keys matching the configured contextTags are sent as log attributes.
      • You can configure which properties are sent using options.setContextTags if initalizing manually, or by specifying a comma-separated list of keys with a context-tags entry in sentry.properties or sentry.contex-tags in application.properties.
      • Note that keys containing spaces are not supported.
  • Add experimental Sentry Android Distribution module for integrating with Sentry Build Distribution to check for and install updates (#4804)
  • Allow passing a different Handler to SystemEventsBreadcrumbsIntegration and AndroidConnectionStatusProvider so their callbacks are deliver to that handler (#4808)

Fixes

  • Avoid StrictMode warnings (#4724)
  • Use logger from options for JVM profiler (#4771)
  • Session Replay: Avoid deadlock when pausing replay if no connection (#4788)

Miscellaneous

  • Mark SentryClient(SentryOptions) constructor as not internal (#4787)

Dependencies

8.23.1-alpha.1

09 Oct 09:12

Choose a tag to compare

8.23.1-alpha.1 Pre-release
Pre-release

Fixes

  • Use logger from options for JVM profiler (#4771)

Miscellaneous

  • Mark SentryClient(SentryOptions) constructor as not internal (#4787)

Dependencies

8.23.0

01 Oct 13:07

Choose a tag to compare

Features

  • Add session replay id to Sentry Logs (#4740)
  • Add support for continuous profiling of JVM applications on macOS and Linux (#4556)
    • Sentry continuous profiling on the JVM is using async-profiler under the hood.
    • By default this feature is disabled. Set a profile sample rate and chose a lifecycle (see below) to enable it.
    • Add the sentry-async-profiler dependency to your project
    • Set a sample rate for profiles, e.g. 1.0 to send all of them. You may use options.setProfileSessionSampleRate(1.0) in code or profile-session-sample-rate=1.0 in sentry.properties
    • Set a profile lifecycle via options.setProfileLifecycle(ProfileLifecycle.TRACE) in code or profile-lifecycle=TRACE in sentry.properties
      • By default the lifecycle is set to MANUAL, meaning you have to explicitly call Sentry.startProfiler() and Sentry.stopProfiler()
      • You may change it to TRACE which will create a profile for each transaction
    • To automatically upload Profiles for each transaction in a Spring Boot application
      • set sentry.profile-session-sample-rate=1.0 and sentry.profile-lifecycle=TRACE in application.properties
      • or set sentry.profile-session-sample-rate: 1.0 and sentry.profile-lifecycle: TRACE in application.yml
    • Profiling can also be combined with our OpenTelemetry integration

Fixes

  • Start performance collection on AppStart continuous profiling (#4752)
  • Preserve modifiers in SentryTraced (#4757)

Improvements

  • Handle RejectedExecutionException everywhere (#4747)
  • Mark SentryEnvelope as not internal (#4748)

8.22.0

22 Sep 12:04

Choose a tag to compare

Features

Improvements

  • Remove internal API status from get/setDistinctId (#4708)
  • Remove ApiStatus.Experimental annotation from check-in API (#4721)

Fixes

  • Session Replay: Fix NoSuchElementException in BufferCaptureStrategy (#4717)
  • Session Replay: Fix continue recording in Session mode after Buffer is triggered (#4719)

Dependencies

8.21.1

09 Sep 15:24

Choose a tag to compare

Fixes

  • Use Kotlin stdlib 1.9.24 dependency instead of 2.2.0 for all Android modules (#4707)
    • This fixes compile time issues if your app is using Kotlin < 2.x

8.21.0

08 Sep 13:52

Choose a tag to compare

Fixes

  • Only set log template for logging integrations if formatted message differs from template (#4682)

Features

  • Add support for Spring Boot 4 and Spring 7 (#4601)
    • NOTE: Our sentry-opentelemetry-agentless-spring is not working yet for Spring Boot 4. Please use sentry-opentelemetry-agent until OpenTelemetry has support for Spring Boot 4.
  • Replace UUIDGenerator implementation with Apache licensed code (#4662)
  • Replace Random implementation with MIT licensed code (#4664)
  • Add support for vars attribute in SentryStackFrame (#4686)
    • Breaking change: The type of the vars attribute has been changed from Map<String, String> to Map<String, Object>.

8.20.0

25 Aug 12:59

Choose a tag to compare

Fixes

  • Do not use named capturing groups for regular expressions (#4652)
    • This fixes a crash on Android versions below 8.0 (API level 26)

Features

  • Add onDiscard to enable users to track the type and amount of data discarded before reaching Sentry (#4612)
    • Stub for setting the callback on Sentry.init:
      Sentry.init(options -> {
        ...
        options.setOnDiscard(
         (reason, category, number) -> {
           // Your logic to process discarded data
         });
      });

8.19.1

12 Aug 11:26

Choose a tag to compare

Warning

Android: This release is incompatible with API levels below 26. We recommend using SDK version 8.20.0 or higher instead.

Fixes

  • Do not store No-Op scopes onto OpenTelemetry Context when wrapping (#4631)
    • In 8.18.0 and 8.19.0 the SDK could break when initialized too late.