github getsentry/sentry-java 8.5.0

one day ago

Features

  • Add native stack frame address information and debug image metadata to ANR events (#4061)

    • This enables symbolication for stripped native code in ANRs
  • Add Continuous Profiling Support (#3710)

    To enable Continuous Profiling use the Sentry.startProfiler and Sentry.stopProfiler experimental APIs. Sampling rate can be set through options.profileSessionSampleRate, which defaults to null (disabled).
    Note: Both options.profilesSampler and options.profilesSampleRate must not be set to enable Continuous Profiling.

    import io.sentry.ProfileLifecycle;
    import io.sentry.android.core.SentryAndroid;
    
    SentryAndroid.init(context) { options ->
     
      // Currently under experimental options:
      options.getExperimental().setProfileSessionSampleRate(1.0);
      // In manual mode, you need to start and stop the profiler manually using Sentry.startProfiler and Sentry.stopProfiler
      // In trace mode, the profiler will start and stop automatically whenever a sampled trace starts and finishes
      options.getExperimental().setProfileLifecycle(ProfileLifecycle.MANUAL);
    }
    // Start profiling
    Sentry.startProfiler();
    
    // After all profiling is done, stop the profiler. Profiles can last indefinitely if not stopped.
    Sentry.stopProfiler();
    import io.sentry.ProfileLifecycle
    import io.sentry.android.core.SentryAndroid
    
    SentryAndroid.init(context) { options ->
     
      // Currently under experimental options:
      options.experimental.profileSessionSampleRate = 1.0
      // In manual mode, you need to start and stop the profiler manually using Sentry.startProfiler and Sentry.stopProfiler
      // In trace mode, the profiler will start and stop automatically whenever a sampled trace starts and finishes
      options.experimental.profileLifecycle = ProfileLifecycle.MANUAL
    }
    // Start profiling
    Sentry.startProfiler()
    
    // After all profiling is done, stop the profiler. Profiles can last indefinitely if not stopped.
    Sentry.stopProfiler()

    To learn more visit Sentry's Continuous Profiling documentation page.

Fixes

  • Reduce excessive CPU usage when serializing breadcrumbs to disk for ANRs (#4181)
  • Ensure app start type is set, even when ActivityLifecycleIntegration is not running (#4250)
  • Use SpringServletTransactionNameProvider as fallback for Spring WebMVC (#4263)
    • In certain cases the SDK was not able to provide a transaction name automatically and thus did not finish the transaction for the request.
    • We now first try SpringMvcTransactionNameProvider which would provide the route as transaction name.
    • If that does not return anything, we try SpringServletTransactionNameProvider next, which returns the URL of the request.

Behavioral Changes

  • The user's device.name is not reported anymore via the device context, even if options.isSendDefaultPii is enabled (#4179)

Dependencies

Don't miss a new sentry-java release

NewReleases is sending notifications on new releases.