Skip to content

Releases: getsentry/sentry-java

7.16.0-alpha.1

17 Oct 12:47
Compare
Choose a tag to compare
7.16.0-alpha.1 Pre-release
Pre-release

Features

  • Add meta option to attach ANR thread dumps (#3791)

Fixes

  • Cache parsed Dsn (#3796)
  • fix invalid profiles when the transaction name is empty (#3747)
  • Deprecate enableTracing option (#3777)
  • Vendor java.util.Random and replace java.security.SecureRandom usages (#3783)
  • Fix potential ANRs due to NDK scope sync (#3754)
  • Fix potential ANRs due to NDK System.loadLibrary calls (#3670)
  • Fix slow Log calls on app startup (#3793)
  • Fix slow Integration name parsing (#3794)
  • Session Replay: Reduce startup and capture overhead (#3799)

8.0.0-beta.1

16 Oct 07:17
Compare
Choose a tag to compare
8.0.0-beta.1 Pre-release
Pre-release

Breaking Changes

  • Throw IllegalArgumentException when calling Sentry.init on Android (#3596)
  • Metrics have been removed from the SDK (#3774)
    • Metrics will return but we don't know in what exact form yet
  • enableTracing option (a.k.a enable-tracing) has been removed from the SDK (#3776)
    • Please set tracesSampleRate to a value >= 0.0 for enabling performance instead. The default value is null which means performance is disabled.
  • Change OkHttp sub-spans to span attributes (#3556)
    • This will reduce the number of spans created by the SDK
  • Replace synchronized methods and blocks with ReentrantLock (AutoClosableReentrantLock) (#3715)
    • If you are subclassing any Sentry classes, please check if the parent class used synchronized before. Please make sure to use the same lock object as the parent class in that case.
  • traceOrigins option (io.sentry.traces.tracing-origins in manifest) has been removed, please use tracePropagationTargets (io.sentry.traces.trace-propagation-targets in manifest`) instead (#3780)
  • profilingEnabled option (io.sentry.traces.profiling.enable in manifest) has been removed, please use profilesSampleRate (io.sentry.traces.profiling.sample-rate instead) instead (#3780)
  • shutdownTimeout option has been removed, please use shutdownTimeoutMillis instead (#3780)
  • profilingTracesIntervalMillis option for Android has been removed (#3780)
  • io.sentry.session-tracking.enable manifest option has been removed (#3780)
  • Sentry.traceHeaders() method has been removed, please use Sentry.getTraceparent() instead (#3718)
  • Sentry.reportFullDisplayed() method has been removed, please use Sentry.reportFullyDisplayed() instead (#3717)
  • User.other has been removed, please use data instead (#3780)
  • SdkVersion.getIntegrations() has been removed, please use getIntegrationSet instead (#3780)
  • SdkVersion.getPackages() has been removed, please use getPackageSet() instead (#3780)
  • Device.language has been removed, please use locale instead (#3780)
  • TraceContext.user and TraceContextUser class have been removed, please use userId on TraceContext instead (#3780)
  • TransactionContext.fromSentryTrace() has been removed, please use Sentry.continueTrace() instead (#3780)
  • SentryDataFetcherExceptionHandler has been removed, please use SentryGenericDataFetcherExceptionHandler in combination with SentryInstrumentation instead (#3780)
  • One of the AndroidTransactionProfiler constructors has been removed, please use a different one (#3780)

Features

  • Add init priority settings (#3674)
    • You may now set forceInit=true (force-init for .properties files) to ensure a call to Sentry.init / SentryAndroid.init takes effect
  • Add force init option to Android Manifest (#3675)
    • Use <meta-data android:name="io.sentry.force-init" android:value="true" /> to ensure Sentry Android auto init is not easily overwritten
  • Attach request body for application/x-www-form-urlencoded requests in Spring (#3731)
    • Previously request body was only attached for application/json requests
  • Set breadcrumb level based on http status (#3771)
  • Support graphql-java v22 via a new module sentry-graphql-22 (#3740)
    • If you are using graphql-java v21 or earlier, you can use the sentry-graphql module
    • For graphql-java v22 and newer please use the sentry-graphql-22 module
  • We now provide a SentryInstrumenter bean directly for Spring (Boot) if there is none yet instead of using GraphQlSourceBuilderCustomizer to add the instrumentation (#3744)
    • It is now also possible to provide a bean of type SentryGraphqlInstrumentation.BeforeSpanCallback which is then used by SentryInstrumenter
  • Emit transaction.data inside contexts.trace.data (#3735)
    • Also does not emit transaction.data in exras anymore

Fixes

  • Use OpenTelemetry span name as fallback for transaction name (#3557)
    • In certain cases we were sending transactions as "" when using OpenTelemetry
  • Add OpenTelemetry span data to Sentry span (#3593)
  • No longer selectively copy OpenTelemetry attributes to Sentry spans / transactions data (#3663)
  • Remove PROCESS_COMMAND_ARGS (process.command_args) OpenTelemetry span attribute as it can be very large (#3664)
  • Use RECORD_ONLY sampling decision if performance is disabled (#3659)
    • Also fix check whether Performance is enabled when making a sampling decision in the OpenTelemetry sampler
  • Sentry OpenTelemetry Java Agent now sets Instrumenter to SENTRY (used to be OTEL) (#3697)
  • Set span origin in ActivityLifecycleIntegration on span options instead of after creating the span / transaction (#3702)
    • This allows spans to be filtered by span origin on creation
  • Honor ignored span origins in SentryTracer.startChild (#3704)
  • Add enable-spotlight and spotlight-connection-url to external options and check if spotlight is enabled when deciding whether to inspect an OpenTelemetry span for connecting to splotlight (#3709)
  • Trace context on Contexts.setTrace has been marked @NotNull (#3721)
    • Setting it to null would cause an exception.
    • Transactions are dropped if trace context is missing
  • Remove internal annotation on SpanOptions (#3722)
  • SentryLogbackInitializer is now public (#3723)
  • Fix order of calling close on previous Sentry instance when re-initializing (#3750)
    • Previously some parts of Sentry were immediately closed after re-init that should have stayed open and some parts of the previous init were never closed

Behavioural Changes

  • (Android) Replace thread id with kernel thread id in span data (#3706)

Dependencies

  • Bump OpenTelemetry to 1.41.0, OpenTelemetry Java Agent to 2.7.0 and Semantic Conventions to 1.25.0 (#3668)

7.15.0

09 Oct 17:10
Compare
Choose a tag to compare

Features

  • Add support for feedback envelope header item type (#3687)
  • Add breadcrumb.origin field (#3727)
  • Session Replay: Add options to selectively mask/unmask views captured in replay. The following options are available: (#3689)
    • android:tag="sentry-mask|sentry-unmask" in XML or view.setTag("sentry-mask|sentry-unmask") in code tags
      • if you already have a tag set for a view, you can set a tag by id: <tag android:id="@id/sentry_privacy" android:value="mask|unmask"/> in XML or view.setTag(io.sentry.android.replay.R.id.sentry_privacy, "mask|unmask") in code
    • view.sentryReplayMask() or view.sentryReplayUnmask() extension functions
    • mask/unmask Views of a certain type by adding fully-qualified classname to one of the lists options.experimental.sessionReplay.addMaskViewClass() or options.experimental.sessionReplay.addUnmaskViewClass(). Note, that all of the view subclasses/subtypes will be masked/unmasked as well
      • For example, (this is already a default behavior) to mask all TextViews and their subclasses (RadioButton, EditText, etc.): options.experimental.sessionReplay.addMaskViewClass("android.widget.TextView")
      • If you're using code obfuscation, adjust your proguard-rules accordingly, so your custom view class name is not minified
  • Session Replay: Support Jetpack Compose masking (#3739)
    • To selectively mask/unmask Composables, use Modifier.sentryReplayMask() and Modifier.sentryReplayUnmask() modifiers
  • Session Replay: Mask WebView, VideoView and androidx.media3.ui.PlayerView by default (#3775)

Fixes

  • Avoid stopping appStartProfiler after application creation (#3630)
  • Session Replay: Correctly detect dominant color for TextViews with Spans (#3682)
  • Fix ensure Application Context is used even when SDK is initialized via Activity Context (#3669)
  • Fix potential ANRs due to Calendar.getInstance usage in Breadcrumbs constructor (#3736)
  • Fix potential ANRs due to default integrations (#3778)
  • Lazily initialize heavy SentryOptions members to avoid ANRs on app start (#3749)

Breaking changes:

  • options.experimental.sessionReplay.errorSampleRate was renamed to options.experimental.sessionReplay.onErrorSampleRate (#3637)
  • Manifest option io.sentry.session-replay.error-sample-rate was renamed to io.sentry.session-replay.on-error-sample-rate (#3637)
  • Change redactAllText and redactAllImages to maskAllText and maskAllImages (#3741)

7.15.0-alpha.1

30 Aug 10:55
Compare
Choose a tag to compare
7.15.0-alpha.1 Pre-release
Pre-release

Features

  • Add support for setting sentry-native handler_strategy (#3671)

Dependencies

7.14.0 (Stable)

13 Aug 08:46
Compare
Choose a tag to compare

Features

  • Session Replay: Gesture/touch support for Flutter (#3623)

Fixes

  • Fix app start spans missing from Pixel devices (#3634)
  • Avoid ArrayIndexOutOfBoundsException on Android cpu data collection (#3598)
  • Fix lazy select queries instrumentation (#3604)
  • Session Replay: buffer mode improvements (#3622)
    • Align next segment timestamp with the end of the buffered segment when converting from buffer mode to session mode
    • Persist buffer replay type for the entire replay when converting from buffer mode to session mode
    • Properly store screen names for buffer mode
  • Session Replay: fix various crashes and issues (#3628)
    • Fix video not being encoded on Pixel devices
    • Fix SIGABRT native crashes on Xiaomi devices when encoding a video
    • Fix RejectedExecutionException when redacting a screenshot
    • Fix FileNotFoundException when persisting segment values

Chores

  • Introduce ReplayShadowMediaCodec and refactor tests using custom encoder (#3612)

7.13.0

31 Jul 09:05
Compare
Choose a tag to compare

Features

  • Session Replay: (#3565) (#3609)
    • Capture remaining replay segment for ANRs on next app launch
    • Capture remaining replay segment for unhandled crashes on next app launch

Fixes

  • Session Replay: (#3565) (#3609)
    • Fix stopping replay in session mode at 1 hour deadline
    • Never encode full frames for a video segment, only do partial updates. This further reduces size of the replay segment
    • Use propagation context when no active transaction for ANRs

Dependencies

  • Bump Spring Boot to 3.3.2 (#3541)

7.12.1

25 Jul 12:01
Compare
Choose a tag to compare

Fixes

  • Check app start spans time and ignore background app starts (#3550)
    • This should eliminate long-lasting App Start transactions

7.12.0

15 Jul 17:30
Compare
Choose a tag to compare

Features

  • Session Replay Public Beta (#3339)

    To enable Replay use the sessionReplay.sessionSampleRate or sessionReplay.errorSampleRate experimental options.

    import io.sentry.SentryReplayOptions
    import io.sentry.android.core.SentryAndroid
    
    SentryAndroid.init(context) { options ->
     
      // Currently under experimental options:
      options.experimental.sessionReplay.sessionSampleRate = 1.0 // We suggest 0.1 in production (10% sessions sampled)
      options.experimental.sessionReplay.errorSampleRate = 1.0
    
      // To change default redaction behavior (defaults to true)
      options.experimental.sessionReplay.redactAllImages = true
      options.experimental.sessionReplay.redactAllText = true
    
      // To change quality of the recording (defaults to MEDIUM)
      options.experimental.sessionReplay.quality = SentryReplayOptions.SentryReplayQuality.MEDIUM // (LOW|MEDIUM|HIGH)
    }

    To learn more visit Sentry's Mobile Session Replay documentation page.

7.12.0-alpha.4

09 Jul 14:50
Compare
Choose a tag to compare
7.12.0-alpha.4 Pre-release
Pre-release
  • Session Replay for Android (#3339)

We released our fifth Alpha version of the SDK with support. To get access, it requires adding your Sentry org to our feature flag. Please let us know on the waitlist if you're interested

8.0.0-alpha.4

08 Jul 07:00
Compare
Choose a tag to compare
8.0.0-alpha.4 Pre-release
Pre-release

Fixes

  • Removed user segment (#3512)
  • Use span id of remote parent (#3548)
    • Traces were broken because on an incoming request, OtelSentrySpanProcessor did not set the parentSpanId on the span correctly. Traces were not referencing the actual parent span but some other (random) span ID which the server doesn't know.
  • Attach active span to scope when using OpenTelemetry (#3549)
    • Errors weren't linked to traces correctly due to parts of the SDK not knowing the current span
  • Record dropped spans in client report when sampling out OpenTelemetry spans (#3552)
  • Retrieve the correct current span from Scope/Scopes when using OpenTelemetry (#3554)