Recent Releases of https://github.com/getsentry/sentry-java

https://github.com/getsentry/sentry-java - 8.21.0

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>.

- Kotlin
Published by sentry-release-bot[bot] 9 months ago

https://github.com/getsentry/sentry-java - 8.20.0

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: java Sentry.init(options -> { ... options.setOnDiscard( (reason, category, number) -> { // Your logic to process discarded data }); });

- Kotlin
Published by sentry-release-bot[bot] 9 months ago

https://github.com/getsentry/sentry-java - 8.19.1

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.

- Kotlin
Published by sentry-release-bot[bot] 10 months ago

https://github.com/getsentry/sentry-java - 8.19.0

Features

  • Add a isEnableSystemEventBreadcrumbsExtras option to disable reporting system events extras for breadcrumbs (#4625)

Improvements

  • Session Replay: Use main thread looper to schedule replay capture (#4542)
  • Use single LifecycleObserver and multi-cast it to the integrations interested in lifecycle states (#4567)
  • Add sentry.origin attribute to logs (#4618)
    • This helps identify which integration captured a log event
  • Prewarm SentryExecutorService for better performance at runtime (#4606)

Fixes

  • Cache network capabilities and status to reduce IPC calls (#4560)
  • Deduplicate battery breadcrumbs (#4561)
  • Remove unused method in ManifestMetadataReader (#4585)
  • Have single NetworkCallback registered at a time to reduce IPC calls (#4562)
  • Do not register for SystemEvents and NetworkCallbacks immediately when launched with non-foreground importance (#4579)
  • Limit ProGuard keep rules for native methods within sentry-android-ndk to the io.sentry.** namespace. (#4427)
    • If you relied on the Sentry SDK to keep native method names for JNI compatibility within your namespace, please review your ProGuard rules and ensure the configuration still works. Especially when you're not consuming any of the default Android proguard rules (proguard-android.txt or proguard-android-optimize.txt) the following config should be present: -keepclasseswithmembernames class * { native <methods>; }
  • Fix abstract method error in SentrySupportSQLiteDatabase (#4597)
  • Ensure frame metrics listeners are registered/unregistered on the main thread (#4582)
  • Do not report cached events as lost (#4575)
    • Previously events were recorded as lost early despite being retried later through the cache
  • Move and flush unfinished previous session on init (#4624)
    • This removes the need for unnecessary blocking our background queue for 15 seconds in the case of a background app start
  • Switch to compileOnly dependency for compose-ui-material (#4630)
    • This fixes StackOverflowError when using OSS Licenses plugin

Dependencies

- Kotlin
Published by sentry-release-bot[bot] 10 months ago

https://github.com/getsentry/sentry-java - 8.18.0

Features

  • Add SentryUserFeedbackButton Composable (#4559)
    • Also added Sentry.showUserFeedbackDialog static method
  • Add deadlineTimeout option (#4555)
  • Add Ktor client integration (#4527)
    • To use the integration, add a dependency on io.sentry:sentry-ktor-client, then install the SentryKtorClientPlugin on your HttpClient, e.g.: kotlin val client = HttpClient(Java) { install(io.sentry.ktorClient.SentryKtorClientPlugin) { captureFailedRequests = true failedRequestTargets = listOf(".*") failedRequestStatusCodes = listOf(HttpStatusCodeRange(500, 599)) } }

Fixes

  • Allow multiple UncaughtExceptionHandlerIntegrations to be active at the same time (#4462)
  • Prevent repeated scroll target determination during a single scroll gesture (#4557)
    • This should reduce the number of ANRs seen in SentryGestureListener
  • Do not use Sentry logging API in JUL if logs are disabled (#4574)
    • This was causing Sentry SDK to log warnings: "Sentry Log is disabled and this 'logger' call is a no-op."
  • Do not use Sentry logging API in Log4j2 if logs are disabled (#4573)
    • This was causing Sentry SDK to log warnings: "Sentry Log is disabled and this 'logger' call is a no-op."
  • SDKs send queue is no longer shutdown immediately on re-init (#4564)
    • This means we're no longer losing events that have been enqueued right before SDK re-init.
  • Reduce scope forking when using OpenTelemetry (#4565)
    • Sentry.withScope now has the correct current scope passed to the callback. Previously our OpenTelemetry integration forked scopes an additional.
    • Overall the SDK is now forking scopes a bit less often.

- Kotlin
Published by sentry-release-bot[bot] 10 months ago

https://github.com/getsentry/sentry-java - 8.17.0

Features

  • Send Timber logs through Sentry Logs (#4490)
    • Enable the Logs feature in your SentryOptions or with the io.sentry.logs.enabled manifest option and the SDK will automatically send Timber logs to Sentry, if the TimberIntegration is enabled.
    • The SDK will automatically detect Timber and use it to send logs to Sentry.
  • Send logcat through Sentry Logs (#4487)
    • Enable the Logs feature in your SentryOptions or with the io.sentry.logs.enabled manifest option and the SDK will automatically send logcat logs to Sentry, if the Sentry Android Gradle plugin is applied.
    • To set the logcat level check the Logcat integration documentation.
  • Read build tool info from sentry-debug-meta.properties and attach it to events (#4314)

Dependencies

  • Bump OpenTelemetry (#4532)
    • opentelemetry-sdk to 1.51.0
    • opentelemetry-instrumentation to 2.17.0
    • opentelemetry-javaagent to 2.17.0
    • opentelemetry-semconv to 1.34.0
    • We are now configuring OpenTelemetry to still behave the same way it did before for span names it generates in GraphQL auto instrumentation (#4537)

Fixes

  • Use Spring Boot Starter 3 in sentry-spring-boot-starter-jakarta (#4545)
    • While refactoring our dependency management, we accidentally added Spring Boot 2 and Spring Boot Starter 2 as dependencies of sentry-spring-boot-starter-jakarta, which is intended for Spring Boot 3.
    • Now, the correct dependencies (Spring Boot 3 and Spring Boot Starter 3) are being added.

- Kotlin
Published by sentry-release-bot[bot] 11 months ago

https://github.com/getsentry/sentry-java - 7.22.6

Fixes

  • Compress Screenshots on a background thread (#4295)
  • Improve low memory breadcrumb capturing (#4325)
  • Make SystemEventsBreadcrumbsIntegration faster (#4330)
  • Fix unregister SystemEventsBroadcastReceiver when entering background (#4338)
    • This should reduce ANRs seen with this class in the stack trace for Android 14 and above
  • Pre-load modules on a background thread upon SDK init (#4348)
  • Session Replay: Fix inconsistent segment_id (#4471)
  • Session Replay: Do not capture current replay for cached events from the past (#4474)
  • Session Replay: Fix crash on devices with the Unisoc/Spreadtrum T606 chipset (#4477)
  • Session Replay: Fix masking of non-styled Text Composables (#4361)
  • Session Replay: Fix masking read-only TextField Composables (#4362)
  • Fix Session Replay masking for newer versions of Jetpack Compose (1.8+) (#4485)
  • Session Replay: Expand fix for crash on devices to all Unisoc/Spreadtrum chipsets (#4510)

- Kotlin
Published by sentry-release-bot[bot] 11 months ago

https://github.com/getsentry/sentry-java - 8.16.1-alpha.2

Fixes

  • Optimize scope when maxBreadcrumb is 0 (#4504)
  • Fix javadoc on TransportResult (#4528)
  • Session Replay: Fix IllegalArgumentException when Bitmap is initialized with non-positive values (#4536)
  • Set thread information on transaction from OpenTelemetry attributes (#4478)

Internal

  • Flattened PerformanceCollectionData (#4505)

- Kotlin
Published by sentry-release-bot[bot] 11 months ago

https://github.com/getsentry/sentry-java - 8.16.0

Features

  • Send JUL logs to Sentry as logs (#4518)
    • You need to enable the logs feature, either in sentry.properties: properties logs.enabled=true
    • Or, if you manually initialize Sentry, you may also enable logs on Sentry.init: java Sentry.init(options -> { ... options.getLogs().setEnabled(true); });
    • It is also possible to set the minimumLevel in logging.properties, meaning any log message >= the configured level will be sent to Sentry and show up under Logs: properties io.sentry.jul.SentryHandler.minimumLevel=CONFIG
  • Send Log4j2 logs to Sentry as logs (#4517)
    • You need to enable the logs feature either in sentry.properties: properties logs.enabled=true
    • If you manually initialize Sentry, you may also enable logs on Sentry.init: java Sentry.init(options -> { ... options.getLogs().setEnabled(true); });
    • It is also possible to set the minimumLevel in log4j2.xml, meaning any log message >= the configured level will be sent to Sentry and show up under Logs: xml <Sentry name="Sentry" dsn="your DSN" minimumBreadcrumbLevel="DEBUG" minimumEventLevel="WARN" minimumLevel="DEBUG" />

- Kotlin
Published by sentry-release-bot[bot] 11 months ago

https://github.com/getsentry/sentry-java - 8.15.1

Fixes

  • Enabling Sentry Logs through Logback in Spring Boot config did not work in 3.15.0 (#4523)

- Kotlin
Published by sentry-release-bot[bot] 11 months ago

https://github.com/getsentry/sentry-java - 8.15.0

Fixes

  • No longer send out empty log envelopes (#4497)
  • Session Replay: Expand fix for crash on devices to all Unisoc/Spreadtrum chipsets (#4510)
  • Log parameter objects are now turned into String via toString (#4515)
    • One of the two SentryLogEventAttributeValue constructors did not convert the value previously.
  • Logs are now flushed on shutdown (#4503)
  • User Feedback: Do not redefine system attributes for SentryUserFeedbackButton, but reference them instead (#4519)

Features

  • Add chipset to device context (#4512)
  • Send Logback logs to Sentry as logs (#4502)
    • You need to enable the logs feature and can also set the minimumLevel for log events: xml <appender name="sentry" class="io.sentry.logback.SentryAppender"> <options> <!-- NOTE: Replace the test DSN below with YOUR OWN DSN to see the events from this app in your Sentry project/dashboard --> <dsn>https://502f25099c204a2fbf4cb16edc5975d1@o447951.ingest.sentry.io/5428563</dsn> <logs> <enabled>true</enabled> </logs> </options> <!-- Demonstrates how to modify the minimum values --> <!-- Default for Events is ERROR --> <minimumEventLevel>WARN</minimumEventLevel> <!-- Default for Breadcrumbs is INFO --> <minimumBreadcrumbLevel>DEBUG</minimumBreadcrumbLevel> <!-- Default for Log Events is INFO --> <minimumLevel>INFO</minimumLevel> </appender>
    • For Spring Boot you may also enable it in application.properties / application.yml: properties sentry.logs.enabled=true sentry.logging.minimum-level=error
    • If you manually initialize Sentry, you may also enable logs on Sentry.init: java Sentry.init(options -> { ... options.getLogs().setEnabled(true); });
    • Enabling via sentry.properties is also possible: properties logs.enabled=true
  • Automatically use SentryOptions.Logs.BeforeSendLogCallback Spring beans (#4509)

Dependencies

- Kotlin
Published by sentry-release-bot[bot] 11 months ago

https://github.com/getsentry/sentry-java - 8.14.0

Fixes

  • Fix Session Replay masking for newer versions of Jetpack Compose (1.8+) (#4485)

Features

  • Add New User Feedback Widget (#4450)
    • This widget is a custom button that can be used to show the user feedback form
  • Add New User Feedback form (#4384)

    • We now introduce SentryUserFeedbackDialog, which extends AlertDialog, inheriting the show() and cancel() methods, among others. To use it, just instantiate it and call show() on the instance (Sentry must be previously initialized). For customization options, please check the User Feedback documentation. ```java import io.sentry.android.core.SentryUserFeedbackDialog;

    new SentryUserFeedbackDialog.Builder(context).create().show(); kotlin import io.sentry.android.core.SentryUserFeedbackDialog

    SentryUserFeedbackDialog.Builder(context).create().show() ```

  • Add user.id, user.name and user.email to log attributes (#4486)

  • User name attribute has been deprecated, please use username instead (#4486)

  • Add device (device.brand, device.model and device.family) and OS (os.name and os.version) attributes to logs (#4493)

  • Serialize preContext and postContext in SentryStackFrame (#4482)

Internal

  • User Feedback now uses SentryUser.username instead of SentryUser.name (#4494)

- Kotlin
Published by sentry-release-bot[bot] 12 months ago

https://github.com/getsentry/sentry-java - 8.13.3

Fixes

  • Send UI Profiling app start chunk when it finishes (#4423)
  • Republish Javadoc #4457
  • Finalize OkHttpEvent even if no active span in SentryOkHttpInterceptor #4469
  • Session Replay: Do not capture current replay for cached events from the past (#4474)
  • Session Replay: Correctly capture Dialogs and non full-sized windows (#4354)
  • Session Replay: Fix inconsistent segment_id (#4471)
  • Session Replay: Fix crash on devices with the Unisoc/Spreadtrum T606 chipset (#4477)

- Kotlin
Published by sentry-release-bot[bot] 12 months ago

https://github.com/getsentry/sentry-java - 8.13.2

Fixes

  • Don't apply Spring Boot plugin in sentry-spring-boot-jakarta (#4456)
    • The jar for io.sentry:sentry-spring-boot-jakarta is now correctly being built and published to Maven Central.

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.13.1

Fixes

  • Fix SDK init crash if initialized from background thread while an activiy is resumed (#4449)

Dependencies

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.13.0

Features

  • Add debug mode for Session Replay masking (#4357)
    • Use Sentry.replay().enableDebugMaskingOverlay() to overlay the screen with the Session Replay masks.
    • The masks will be invalidated at most once per frameRate (default 1 fps).
  • Extend Logs API to allow passing in attributes (#4402)
    • Sentry.logger.log now takes a SentryLogParameters
    • Use SentryLogParameters.create(SentryAttributes.of(...)) to pass attributes
    • Attribute values may be of type string, boolean, integer or double.
    • Other types will be converted to string. Currently we simply call toString() but we might offer more in the future.
    • You may manually flatten complex types into multiple separate attributes of simple types.
      • e.g. intead of SentryAttribute.named("point", Point(10, 20)) you may store it as SentryAttribute.integerAttribute("point.x", point.x) and SentryAttribute.integerAttribute("point.y", point.y)
    • SentryAttribute.named() will automatically infer the type or fall back to string.
    • SentryAttribute.booleanAttribute() takes a Boolean value
    • SentryAttribute.integerAttribute() takes a Integer value
    • SentryAttribute.doubleAttribute() takes a Double value
    • SentryAttribute.stringAttribute() takes a String value
    • We opted for handling parameters via SentryLogParameters to avoid creating tons of overloads that are ambiguous.

Fixes

  • Isolation scope is now forked in OtelSentrySpanProcessor instead of OtelSentryPropagator (#4434)
    • Since propagator may never be invoked we moved the location where isolation scope is forked.
    • Not invoking OtelSentryPropagator.extract or having a sentry-trace header that failed to parse would cause isolation scope not to be forked.
    • This in turn caused data to bleed between scopes, e.g. from one request into another

Dependencies

  • Bump Spring Boot to 3.5.0 (#4111)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.12.0

Features

  • Add new User Feedback API (#4286)
    • We now introduced Sentry.captureFeedback, which supersedes Sentry.captureUserFeedback
  • Add Sentry Log Feature (#4372)
    • The feature is disabled by default and needs to be enabled by:
      • options.getLogs().setEnabled(true) in Sentry.init / SentryAndroid.init
      • <meta-data android:name="io.sentry.logs.enabled" android:value="true" /> in AndroidManifest.xml
      • logs.enabled=true in sentry.properties
      • sentry.logs.enabled=true in application.properties
      • sentry.logs.enabled: true in application.yml
    • Logs can be captured using Sentry.logger().info() and similar methods.
    • Logs also take a format string and arguments which we then send through String.format.
    • Please use options.getLogs().setBeforeSend() to filter outgoing logs

Fixes

  • Hook User Interaction integration into running Activity in case of deferred SDK init (#4337)

Dependencies

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.11.1

Fixes

  • Fix Android profile chunk envelope type for UI Profiling (#4366)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.11.0

Features

  • Make RequestDetailsResolver public (#4326)
    • RequestDetailsResolver is now public and has an additional constructor, making it easier to use a custom TransportFactory

Fixes

  • Session Replay: Fix masking of non-styled Text Composables (#4361)
  • Session Replay: Fix masking read-only TextField Composables (#4362)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.11.0-alpha.1

Features

  • Support globalHubMode for OpenTelemetry (#4349)
    • Sentry now adds OpenTelemetry spans without a parent to the last known unfinished root span (transaction)
    • Previously those spans would end up in Sentry as separate transactions
    • Spans created via Sentry API are preferred over those created through OpenTelemetry API or auto instrumentation
  • New option ignoreStandaloneClientSpans that prevents Sentry from creating transactions for OpenTelemetry spans with kind CLIENT (#4349)
    • Defaults to false meaning standalone OpenTelemetry spans with kind CLIENT will be turned into Sentry transactions
  • Make RequestDetailsResolver public (#4326)
    • RequestDetailsResolver is now public and has an additional constructor, making it easier to use a custom TransportFactory

Fixes

  • Session Replay: Fix masking of non-styled Text Composables (#4361)
  • Session Replay: Fix masking read-only TextField Composables (#4362)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.10.0

Features

  • Wrap configured OpenTelemetry ContextStorageProvider if available (#4359)
    • This is only relevant if you see java.lang.IllegalStateException: Found multiple ContextStorageProvider. Set the io.opentelemetry.context.ContextStorageProvider property to the fully qualified class name of the provider to use. Falling back to default ContextStorage. Found providers: ...
    • Set -Dio.opentelemetry.context.contextStorageProvider=io.sentry.opentelemetry.SentryContextStorageProvider on your java command
    • Sentry will then wrap the other ContextStorageProvider that has been configured by loading it through SPI
    • If no other ContextStorageProvider is available or there are problems loading it, we fall back to using SentryOtelThreadLocalStorage

Fixes

  • Update profile chunk rate limit and client report (#4353)

Dependencies

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.10.0-alpha.1

Features

  • Support globalHubMode for OpenTelemetry (#4349)
    • Sentry now adds OpenTelemetry spans without a parent to the last known unfinished root span (transaction)
    • Previously those spans would end up in Sentry as separate transactions
    • Spans created via Sentry API are preferred over those created through OpenTelemetry API or auto instrumentation
  • New option ignoreStandaloneClientSpans that prevents Sentry from creating transactions for OpenTelemetry spans with kind CLIENT (#4349)
    • Defaults to false meaning standalone OpenTelemetry spans with kind CLIENT will be turned into Sentry transactions

Fixes

  • Update profile chunk rate limit and client report (#4353)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.9.0

Features

  • Add SentryWrapper.wrapRunnable to wrap Runnable for use with Sentry (#4332)

Fixes

  • Fix TTFD measurement when API called too early (#4297)
  • Tag sockets traffic originating from Sentry's HttpConnection (#4340)
    • This should suppress the StrictMode's UntaggedSocketViolation
  • Reduce debug logs verbosity (#4341)
  • Fix unregister SystemEventsBroadcastReceiver when entering background (#4338)
    • This should reduce ANRs seen with this class in the stack trace for Android 14 and above

Improvements

  • Make user interaction tracing faster and do fewer allocations (#4347)
  • Pre-load modules on a background thread upon SDK init (#4348)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.9.0-alpha.1

Features

  • Add SentryWrapper.wrapRunnable to wrap Runnable for use with Sentry (#4332)
  • Support globalHubMode for OpenTelemetry
    • Sentry now adds OpenTelemetry spans without a parent to the last known unfinished root span (transaction)
    • Previously those spans would end up in Sentry as separate transactions

Fixes

  • Fix TTFD measurement when API called too early (#4297)
  • Tag sockets traffic originating from Sentry's HttpConnection (#4340)
    • This should suppress the StrictMode's UntaggedSocketViolation
  • Reduce debug logs verbosity (#4341)
  • Fix unregister SystemEventsBroadcastReceiver when entering background (#4338)
    • This should reduce ANRs seen with this class in the stack trace for Android 14 and above

Improvements

  • Make user interaction tracing faster and do fewer allocations (#4347)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.8.0

Features

  • Add CoroutineExceptionHandler for reporting uncaught exceptions in coroutines to Sentry (#4259)
    • This is now part of sentry-kotlin-extensions and can be used together with SentryContext when launching a coroutine
    • Any exceptions thrown in a coroutine when using the handler will be captured (not rethrown!) and reported to Sentry
    • It's also possible to extend CoroutineExceptionHandler to implement custom behavior in addition to the one we provide by default

Fixes

  • Use thread context classloader when available (#4320)
    • This ensures correct resource loading in environments like Spring Boot where the thread context classloader is used for resource loading.
  • Improve low memory breadcrumb capturing (#4325)
  • Fix do not initialize SDK for Jetpack Compose Preview builds (#4324)
  • Fix Synchronize Baggage values (#4327)

Improvements

  • Make SystemEventsBreadcrumbsIntegration faster (#4330)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.7.0

Features

  • UI Profiling GA

Continuous Profiling is now GA, named UI Profiling. To enable it you can use one of the following options. More info can be found at https://docs.sentry.io/platforms/android/profiling/. Note: Both options.profilesSampler and options.profilesSampleRate must not be set to enable UI Profiling. To keep the same transaction-based behaviour, without the 30 seconds limitation, you can use the trace lifecycle mode.

xml <application> <!-- Enable UI profiling, adjust in production env. This is evaluated only once per session --> <meta-data android:name="io.sentry.traces.profiling.session-sample-rate" android:value="1.0" /> <!-- Set profiling lifecycle, can be `manual` (controlled through `Sentry.startProfiler()` and `Sentry.stopProfiler()`) or `trace` (automatically starts and stop a profile whenever a sampled trace starts and finishes) --> <meta-data android:name="io.sentry.traces.profiling.lifecycle" android:value="trace" /> <!-- Enable profiling on app start. The app start profile will be stopped automatically when the app start root span finishes --> <meta-data android:name="io.sentry.traces.profiling.start-on-app-start" android:value="true" /> </application> ```java import io.sentry.ProfileLifecycle; import io.sentry.android.core.SentryAndroid;

SentryAndroid.init(context, options -> { // Enable UI profiling, adjust in production env. This is evaluated only once per session options.setProfileSessionSampleRate(1.0); // Set profiling lifecycle, can be manual (controlled through Sentry.startProfiler() and Sentry.stopProfiler()) or trace (automatically starts and stop a profile whenever a sampled trace starts and finishes) options.setProfileLifecycle(ProfileLifecycle.TRACE); // Enable profiling on app start. The app start profile will be stopped automatically when the app start root span finishes options.setStartProfilerOnAppStart(true); }); kotlin import io.sentry.ProfileLifecycle import io.sentry.android.core.SentryAndroid

SentryAndroid.init(context, { options -> // Enable UI profiling, adjust in production env. This is evaluated only once per session options.profileSessionSampleRate = 1.0 // Set profiling lifecycle, can be manual (controlled through Sentry.startProfiler() and Sentry.stopProfiler()) or trace (automatically starts and stop a profile whenever a sampled trace starts and finishes) options.profileLifecycle = ProfileLifecycle.TRACE // Enable profiling on app start. The app start profile will be stopped automatically when the app start root span finishes options.isStartProfilerOnAppStart = true }) ```

  • Continuous Profiling - Stop when app goes in background (#4311)
  • Continuous Profiling - Add delayed stop (#4293)
  • Continuous Profiling - Out of Experimental (#4310)

Fixes

  • Compress Screenshots on a background thread (#4295)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.6.0

Behavioral Changes

  • The Sentry SDK will now crash on startup if mixed versions have been detected (#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)
    • 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)
  • Add MANIFEST.MF to Sentry JARs (#4272)
  • Retain baggage sample rate/rand values as doubles (#4279)
  • Introduce fatal SDK logger (#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)
  • Session Replay: Change bitmap config to ARGB_8888 for screenshots (#4282)
  • The MANIFEST.MF of sentry-opentelemetry-agent now has Implementation-Version set to the raw version (#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)
  • Do not leak SentryFileInputStream/SentryFileOutputStream descriptors and channels (#4296)
  • Remove "not yet implemented" from Sentry.flush comment (#4305)

Internal

  • Added platform to SentryEnvelopeItemHeader (#4287)
    • Set android platform to ProfileChunk envelope item header

Dependencies

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 7.22.5

Fixes

  • Session Replay: Change bitmap config to ARGB_8888 for screenshots (#4282)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 7.22.4

Fixes

  • Session Replay: Fix crash when a navigation breadcrumb does not have "to" destination (#4185)
  • Session Replay: Cap video segment duration to maximum 5 minutes to prevent endless video encoding in background (#4185)
  • Avoid logging an error when a float is passed in the manifest (#4266)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.5.0

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.

```java 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(); kotlin 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

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 7.22.3

Fixes

  • Reduce excessive CPU usage when serializing breadcrumbs to disk for ANRs (#4181)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.4.0

Fixes

  • The SDK now handles null on many APIs instead of expecting a non null value (#4245)
    • Certain APIs like setTag, setData, setExtra, setContext previously caused a NullPointerException when invoked with either null key or value.
    • The SDK now tries to have a sane fallback when null is passed and no longer throws NullPointerException
    • If null is passed, the SDK will
    • do nothing if a null key is passed, returning null for non void methods
    • remove any previous value if the new value is set to null
  • Add support for setting in-app-includes/in-app-excludes via AndroidManifest.xml (#4240)
  • Modifications to OkHttp requests are now properly propagated to the affected span / breadcrumbs (#4238)
    • Please ensure the SentryOkHttpInterceptor is added last to your OkHttpClient, as otherwise changes to the Request by subsequent interceptors won't be considered
  • Fix "class ch.qos.logback.classic.spi.ThrowableProxyVO cannot be cast to class ch.qos.logback.classic.spi.ThrowableProxy" (#4206)
    • In this case we cannot report the Throwable to Sentry as it's not available
    • If you are using OpenTelemetry v1 OpenTelemetryAppender, please consider upgrading to v2
  • Pass OpenTelemetry span attributes into TracesSampler callback (#4253)
    • SamplingContext now has a getAttribute method that grants access to OpenTelemetry span attributes via their String key (e.g. http.request.method)
  • Fix AbstractMethodError when using SentryTraced for Jetpack Compose (#4255)
  • Assume http.client for span op if not a root span (#4257)
  • Avoid unnecessary copies when using CopyOnWriteArrayList (#4247)
    • This affects in particular SentryTracer.getLatestActiveSpan which would have previously copied all child span references. This may have caused OutOfMemoryError on certain devices due to high frequency of calling the method.

Features

  • The SDK now automatically propagates the trace-context to the native layer. This allows to connect errors on different layers of the application. (#4137)
  • Capture OpenTelemetry span events (#3564)
    • OpenTelemetry spans may have exceptions attached to them (openTelemetrySpan.recordException). We can now send those to Sentry as errors.
    • Set capture-open-telemetry-events=true in sentry.properties to enable it
    • Set sentry.capture-open-telemetry-events=true in Springs application.properties to enable it
    • Set sentry.captureOpenTelemetryEvents: true in Springs application.yml to enable it

Behavioural Changes

  • Use java.net.URI for parsing URLs in UrlUtils (#4210)
    • This could affect grouping for issues with messages containing URLs that fall in known corner cases that were handled incorrectly previously (e.g. email in URL path)

Internal

  • Also use port when checking if a request is made to Sentry DSN (#4231)
    • For our OpenTelemetry integration we check if a span is for a request to Sentry
    • We now also consider the port when performing this check

Dependencies

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 7.22.2

Fixes

  • Fix AbstractMethodError when using SentryTraced for Jetpack Compose (#4256)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 7.22.1

Fixes

  • Fix Ensure app start type is set, even when ActivityLifecycleIntegration is not running (#4216)
  • Fix properly reset application/content-provider timespans for warm app starts (#4244)

- Kotlin
Published by sentry-release-bot[bot] about 1 year ago

https://github.com/getsentry/sentry-java - 8.3.0 (Stable)

Features

  • Add HTTP server request headers from OpenTelemetry span attributes to sentry request in payload (#4102)
    • You have to explicitly enable each header by adding it to the OpenTelemetry config
    • Please only enable headers you actually want to send to Sentry. Some may contain sensitive data like PII, cookies, tokens etc.
    • We are no longer adding request/response headers to contexts/otel/attributes of the event.
  • The ignoredErrors option is now configurable via the manifest property io.sentry.traces.ignored-errors (#4178)
  • A list of active Spring profiles is attached to payloads sent to Sentry (errors, traces, etc.) and displayed in the UI when using our Spring or Spring Boot integrations (#4147)
    • This consists of an empty list when only the default profile is active
  • Added enableTraceIdGeneration to the AndroidOptions. This allows Hybrid SDKs to "freeze" and control the trace and connect errors on different layers of the application (4188)
  • Move to a single NetworkCallback listener to reduce number of IPC calls on Android (#4164)
  • Add GraphQL Apollo Kotlin 4 integration (#4166)
  • Add support for async dispatch requests to Spring Boot 2 and 3 (#3983)
    • To enable it, please set sentry.keep-transactions-open-for-async-responses=true in application.properties or sentry.keepTransactionsOpenForAsyncResponses: true in application.yml
  • Add constructor to JUL SentryHandler for disabling external config (#4208)

Fixes

  • Filter strings that cannot be parsed as Regex no longer cause an SDK crash (#4213)
    • This was the case e.g. for ignoredErrors, ignoredTransactions and ignoredCheckIns
    • We now simply don't use such strings for Regex matching and only use them for String comparison
  • SentryOptions.setTracePropagationTargets is no longer marked internal (#4170)
  • Session Replay: Fix crash when a navigation breadcrumb does not have "to" destination (#4185)
  • Session Replay: Cap video segment duration to maximum 5 minutes to prevent endless video encoding in background (#4185)
  • Check tracePropagationTargets in OpenTelemetry propagator (#4191)
    • If a URL can be retrieved from OpenTelemetry span attributes, we check it against tracePropagationTargets before attaching sentry-trace and baggage headers to outgoing requests
    • If no URL can be retrieved we always attach the headers
  • Fix ignoredErrors, ignoredTransactions and ignoredCheckIns being unset by external options like sentry.properties or ENV vars (#4207)
    • Whenever parsing of external options was enabled (enableExternalConfiguration), which is the default for many integrations, the values set on SentryOptions passed to Sentry.init would be lost
    • Even if the value was not set in any external configuration it would still be set to an empty list

Behavioural Changes

  • The class io.sentry.spring.jakarta.webflux.ReactorUtils is now deprecated, please use io.sentry.reactor.SentryReactorUtils in the new sentry-reactor module instead (#4155)
    • The new module will be exposed as an api dependency when using sentry-spring-boot-jakarta (Spring Boot 3) or sentry-spring-jakarta (Spring 6). Therefore, if you're using one of those modules, changing your imports will suffice.

- Kotlin
Published by sentry-release-bot[bot] over 1 year ago

https://github.com/getsentry/sentry-java - 8.2.0

Breaking Changes

  • The Kotlin Language version is now set to 1.6 (#3936)

Features

  • Create onCreate and onStart spans for all Activities (#4025)
  • Add split apks info to the App context (#3193)
  • Expose new withSentryObservableEffect method overload that accepts SentryNavigationListener as a parameter (#4143)
    • This allows sharing the same SentryNavigationListener instance across fragments and composables to preserve the trace
  • (Internal) Add API to filter native debug images based on stacktrace addresses (#4089)
  • Propagate sampling random value (#4153)
    • The random value used for sampling traces is now sent to Sentry and attached to the baggage header on outgoing requests
  • Update sampleRate that is sent to Sentry and attached to the baggage header on outgoing requests (#4158)
    • If the SDK uses its sampleRate or tracesSampler callback, it now updates the sampleRate in Dynamic Sampling Context.

Fixes

  • Log a warning when envelope or items are dropped due to rate limiting (#4148)
  • Do not log if OtelContextScopesStorage cannot be found (#4127)
    • Previously java.lang.ClassNotFoundException: io.sentry.opentelemetry.OtelContextScopesStorage was shown in the log if the class could not be found.
    • This is just a lookup the SDK performs to configure itself. The SDK also works without OpenTelemetry.
  • Session Replay: Fix various crashes and issues (#4135)
    • Fix FileNotFoundException when trying to read/write .ongoing_segment file
    • Fix IllegalStateException when registering onDrawListener
    • Fix SIGABRT native crashes on Motorola devices when encoding a video
  • Mention javadoc and sources for published artifacts in Gradle .module metadata (#3936)
  • (Jetpack Compose) Modifier.sentryTag now uses Modifier.Node (#4029)
    • This allows Composables that use this modifier to be skippable

Dependencies

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.22.0 (Stable)

Fixes

  • Session Replay: Fix various crashes and issues (#4135)
    • Fix FileNotFoundException when trying to read/write .ongoing_segment file
    • Fix IllegalStateException when registering onDrawListener
    • Fix SIGABRT native crashes on Motorola devices when encoding a video
  • (Jetpack Compose) Modifier.sentryTag now uses Modifier.Node (#4029)
    • This allows Composables that use this modifier to be skippable

Features

  • (Internal) Add API to filter native debug images based on stacktrace addresses (#4159)

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 8.1.0

Features

  • Add options.ignoredErrors to filter out errors that match a certain String or Regex (#4083)
    • The matching is attempted on event.message, event.formatted, and {event.throwable.class.name}: {event.throwable.message}
    • Can be set in sentry.properties, e.g. ignored-errors=Some error,Another .*
    • Can be set in environment variables, e.g. SENTRY_IGNORED_ERRORS=Some error,Another .*
    • For Spring Boot, it can be set in application.properties, e.g. sentry.ignored-errors=Some error,Another .*
  • Log OpenTelemetry related Sentry config (#4122)

Fixes

  • Avoid logging an error when a float is passed in the manifest (#4031)
  • Add request details to transactions created through OpenTelemetry (#4098)
    • We now add HTTP request method and URL where Sentry expects it to display it in Sentry UI
  • Remove java.lang.ClassNotFoundException debug logs when searching for OpenTelemetry marker classes (#4091)
    • There was up to three of these, one for io.sentry.opentelemetry.agent.AgentMarker, io.sentry.opentelemetry.agent.AgentlessMarker and io.sentry.opentelemetry.agent.AgentlessSpringMarker.
    • These were not indicators of something being wrong but rather the SDK looking at what is available at runtime to configure itself accordingly.
  • Do not instrument File I/O operations if tracing is disabled (#4051)
  • Do not instrument User Interaction multiple times (#4051)
  • Speed up view traversal to find touched target in UserInteractionIntegration (#4051)
  • Reduce IPC/Binder calls performed by the SDK (#4058)

Behavioural Changes

  • Reduce the number of broadcasts the SDK is subscribed for (#4052)
    • Drop TempSensorBreadcrumbsIntegration
    • Drop PhoneStateBreadcrumbsIntegration
    • Reduce number of broadcasts in SystemEventsBreadcrumbsIntegration

Current list of the broadcast events can be found here. If you'd like to subscribe for more events, consider overriding the SystemEventsBreadcrumbsIntegration as follows:

kotlin SentryAndroid.init(context) { options -> options.integrations.removeAll { it is SystemEventsBreadcrumbsIntegration } options.integrations.add(SystemEventsBreadcrumbsIntegration(context, SystemEventsBreadcrumbsIntegration.getDefaultActions() + listOf(/* your custom actions */))) }

If you would like to keep some of the default broadcast events as breadcrumbs, consider opening a GitHub issue. - Set mechanism type to suppressed for suppressed exceptions (#4125) - This helps to distinguish an exceptions cause from any suppressed exceptions in the Sentry UI

Dependencies

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.21.0

Fixes

  • Do not instrument File I/O operations if tracing is disabled (#4051)
  • Do not instrument User Interaction multiple times (#4051)
  • Speed up view traversal to find touched target in UserInteractionIntegration (#4051)
  • Reduce IPC/Binder calls performed by the SDK (#4058)

Behavioural Changes

  • Reduce the number of broadcasts the SDK is subscribed for (#4052)
    • Drop TempSensorBreadcrumbsIntegration
    • Drop PhoneStateBreadcrumbsIntegration
    • Reduce number of broadcasts in SystemEventsBreadcrumbsIntegration

Current list of the broadcast events can be found here. If you'd like to subscribe for more events, consider overriding the SystemEventsBreadcrumbsIntegration as follows:

kotlin SentryAndroid.init(context) { options -> options.integrations.removeAll { it is SystemEventsBreadcrumbsIntegration } options.integrations.add(SystemEventsBreadcrumbsIntegration(context, SystemEventsBreadcrumbsIntegration.getDefaultActions() + listOf(/* your custom actions */))) }

If you would like to keep some of the default broadcast events as breadcrumbs, consider opening a GitHub issue.

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 8.0.0

Version 8 of the Sentry Android/Java SDK brings a variety of features and fixes. The most notable changes are:

  • Hub has been replaced by Scopes
  • New Scope types have been introduced, see "Behavioural Changes" for more details.
  • Lifecycle tokens have been introduced to manage Scope lifecycle, see "Behavioural Changes" for more details.
  • Bumping minSdk level to 21 (Android 5.0)
  • Our sentry-opentelemetry-agent has been improved and now works in combination with the rest of Sentry. You may now mix and match OpenTelemetry and Sentry API for instrumenting your application.
  • The SDK is now compatible with Spring Boot 3.4
  • We now support GraphQL v22 (sentry-graphql-22)
  • Metrics have been removed

Please take a look at our migration guide in docs.

Sentry Self-hosted Compatibility

This SDK version is compatible with a self-hosted version of Sentry 22.12.0 or higher. If you are using an older version of self-hosted Sentry (aka onpremise), you will need to upgrade. If you're using sentry.io no action is required.

Breaking Changes

  • The Android minSdk level for all Android modules is now 21 (#3852)
  • The minSdk level for sentry-android-ndk changed from 19 to 21 (#3851)
  • 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.
  • 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)
  • sentry-android-okhttp has been removed in favor of sentry-okhttp, removing android dependency from the module (#3510)
  • Contexts no longer extends ConcurrentHashMap, instead we offer a selected set of methods.
  • User segment has been removed (#3512)
  • One of the AndroidTransactionProfiler constructors has been removed, please use a different one (#3780)
  • Use String instead of UUID for SessionId (#3834)
    • The Session constructor now takes a String instead of a UUID for the sessionId parameter.
    • Session.getSessionId() now returns a String instead of a UUID.
  • All status codes below 400 are now mapped to SpanStatus.OK (#3869)
  • Change OkHttp sub-spans to span attributes (#3556)
    • This will reduce the number of spans created by the SDK
  • instrumenter option should no longer be needed as our new OpenTelemetry integration now works in combination with the rest of Sentry

Behavioural Changes

  • We're introducing some new Scope types in the SDK, allowing for better control over what data is attached where. Previously there was a stack of scopes that was pushed and popped. Instead we now fork scopes for a given lifecycle and then restore the previous scopes. Since Hub is gone, it is also never cloned anymore. Separation of data now happens through the different scope types while making it easier to manipulate exactly what you need without having to attach data at the right time to have it apply where wanted.
    • Global scope is attached to all events created by the SDK. It can also be modified before Sentry.init has been called. It can be manipulated using Sentry.configureScope(ScopeType.GLOBAL, (scope) -> { ... }).
    • Isolation scope can be used e.g. to attach data to all events that come up while handling an incoming request. It can also be used for other isolation purposes. It can be manipulated using Sentry.configureScope(ScopeType.ISOLATION, (scope) -> { ... }). The SDK automatically forks isolation scope in certain cases like incoming requests, CRON jobs, Spring @Async and more.
    • Current scope is forked often and data added to it is only added to events that are created while this scope is active. Data is also passed on to newly forked child scopes but not to parents. It can be manipulated using Sentry.configureScope(ScopeType.CURRENT, (scope) -> { ... }).
  • Sentry.popScope has been deprecated, please call .close() on the token returned by Sentry.pushScope instead or use it in a way described in more detail in our migration guide.
  • We have chosen a default scope that is used for Sentry.configureScope() as well as API like Sentry.setTag()
    • For Android the type defaults to CURRENT scope
    • For Backend and other JVM applicatons it defaults to ISOLATION scope
  • Event processors on Scope can now be ordered by overriding the getOrder method on implementations of EventProcessor. NOTE: This order only applies to event processors on Scope but not SentryOptions at the moment. Feel free to request this if you need it.
  • Hub is deprecated in favor of Scopes, alongside some Hub relevant APIs. More details can be found in our migration guide.
  • Send file name and path only if isSendDefaultPii is true (#3919)
  • (Android) Enable Performance V2 by default (#3824)
    • With this change cold app start spans will include spans for ContentProviders, Application and Activity load.
  • (Android) Replace thread id with kernel thread id in span data (#3706)
  • (Android) The JNI layer for sentry-native has now been moved from sentry-java to sentry-native (#3189)
    • This now includes prefab support for sentry-native, allowing you to link and access the sentry-native API within your native app code
    • Checkout the sentry-samples/sentry-samples-android example on how to configure CMake and consume sentry.h
  • The user ip-address is now only set to "{{auto}}" if sendDefaultPii is enabled (#4072)
    • This change gives you control over IP address collection directly on the client

Features

  • The SDK is now compatible with Spring Boot 3.4 (#3939)
  • Our sentry-opentelemetry-agent has been completely reworked and now plays nicely with the rest of the Java SDK
    • You may also want to give this new agent a try even if you haven't used OpenTelemetry (with Sentry) before. It offers support for many more libraries and frameworks, improving on our trace propagation, Scopes (used to be Hub) propagation as well as performance instrumentation (i.e. more spans).
    • If you are using a framework we did not support before and currently resort to manual instrumentation, please give the agent a try. See here for a list of supported libraries, frameworks and application servers.
    • Please see Java SDK docs for more details on how to set up the agent. Please make sure to select the correct SDK from the dropdown on the left side of the docs.
    • What's new about the Agent
      • When the OpenTelemetry Agent is used, Sentry API creates OpenTelemetry spans under the hood, handing back a wrapper object which bridges the gap between traditional Sentry API and OpenTelemetry. We might be replacing some of the Sentry performance API in the future.
        • This is achieved by configuring the SDK to use OtelSpanFactory instead of DefaultSpanFactory which is done automatically by the auto init of the Java Agent.
      • OpenTelemetry spans are now only turned into Sentry spans when they are finished so they can be sent to the Sentry server.
      • Now registers an OpenTelemetry Sampler which uses Sentry sampling configuration
      • Other Performance integrations automatically stop creating spans to avoid duplicate spans
      • The Sentry SDK now makes use of OpenTelemetry Context for storing Sentry Scopes (which is similar to what used to be called Hub) and thus relies on OpenTelemetry for Context propagation.
      • Classes used for the previous version of our OpenTelemetry support have been deprecated but can still be used manually. We're not planning to keep the old agent around in favor of less complexity in the SDK.
  • Add sentry-opentelemetry-agentless-spring module (#4000)
    • This module can be added as a dependency when using Sentry with OpenTelemetry and Spring Boot but don't want to use our Agent. It takes care of configuring OpenTelemetry for use with Sentry.
    • You may want to set OTEL_LOGS_EXPORTER=none;OTEL_METRICS_EXPORTER=none;OTEL_TRACES_EXPORTER=none env vars to not have the log flooded with error messages regarding OpenTelemetry features we don't use.
  • Add sentry-opentelemetry-agentless module (#3961)
    • This module can be added as a dependency when using Sentry with OpenTelemetry but don't want to use our Agent. It takes care of configuring OpenTelemetry for use with Sentry.
    • To enable the auto configuration of it, please set -Dotel.java.global-autoconfigure.enabled=true on the java command, when starting your application.
    • You may also want to set OTEL_LOGS_EXPORTER=none;OTEL_METRICS_EXPORTER=none;OTEL_TRACES_EXPORTER=none env vars to not have the log flooded with error messages regarding OpenTelemetry features we don't use.
  • OpenTelemetryUtil.applyOpenTelemetryOptions now takes an enum instead of a boolean for its mode
  • Add openTelemetryMode option (#3994)
    • It defaults to AUTO meaning the SDK will figure out how to best configure itself for use with OpenTelemetry
    • Use of OpenTelemetry can also be disabled completely by setting it to OFF (#3995)
      • In this case even if OpenTelemetry is present, the Sentry SDK will not use it
    • Use AGENT when using sentry-opentelemetry-agent
    • Use AGENTLESS when using sentry-opentelemetry-agentless
    • Use AGENTLESS_SPRING when using sentry-opentelemetry-agentless-spring
  • Add ignoredTransactions option to filter out transactions by name (#3871)
    • can be used via ENV vars, e.g. SENTRY_IGNORED_TRANSACTIONS=POST /person/,GET /pers.*
    • can also be set in options directly, e.g. options.setIgnoredTransactions(...)
    • can also be set in sentry.properties, e.g. ignored-transactions=POST /person/,GET /pers.*
    • can also be set in Spring config application.properties, e.g. sentry.ignored-transactions=POST /person/,GET /pers.*
  • Add scopeBindingMode to SpanOptions (#4004)
    • This setting only affects the SDK when used with OpenTelemetry.
    • Defaults to AUTO meaning the SDK will decide whether the span should be bound to the current scope. It will not bind transactions to scope using AUTO, it will only bind spans where the parent span is on the current scope.
    • ON sets the new span on the current scope.
    • OFF does not set the new span on the scope.
  • Add ignoredSpanOrigins option for ignoring spans coming from certain integrations
    • We pre-configure this to ignore Performance instrumentation for Spring and other integrations when using our OpenTelemetry Agent to avoid duplicate spans
  • 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
  • Add data fetching environment hint to breadcrumb for GraphQL (#3413) (#3431)
  • Report exceptions returned by Throwable.getSuppressed() to Sentry as exception groups ([#3396] https://github.com/getsentry/sentry-java/pull/3396)
    • Any suppressed exceptions are added to the issue details page in Sentry, the same way any cause is.
    • We are planning to improve how we visualize suppressed exceptions. See https://github.com/getsentry/sentry-java/issues/4059
  • Enable ThreadLocalAccessor for Spring Boot 3 WebFlux by default (#4023)
  • Allow passing environment to CheckinUtils.withCheckIn (3889)
  • Add globalHubMode to options (#3805)
    • globalHubMode used to only be a param on Sentry.init. To make it easier to be used in e.g. Desktop environments, we now additionally added it as an option on SentryOptions that can also be set via sentry.properties.
    • If both the param on Sentry.init and the option are set, the option will win. By default the option is set to null meaning whatever is passed to Sentry.init takes effect.
  • Lazy uuid generation for SentryId and SpanId (#3770)
  • Faster generation of Sentry and Span IDs (#3818)
    • Uses faster implementation to convert UUID to SentryID String
    • Uses faster Random implementation to generate UUIDs
  • Android 15: Add support for 16KB page sizes (#3851)
    • See https://developer.android.com/guide/practices/page-sizes for more details
  • 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)
  • Emit transaction.data inside contexts.trace.data (#3735)
    • Also does not emit transaction.data in extras anymore
  • Add a sample for showcasing Sentry with OpenTelemetry for Spring Boot 3 with our Java agent (sentry-samples-spring-boot-jakarta-opentelemetry) (#3856)
  • Add a sample for showcasing Sentry with OpenTelemetry for Spring Boot 3 without our Java agent (sentry-samples-spring-boot-jakarta-opentelemetry-noagent) (#3856)
  • Add a sample for showcasing Sentry with OpenTelemetry (sentry-samples-console-opentelemetry-noagent) (#3856)

Fixes

  • Fix incoming defer sampling decision sentry-trace header (#3942)
    • A sentry-trace header that only contains trace ID and span ID but no sampled flag (-1, -0 suffix) means the receiving system can make its own sampling decision
    • When generating sentry-trace header from PropagationContext we now copy the sampled flag.
    • In TransactionContext.fromPropagationContext when there is no parent sampling decision, keep the decision null so a new sampling decision is made instead of defaulting to false
  • 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
  • All status codes below 400 are now mapped to SpanStatus.OK (#3869)
  • Improve ignored check performance (#3992)
    • Checking if a span origin, a transaction or a checkIn should be ignored is now faster
  • Cache requests for Spring using Springs ContentCachingRequestWrapper instead of our own Wrapper to also cache parameters (#3641)
    • Previously only the body was cached which could lead to problems in the FilterChain as Request parameters were not available
  • Close backpressure monitor on SDK shutdown (#3998)
    • Due to the backpressure monitor rescheduling a task to run every 10s, it very likely caused shutdown to wait the full shutdownTimeoutMillis (defaulting to 2s) instead of being able to terminate immediately
  • Let OpenTelemetry auto instrumentation handle extracting and injecting tracing information if present (#3953)
    • Our integrations no longer call .continueTrace and also do not inject tracing headers if the integration has been added to ignoredSpanOrigins
  • Fix testTag not working for Jetpack Compose user interaction tracking (#3878)
  • Mark DiskFlushNotification hint flushed when rate limited (#3892)
    • Our UncaughtExceptionHandlerIntegration waited for the full flush timeout duration (default 15s) when rate limited.
  • Do not replace op with auto generated content for OpenTelemetry spans with span kind INTERNAL (#3906)
  • 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)
  • Parse and use send-default-pii and max-request-body-size from sentry.properties (#3534)
  • TracesSampler is now only created once in SentryOptions instead of creating a new one for every Hub (which is now Scopes). This means we're now creating fewer SecureRandom instances.

Internal

  • Make SentryClient constructor public (#4045)
  • Warm starts cleanup (#3954)

Changes in pre-releases

These changes have been made during development of 8.0.0. You may skip this section. We just put it here for sake of completeness.

  • Extract OpenTelemetry URL_PATH span attribute into description (#3933)
  • Replace OpenTelemetry ContextStorage wrapper with ContextStorageProvider (#3938)
    • The wrapper had to be put in place before any call to Context whereas ContextStorageProvider is automatically invoked at the correct time.
  • Send otel.kind to Sentry (#3907)
  • Spring Boot now automatically detects if OpenTelemetry is available and makes use of it (#3846)
    • This is only enabled if there is no OpenTelemetry agent available
    • We prefer to use the OpenTelemetry agent as it offers more auto instrumentation
    • In some cases the OpenTelemetry agent cannot be used, please see https://opentelemetry.io/docs/zero-code/java/spring-boot-starter/ for more details on when to prefer the Agent and when the Spring Boot starter makes more sense.
    • In this mode the SDK makes use of the OpenTelemetry bean that is created by opentelemetry-spring-boot-starter instead of GlobalOpenTelemetry
  • Spring Boot now automatically detects our OpenTelemetry agent if its auto init is disabled (#3848)
    • This means Spring Boot config mechanisms can now be combined with our OpenTelemetry agent
    • The sentry-opentelemetry-extra module has been removed again, most classes have been moved to sentry-opentelemetry-bootstrap which is loaded into the bootstrap classloader (i.e. null) when our Java agent is used. The rest has been moved into sentry-opentelemetry-agentcustomization and is loaded into the agent classloader when our Java agent is used.
    • The sentry-opentelemetry-bootstrap and sentry-opentelemetry-agentcustomization modules can be used without the agent as well, in which case all classes are loaded into the application classloader. Check out our sentry-samples-spring-boot-jakarta-opentelemetry-noagent sample.
    • In this mode the SDK makes use of GlobalOpenTelemetry
  • Automatically set span factory based on presence of OpenTelemetry (#3858)

    • SentrySpanFactoryHolder has been removed as it is no longer required.
  • Replace deprecated SimpleInstrumentation with SimplePerformantInstrumentation for graphql 22 (#3974)

  • We now hold a strong reference to the underlying OpenTelemetry span when it is created through Sentry API (#3997)

    • This keeps it from being garbage collected too early
  • Defer sampling decision by setting sampled to null in PropagationContext when using OpenTelemetry in case of an incoming defer sampling sentry-trace header. (#3945)

  • Build PropagationContext from SamplingDecision made by SentrySampler instead of parsing headers and potentially ignoring a sampling decision in case a sentry-trace header comes in with deferred sampling decision. (#3947)

  • The Sentry OpenTelemetry Java agent now makes sure Sentry Scopes storage is initialized even if the agents auto init is disabled (#3848)

    • This is required for all integrations to work together with our OpenTelemetry Java agent if its auto init has been disabled and the SDKs init should be used instead.
  • Fix startChild for span that is not in current OpenTelemetry Context (#3862)

    • Starting a child span from a transaction that wasn't in the current Context lead to multiple transactions being created (one for the transaction and another per span created).
  • Add auto.graphql.graphql22 to ignored span origins when using OpenTelemetry (#3828)

  • 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)

  • 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)

  • Support spans that are split into multiple batches (#3539)

    • When spans belonging to a single transaction were split into multiple batches for SpanExporter, we did not add all spans because the isSpanTooOld check wasn't inverted.
  • Partially fix bootstrap class loading (#3543)

    • There was a problem with two separate Sentry Scopes being active inside each OpenTelemetry Context due to using context keys from more than one class loader.
  • The Spring Boot 3 WebFlux sample now uses our GraphQL v22 integration (#3828)

  • Do not ignore certain span origins for OpenTelemetry without agent (#3856)

  • span.startChild now uses .makeCurrent() by default (#3544)

    • This caused an issue where the span tree wasn't correct because some spans were not added to their direct parent
  • Do not set the exception group marker when there is a suppressed exception (#4056)

    • Due to how grouping works in Sentry currently sometimes the suppressed exception is treated as the main exception. This change ensures we keep using the main exception and not change how grouping works.
    • As a consequence the list of exceptions in the group on top of an issue is no longer shown in Sentry UI.
    • We are planning to improve this in the future but opted for this fix first.

Dependencies

Migration Guide / Deprecations

Please take a look at our migration guide in docs.

  • Hub has been deprecated, we're replacing the following:
    • IHub has been replaced by IScopes, however you should be able to simply pass IHub instances to code expecting IScopes, allowing for an easier migration.
    • HubAdapter.getInstance() has been replaced by ScopesAdapter.getInstance()
    • The .clone() method on IHub/IScopes has been deprecated, please use .pushScope() or .pushIsolationScope() instead
    • Some internal methods like .getCurrentHub() and .setCurrentHub() have also been replaced.
  • Sentry.popScope has been replaced by calling .close() on the token returned by Sentry.pushScope() and Sentry.pushIsolationScope(). The token can also be used in a try block like this:

try (final @NotNull ISentryLifecycleToken ignored = Sentry.pushScope()) { // this block has its separate current scope }

as well as:

try (final @NotNull ISentryLifecycleToken ignored = Sentry.pushIsolationScope()) { // this block has its separate isolation scope } - Classes used by our previous OpenTelemetry integration have been deprecated (SentrySpanProcessor, SentryPropagator, OpenTelemetryLinkErrorEventProcessor). Please take a look at docs on how to setup OpenTelemetry in v8.

You may also use LifecycleHelper.close(token), e.g. in case you need to pass the token around for closing later.

Changes from rc.4

If you have been using 8.0.0-rc.4 of the Java SDK, here's the new changes that have been included in the 8.0.0 release:

  • Make SentryClient constructor public (#4045)
  • The user ip-address is now only set to "{{auto}}" if sendDefaultPii is enabled (#4072)
    • This change gives you control over IP address collection directly on the client
  • Do not set the exception group marker when there is a suppressed exception (#4056)
    • Due to how grouping works in Sentry currently sometimes the suppressed exception is treated as the main exception. This change ensures we keep using the main exception and not change how grouping works.
    • As a consequence the list of exceptions in the group on top of an issue is no longer shown in Sentry UI.
    • We are planning to improve this in the future but opted for this fix first.
  • Fix swallow NDK loadLibrary errors (#4082)

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.21.0-beta.1

Fixes

  • Do not instrument File I/O operations if tracing is disabled (#4051)
  • Do not instrument User Interaction multiple times (#4051)
  • Speed up view traversal to find touched target in UserInteractionIntegration (#4051)
  • Reduce IPC/Binder calls performed by the SDK (#4058)

Behavioural Changes

  • Reduce the number of broadcasts the SDK is subscribed for (#4052)
    • Drop TempSensorBreadcrumbsIntegration
    • Drop PhoneStateBreadcrumbsIntegration
    • Reduce number of broadcasts in SystemEventsBreadcrumbsIntegration

Current list of the broadcast events can be found here. If you'd like to subscribe for more events, consider overriding the SystemEventsBreadcrumbsIntegration as follows:

kotlin SentryAndroid.init(context) { options -> options.integrations.removeAll { it is SystemEventsBreadcrumbsIntegration } options.integrations.add(SystemEventsBreadcrumbsIntegration(context, SystemEventsBreadcrumbsIntegration.getDefaultActions() + listOf(/* your custom actions */))) }

If you would like to keep some of the default broadcast events as breadcrumbs, consider opening a GitHub issue.

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.20.1

Behavioural Changes

  • The user ip-address is now only set to "{{auto}}" if sendDefaultPii is enabled (#4071)
    • This change gives you control over IP address collection directly on the client

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 8.0.0-rc.4

Features

  • Enable ThreadLocalAccessor for Spring Boot 3 WebFlux by default (#4023)

Internal

  • Warm starts cleanup (#3954)

Dependencies

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.20.0

Features

  • Session Replay GA (#4017)

To enable Replay use the sessionReplay.sessionSampleRate or sessionReplay.onErrorSampleRate options.

```kotlin import io.sentry.SentryReplayOptions import io.sentry.android.core.SentryAndroid

SentryAndroid.init(context) { options ->

options.sessionReplay.sessionSampleRate = 1.0
options.sessionReplay.onErrorSampleRate = 1.0

// To change default redaction behavior (defaults to true)
options.sessionReplay.redactAllImages = true
options.sessionReplay.redactAllText = true

// To change quality of the recording (defaults to MEDIUM)
options.sessionReplay.quality = SentryReplayOptions.SentryReplayQuality.MEDIUM // (LOW|MEDIUM|HIGH)

} ```

To learn more about Session Replay, visit the documentation page: https://docs.sentry.io/platforms/android/session-replay/

Fixes

  • Fix warm start detection (#3937)
  • Session Replay: Reduce memory allocations, disk space consumption, and payload size (#4016)
  • Session Replay: Do not try to encode corrupted frames multiple times (#4016)

Internal

  • Session Replay: Allow overriding SdkVersion for replay events (#4014)
  • Session Replay: Send replay options as tags (#4015)

Breaking changes

  • Session Replay options were moved from under experimental to the main options object (#4017)

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.19.1

Fixes

  • Change TTFD timeout to 25 seconds (#3984)
  • Session Replay: Fix memory leak when masking Compose screens (#3985)
  • Session Replay: Fix potential ANRs in GestureRecorder (#4001)

Internal

  • Session Replay: Flutter improvements (#4007)

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 8.0.0-rc.3

Features

  • Add sentry-opentelemetry-agentless-spring module (#4000)
    • This module can be added as a dependency when using Sentry with OpenTelemetry and Spring Boot but don't want to use our Agent. It takes care of configuring OpenTelemetry for use with Sentry.
    • You may want to set OTEL_LOGS_EXPORTER=none;OTEL_METRICS_EXPORTER=none;OTEL_TRACES_EXPORTER=none env vars to not have the log flooded with error messages regarding OpenTelemetry features we don't use.
  • Add sentry-opentelemetry-agentless module (#3961)
    • This module can be added as a dependency when using Sentry with OpenTelemetry but don't want to use our Agent. It takes care of configuring OpenTelemetry for use with Sentry.
    • To enable the auto configuration of it, please set -Dotel.java.global-autoconfigure.enabled=true on the java command, when starting your application.
    • You may also want to set OTEL_LOGS_EXPORTER=none;OTEL_METRICS_EXPORTER=none;OTEL_TRACES_EXPORTER=none env vars to not have the log flooded with error messages regarding OpenTelemetry features we don't use.
  • OpenTelemetryUtil.applyOpenTelemetryOptions now takes an enum instead of a boolean for its mode
  • Add openTelemetryMode option (#3994)
    • It defaults to AUTO meaning the SDK will figure out how to best configure itself for use with OpenTelemetry
    • Use of OpenTelemetry can also be disabled completely by setting it to OFF (#3995)
      • In this case even if OpenTelemetry is present, the Sentry SDK will not use it
    • Use AGENT when using sentry-opentelemetry-agent
    • Use AGENTLESS when using sentry-opentelemetry-agentless
    • Use AGENTLESS_SPRING when using sentry-opentelemetry-agentless-spring
  • Add scopeBindingMode to SpanOptions (#4004)
    • This setting only affects the SDK when used with OpenTelemetry.
    • Defaults to AUTO meaning the SDK will decide whether the span should be bound to the current scope. It will not bind transactions to scope using AUTO, it will only bind spans where the parent span is on the current scope.
    • ON sets the new span on the current scope.
    • OFF does not set the new span on the scope.

Fixes

  • Replace deprecated SimpleInstrumentation with SimplePerformantInstrumentation for graphql 22 (#3974)
  • Cache requests for Spring using Springs ContentCachingRequestWrapper instead of our own Wrapper to also cache parameters (#3641)
    • Previously only the body was cached which could lead to problems in the FilterChain as Request parameters were not available
  • We now hold a strong reference to the underlying OpenTelemetry span when it is created through Sentry API (#3997)
    • This keeps it from being garbage collected too early
  • Close backpressure monitor on SDK shutdown (#3998)
    • Due to the backpressure monitor rescheduling a task to run every 10s, it very likely caused shutdown to wait the full shutdownTimeoutMillis (defaulting to 2s) instead of being able to terminate immediately
  • Improve ignored check performance (#3992)
    • Checking if a span origin, a transaction or a checkIn should be ignored is now faster

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.19.0

Fixes

  • Session Replay: fix various crashes and issues (#3970)
    • Fix IndexOutOfBoundsException when tracking window changes
    • Fix IllegalStateException when adding/removing draw listener for a dead view
    • Fix ConcurrentModificationException when registering window listeners and stopping WindowRecorder/GestureRecorder
  • Add support for setting sentry-native handler_strategy (#3671)

Dependencies

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 8.0.0-rc.2

Fixes

  • Fix incoming defer sampling decision sentry-trace header (#3942)
    • A sentry-trace header that only contains trace ID and span ID but no sampled flag (-1, -0 suffix) means the receiving system can make its own sampling decision
    • When generating sentry-trace header from PropagationContext we now copy the sampled flag.
    • In TransactionContext.fromPropagationContext when there is no parent sampling decision, keep the decision null so a new sampling decision is made instead of defaulting to false
  • Defer sampling decision by setting sampled to null in PropagationContext when using OpenTelemetry in case of an incoming defer sampling sentry-trace header. (#3945)
  • Build PropagationContext from SamplingDecision made by SentrySampler instead of parsing headers and potentially ignoring a sampling decision in case a sentry-trace header comes in with deferred sampling decision. (#3947)
  • Let OpenTelemetry handle extracting and injecting tracing information (#3953)
    • Our integrations no longer call .continueTrace and also do not inject tracing headers if the integration has been added to ignoredSpanOrigins
  • Changes up to 7.18.1 have been merged and are now included as well

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 8.0.0-rc.1

Features

  • Extract OpenTelemetry URL_PATH span attribute into description (#3933)
  • Replace OpenTelemetry ContextStorage wrapper with ContextStorageProvider (#3938)
    • The wrapper had to be put in place before any call to Context whereas ContextStorageProvider is automatically invoked at the correct time.

Dependencies

  • Bump OpenTelemetry to 1.44.1, OpenTelemetry Java Agent to 2.10.0 and Semantic Conventions to 1.28.0 (#3935)

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.18.1

Fixes

  • Fix testTag not working for Jetpack Compose user interaction tracking (#3878)

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 8.0.0-beta.3

Features

  • Send otel.kind to Sentry (#3907)
  • Allow passing environment to CheckinUtils.withCheckIn (3889)
  • Changes up to 7.18.0 have been merged and are now included as well

Fixes

  • Mark DiskFlushNotification hint flushed when rate limited (#3892)
    • Our UncaughtExceptionHandlerIntegration waited for the full flush timeout duration (default 15s) when rate limited.
  • Do not replace op with auto generated content for OpenTelemetry spans with span kind INTERNAL (#3906)

Behavioural Changes

  • Send file name and path only if isSendDefaultPii is true (#3919)

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.18.0

Features

  • Android 15: Add support for 16KB page sizes (#3620)
    • See https://developer.android.com/guide/practices/page-sizes for more details
  • Session Replay: Add beforeSendReplay callback (#3855)
  • Session Replay: Add support for masking/unmasking view containers (#3881)

Fixes

  • Avoid collecting normal frames (#3782)
  • Ensure android initialization process continues even if options configuration block throws an exception (#3887)
  • Do not report parsing ANR error when there are no threads (#3888)
    • This should significantly reduce the number of events with message "Sentry Android SDK failed to parse system thread dump..." reported
  • Session Replay: Disable replay in session mode when rate limit is active (#3854)

Dependencies

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 8.0.0-beta.2

Breaking Changes

  • Use String instead of UUID for SessionId (#3834)
    • The Session constructor now takes a String instead of a UUID for the sessionId parameter.
    • Session.getSessionId() now returns a String instead of a UUID.
  • The Android minSdk level for all Android modules is now 21 (#3852)
  • The minSdk level for sentry-android-ndk changed from 19 to 21 (#3851)
  • All status codes below 400 are now mapped to SpanStatus.OK (#3869)

Features

  • Spring Boot now automatically detects if OpenTelemetry is available and makes use of it (#3846)
    • This is only enabled if there is no OpenTelemetry agent available
    • We prefer to use the OpenTelemetry agent as it offers more auto instrumentation
    • In some cases the OpenTelemetry agent cannot be used, please see https://opentelemetry.io/docs/zero-code/java/spring-boot-starter/ for more details on when to prefer the Agent and when the Spring Boot starter makes more sense.
    • In this mode the SDK makes use of the OpenTelemetry bean that is created by opentelemetry-spring-boot-starter instead of GlobalOpenTelemetry
  • Spring Boot now automatically detects our OpenTelemetry agent if its auto init is disabled (#3848)
    • This means Spring Boot config mechanisms can now be combined with our OpenTelemetry agent
    • The sentry-opentelemetry-extra module has been removed again, most classes have been moved to sentry-opentelemetry-bootstrap which is loaded into the bootstrap classloader (i.e. null) when our Java agent is used. The rest has been moved into sentry-opentelemetry-agentcustomization and is loaded into the agent classloader when our Java agent is used.
    • The sentry-opentelemetry-bootstrap and sentry-opentelemetry-agentcustomization modules can be used without the agent as well, in which case all classes are loaded into the application classloader. Check out our sentry-samples-spring-boot-jakarta-opentelemetry-noagent sample.
    • In this mode the SDK makes use of GlobalOpenTelemetry
  • Automatically set span factory based on presence of OpenTelemetry (#3858)
    • SentrySpanFactoryHolder has been removed as it is no longer required.
  • Add ignoredTransactions option to filter out transactions by name (#3871)
    • can be used via ENV vars, e.g. SENTRY_IGNORED_TRANSACTIONS=POST /person/,GET /pers.*
    • can also be set in options directly, e.g. options.setIgnoredTransactions(...)
    • can also be set in sentry.properties, e.g. ignored-transactions=POST /person/,GET /pers.*
    • can also be set in Spring config application.properties, e.g. sentry.ignored-transactions=POST /person/,GET /pers.*
  • Add a sample for showcasing Sentry with OpenTelemetry for Spring Boot 3 with our Java agent (sentry-samples-spring-boot-jakarta-opentelemetry) (#3856)
  • Add a sample for showcasing Sentry with OpenTelemetry for Spring Boot 3 without our Java agent (sentry-samples-spring-boot-jakarta-opentelemetry-noagent) (#3856)
  • Add a sample for showcasing Sentry with OpenTelemetry (sentry-samples-console-opentelemetry-noagent) (#3856)
  • Add globalHubMode to options (#3805)
    • globalHubMode used to only be a param on Sentry.init. To make it easier to be used in e.g. Desktop environments, we now additionally added it as an option on SentryOptions that can also be set via sentry.properties.
    • If both the param on Sentry.init and the option are set, the option will win. By default the option is set to null meaning whatever is passed to Sentry.init takes effect.
  • Lazy uuid generation for SentryId and SpanId (#3770)
  • Faster generation of Sentry and Span IDs (#3818)
    • Uses faster implementation to convert UUID to SentryID String
    • Uses faster Random implementation to generate UUIDs
  • Android 15: Add support for 16KB page sizes (#3851)
    • See https://developer.android.com/guide/practices/page-sizes for more details

Fixes

  • The Sentry OpenTelemetry Java agent now makes sure Sentry Scopes storage is initialized even if the agents auto init is disabled (#3848)
    • This is required for all integrations to work together with our OpenTelemetry Java agent if its auto init has been disabled and the SDKs init should be used instead.
  • Do not ignore certain span origins for OpenTelemetry without agent (#3856)
  • Fix startChild for span that is not in current OpenTelemetry Context (#3862)
    • Starting a child span from a transaction that wasn't in the current Context lead to multiple transactions being created (one for the transaction and another per span created).
  • Add auto.graphql.graphql22 to ignored span origins when using OpenTelemetry (#3828)
  • The Spring Boot 3 WebFlux sample now uses our GraphQL v22 integration (#3828)
  • All status codes below 400 are now mapped to SpanStatus.OK (#3869)

Dependencies

Behavioural Changes

  • (Android) Enable Performance V2 by default (#3824)
    • With this change cold app start spans will include spans for ContentProviders, Application and Activity load.

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.17.0

Features

  • Add meta option to set the maximum amount of breadcrumbs to be logged. (#3836)
  • Use a separate Random instance per thread to improve SDK performance (#3835)

Fixes

  • Using MaxBreadcrumb with value 0 no longer crashes. (#3836)
  • Accept manifest integer values when requiring floating values (#3823)
  • Fix standalone tomcat jndi issue (#3873)
    • Using Sentry Spring Boot on a standalone tomcat caused the following error:
    • Failed to bind properties under 'sentry.parsed-dsn' to io.sentry.Dsn

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.17.0-alpha.1

Features

  • Android 15: Add support for 16KB page sizes (#3620)
    • See https://developer.android.com/guide/practices/page-sizes for more details

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.16.0

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)
  • Load lazy fields on init in the background (#3803)
  • Replace setOf with HashSet.add (#3801)

Breaking changes

  • The method addIntegrationToSdkVersion(Ljava/lang/Class;)V has been removed from the core (io.sentry:sentry) package. Please make sure all of the packages (e.g. io.sentry:sentry-android-core, io.sentry:sentry-android-fragment, io.sentry:sentry-okhttp and others) are all aligned and using the same version to prevent the NoSuchMethodError exception.

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.16.0-alpha.1

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)

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 8.0.0-beta.1

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)

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.15.0

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)

- Kotlin
Published by getsentry-bot over 1 year ago

https://github.com/getsentry/sentry-java - 7.15.0-alpha.1

Features

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

Dependencies

  • Bump sentry-native SDK to d11359b of feat/inprochandlerstrategy
    • See the following issue for more details: https://github.com/getsentry/sentry-native/issues/1026

- Kotlin
Published by getsentry-bot almost 2 years ago

https://github.com/getsentry/sentry-java - 7.14.0 (Stable)

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)

- Kotlin
Published by getsentry-bot almost 2 years ago

https://github.com/getsentry/sentry-java - 7.13.0

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)

- Kotlin
Published by getsentry-bot almost 2 years ago

https://github.com/getsentry/sentry-java - 7.12.1

Fixes

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

- Kotlin
Published by getsentry-bot almost 2 years ago

https://github.com/getsentry/sentry-java - 7.12.0

Features

  • Session Replay Public Beta (#3339)

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

```kotlin import io.sentry.SentryReplayOptions import io.sentry.android.core.SentryAndroid

SentryAndroid.init(context) { options ->

// Currently under experimental options:
options.experimental.sessionReplay.sessionSampleRate = 1.0
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.

- Kotlin
Published by getsentry-bot almost 2 years ago

https://github.com/getsentry/sentry-java - 7.12.0-alpha.4

  • 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

- Kotlin
Published by getsentry-bot almost 2 years ago

https://github.com/getsentry/sentry-java - 8.0.0-alpha.4

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)

- Kotlin
Published by getsentry-bot almost 2 years ago

https://github.com/getsentry/sentry-java - 7.12.0-alpha.3

  • Session Replay for Android (#3339)

We released our fourth 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

- Kotlin
Published by getsentry-bot almost 2 years ago

https://github.com/getsentry/sentry-java - 8.0.0-alpha.3

Breaking Changes

  • sentry-android-okhttp has been removed in favor of sentry-okhttp, removing android dependency from the module (#3510)

Fixes

  • Support spans that are split into multiple batches (#3539)
    • When spans belonging to a single transaction were split into multiple batches for SpanExporter, we did not add all spans because the isSpanTooOld check wasn't inverted.
  • Parse and use send-default-pii and max-request-body-size from sentry.properties (#3534)
  • span.startChild now uses .makeCurrent() by default (#3544)
    • This caused an issue where the span tree wasn't correct because some spans were not added to their direct parent
  • Partially fix bootstrap class loading (#3543)
    • There was a problem with two separate Sentry Scopes being active inside each OpenTelemetry Context due to using context keys from more than one class loader.

- Kotlin
Published by getsentry-bot almost 2 years ago

https://github.com/getsentry/sentry-java - 7.11.0

Features

  • Report dropped spans (#3528)

Fixes

  • Fix duplicate session start for React Native (#3504)
  • Move onFinishCallback before span or transaction is finished (#3459)
  • Add timestamp when a profile starts (#3442)
  • Move fragment auto span finish to onFragmentStarted (#3424)
  • Remove profiling timeout logic and disable profiling on API 21 (#3478)
  • Properly reset metric flush flag on metric emission (#3493)
  • Use SecureRandom in favor of Random for Metrics (#3495)
  • Fix UncaughtExceptionHandlerIntegration Memory Leak (#3398)
  • Deprecated User.segment. Use a custom tag or context instead. (#3511)
  • Fix duplicated http spans (#3526)
  • When capturing unhandled hybrid exception session should be ended and new start if need (#3480)

Dependencies

- Kotlin
Published by getsentry-bot almost 2 years ago

https://github.com/getsentry/sentry-java - 8.0.0-alpha.2

Behavioural Changes

  • (Android) The JNI layer for sentry-native has now been moved from sentry-java to sentry-native (#3189)
    • This now includes prefab support for sentry-native, allowing you to link and access the sentry-native API within your native app code
    • Checkout the sentry-samples/sentry-samples-android example on how to configure CMake and consume sentry.h

Features

  • Our sentry-opentelemetry-agent has been completely reworked and now plays nicely with the rest of the Java SDK
    • You may also want to give this new agent a try even if you haven't used OpenTelemetry (with Sentry) before. It offers support for many more libraries and frameworks, improving on our trace propagation, Scopes (used to be Hub) propagation as well as performance instrumentation (i.e. more spans).
    • If you are using a framework we did not support before and currently resort to manual instrumentation, please give the agent a try. See here for a list of supported libraries, frameworks and application servers.
    • NOTE: Not all features have been implemented yet for the OpenTelemetry agent. Features of note that are not working yet:
    • Metrics
    • Measurements
    • forceFinish on transaction
    • scheduleFinish on transaction
    • see #3436 for a more up-to-date list of features we have (not) implemented
    • Please see "Installing sentry-opentelemetry-agent" for more details on how to set up the agent.
    • What's new about the Agent
    • When the OpenTelemetry Agent is used, Sentry API creates OpenTelemetry spans under the hood, handing back a wrapper object which bridges the gap between traditional Sentry API and OpenTelemetry. We might be replacing some of the Sentry performance API in the future.
      • This is achieved by configuring the SDK to use OtelSpanFactory instead of DefaultSpanFactory which is done automatically by the auto init of the Java Agent.
    • OpenTelemetry spans are now only turned into Sentry spans when they are finished so they can be sent to the Sentry server.
    • Now registers an OpenTelemetry Sampler which uses Sentry sampling configuration
    • Other Performance integrations automatically stop creating spans to avoid duplicate spans
    • The Sentry SDK now makes use of OpenTelemetry Context for storing Sentry Scopes (which is similar to what used to be called Hub) and thus relies on OpenTelemetry for Context propagation.
    • Classes used for the previous version of our OpenTelemetry support have been deprecated but can still be used manually. We're not planning to keep the old agent around in favor of less complexity in the SDK.
  • Add ignoredSpanOrigins option for ignoring spans coming from certain integrations
    • We pre-configure this to ignore Performance instrumentation for Spring and other integrations when using our OpenTelemetry Agent to avoid duplicate spans
  • Add data fetching environment hint to breadcrumb for GraphQL (#3413) (#3431)

Fixes

  • TracesSampler is now only created once in SentryOptions instead of creating a new one for every Hub (which is now Scopes). This means we're now creating fewer SecureRandom instances.
  • Move onFinishCallback before span or transaction is finished (#3459)
  • Add timestamp when a profile starts (#3442)
  • Move fragment auto span finish to onFragmentStarted (#3424)
  • Remove profiling timeout logic and disable profiling on API 21 (#3478)
  • Properly reset metric flush flag on metric emission (#3493)

Migration Guide / Deprecations

  • Classes used for the previous version of the Sentry OpenTelemetry Java Agent have been deprecated (SentrySpanProcessor, SentryPropagator, OpenTelemetryLinkErrorEventProcessor)
  • Sentry OpenTelemetry Java Agent has been reworked and now allows you to manually create spans using Sentry API as well.
  • Please see "Installing sentry-opentelemetry-agent" for more details on how to set up the agent.

Installing sentry-opentelemetry-agent

Upgrading from a previous agent

If you've been using the previous version of sentry-opentelemetry-agent, simply replace the agent JAR with the latest release and start your application. That should be it.

New to the agent

If you've not been using OpenTelemetry before, you can add sentry-opentelemetry-agent to your setup by downloading the latest release and using it when starting up your application - SENTRY_PROPERTIES_FILE=sentry.properties java -javaagent:sentry-opentelemetry-agent-x.x.x.jar -jar your-application.jar - Please use sentry.properties or environment variables to configure the SDK as the agent is now in charge of initializing the SDK and options coming from things like logging integrations or our Spring Boot integration will not take effect. - You may find the docs page useful. While we haven't updated it yet to reflect the changes described here, the section about using the agent with auto init should still be valid.

If you want to skip auto initialization of the SDK performed by the agent, please follow the steps above and set the environment variable SENTRY_AUTO_INIT to false then add the following to your Sentry.init:

Sentry.init(options -> { options.setDsn("https://3d2ac63d6e1a4c6e9214443678f119a3@o87286.ingest.us.sentry.io/1801383"); OpenTelemetryUtil.applyOpenTelemetryOptions(options); ... });

If you're using our Spring (Boot) integration with auto init, use the following: @Bean Sentry.OptionsConfiguration<SentryOptions> optionsConfiguration() { return (options) -> { OpenTelemetryUtil.applyOpenTelemetryOptions(options); }; }

Dependencies

- Kotlin
Published by getsentry-bot almost 2 years ago

https://github.com/getsentry/sentry-java - 7.11.0-alpha.2

  • Session Replay for Android (#3339)

We released our third 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

Fixes

  • Move onFinishCallback before span or transaction is finished (#3459)
  • Add timestamp when a profile starts (#3442)
  • Move fragment auto span finish to onFragmentStarted (#3424)
  • Remove profiling timeout logic and disable profiling on API 21 (#3478)
  • Properly reset metric flush flag on metric emission (#3493)

- Kotlin
Published by getsentry-bot almost 2 years ago

https://github.com/getsentry/sentry-java - 7.10.0

Features

  • Publish Gradle module metadata (#3422)

Fixes

  • Fix faulty span.frame_delay calculation for early app start spans (#3427)
  • Fix crash when installing ShutdownHookIntegration and the VM is shutting down (#3456)

- Kotlin
Published by getsentry-bot almost 2 years ago

https://github.com/getsentry/sentry-java - 8.0.0-alpha.1

Version 8 of the Sentry Android/Java SDK brings a variety of features and fixes. The most notable changes are:

  • New Scope types have been introduced, see "Behavioural Changes" for more details.
  • Lifecycle tokens have been introduced to manage Scope lifecycle, see "Behavioural Changes" for more details.
  • Hub has been replaced by Scopes

Behavioural Changes

  • We're introducing some new Scope types in the SDK, allowing for better control over what data is attached where. Previously there was a stack of scopes that was pushed and popped. Instead we now fork scopes for a given lifecycle and then restore the previous scopes. Since Hub is gone, it is also never cloned anymore. Separation of data now happens through the different scope types while making it easier to manipulate exactly what you need without having to attach data at the right time to have it apply where wanted.
    • Global scope is attached to all events created by the SDK. It can also be modified before Sentry.init has been called. It can be manipulated using Sentry.configureScope(ScopeType.GLOBAL, (scope) -> { ... }).
    • Isolation scope can be used e.g. to attach data to all events that come up while handling an incoming request. It can also be used for other isolation purposes. It can be manipulated using Sentry.configureScope(ScopeType.ISOLATION, (scope) -> { ... }). The SDK automatically forks isolation scope in certain cases like incoming requests, CRON jobs, Spring @Async and more.
    • Current scope is forked often and data added to it is only added to events that are created while this scope is active. Data is also passed on to newly forked child scopes but not to parents.
  • Sentry.popScope has been deprecated, please call .close() on the token returned by Sentry.pushScope instead or use it in a way described in more detail in "Migration Guide".
  • We have chosen a default scope that is used for Sentry.configureScope() as well as API like Sentry.setTag()
    • For Android the type defaults to CURRENT scope
    • For Backend and other JVM applicatons it defaults to ISOLATION scope
  • Event processors on Scope can now be ordered by overriding the getOrder method on implementations of EventProcessor. NOTE: This order only applies to event processors on Scope but not SentryOptions at the moment. Feel free to request this if you need it.
  • Hub is deprecated in favor of Scopes, alongside some Hub relevant APIs. More details can be found in the "Migration Guide" section.

Breaking Changes

  • Contexts no longer extends ConcurrentHashMap, instead we offer a selected set of methods.

Migration Guide / Deprecations

  • Hub has been deprecated, we're replacing the following:
    • IHub has been replaced by IScopes, however you should be able to simply pass IHub instances to code expecting IScopes, allowing for an easier migration.
    • HubAdapter.getInstance() has been replaced by ScopesAdapter.getInstance()
    • The .clone() method on IHub/IScopes has been deprecated, please use .pushScope() or .pushIsolationScope() instead
    • Some internal methods like .getCurrentHub() and .setCurrentHub() have also been replaced.
  • Sentry.popScope has been replaced by calling .close() on the token returned by Sentry.pushScope() and Sentry.pushIsolationScope(). The token can also be used in a try block like this:

try (final @NotNull ISentryLifecycleToken ignored = Sentry.pushScope()) { // this block has its separate current scope }

as well as:

try (final @NotNull ISentryLifecycleToken ignored = Sentry.pushIsolationScope()) { // this block has its separate isolation scope }

You may also use LifecycleHelper.close(token), e.g. in case you need to pass the token around for closing later.

Features

  • Report exceptions returned by Throwable.getSuppressed() to Sentry as exception groups ([#3396] https://github.com/getsentry/sentry-java/pull/3396)

- Kotlin
Published by getsentry-bot about 2 years ago

https://github.com/getsentry/sentry-java - 7.9.0

Features

  • Add start_type to app context (#3379)
  • Add ttid/ttfd contribution flags (#3386)

Fixes

  • (Internal) Metrics code cleanup (#3403)
  • Fix Frame measurements in app start transactions (#3382)
  • Fix timing metric value different from span duration (#3368)
  • Do not always write startup crash marker (#3409)
    • This may have been causing the SDK init logic to block the main thread

- Kotlin
Published by getsentry-bot about 2 years ago

https://github.com/getsentry/sentry-java - 7.9.0-alpha.1

  • Session Replay for Android (#3339)

We released our second 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

Features

  • Add start_type to app context (#3379)

Fixes

  • Fix Frame measurements in app start transactions (#3382)
  • Fix timing metric value different from span duration (#3368)

- Kotlin
Published by getsentry-bot about 2 years ago

https://github.com/getsentry/sentry-java - 7.8.0-alpha.0

  • Session Replay for Android (https://github.com/getsentry/sentry-java/pull/3339)

We released our first 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

- Kotlin
Published by getsentry-bot about 2 years ago

https://github.com/getsentry/sentry-java - 7.8.0

Features

  • Add description to OkHttp spans (#3320)
  • Enable backpressure management by default (#3284)

Fixes

  • Add rate limit to Metrics (#3334)
  • Fix java.lang.ClassNotFoundException: org.springframework.web.servlet.HandlerMapping in Spring Boot Servlet mode without WebMVC (#3336)
  • Fix normalization of metrics keys, tags and values (#3332)

- Kotlin
Published by getsentry-bot about 2 years ago

https://github.com/getsentry/sentry-java - 7.7.0

Features

  • Add support for Spring Rest Client (#3199)
  • Extend Proxy options with proxy type (#3326)

Fixes

  • Fixed default deadline timeout to 30s instead of 300s (#3322)
  • Fixed Fix java.lang.ClassNotFoundException: org.springframework.web.servlet.HandlerExceptionResolver in Spring Boot Servlet mode without WebMVC (#3333)

- Kotlin
Published by getsentry-bot about 2 years ago

https://github.com/getsentry/sentry-java - 7.6.0

Features

  • Experimental: Add support for Sentry Developer Metrics (#3205, #3238, #3248, #3250)
    Use the Metrics API to track processing time, download sizes, user signups, and conversion rates and correlate them back to tracing data in order to get deeper insights and solve issues faster. Our API supports counters, distributions, sets, gauges and timers, and it's easy to get started: kotlin Sentry.metrics() .increment( "button_login_click", // key 1.0, // value null, // unit mapOf( // tags "provider" to "e-mail" ) ) To learn more about Sentry Developer Metrics, head over to our Java and Android docs page.

- Kotlin
Published by getsentry-bot about 2 years ago

https://github.com/getsentry/sentry-java - 7.5.0

Features

  • Add support for measurements at span level (#3219)
  • Add enableScopePersistence option to disable PersistingScopeObserver used for ANR reporting which may increase performance overhead. Defaults to true (#3218)
    • When disabled, the SDK will not enrich ANRv2 events with scope data (e.g. breadcrumbs, user, tags, etc.)
  • Configurable defaults for Cron - MonitorConfig (#3195)
  • We now display a warning on startup if an incompatible version of Spring Boot is detected (#3233)
    • This should help notice a mismatching Sentry dependency, especially when upgrading a Spring Boot application
  • Experimental: Add Metrics API (#3205)

Fixes

  • Ensure performance measurement collection is not taken too frequently (#3221)
  • Fix old profiles deletion on SDK init (#3216)
  • Fix hub restore point in wrappers: SentryWrapper, SentryTaskDecorator and SentryScheduleHook (#3225)
    • We now reset the hub to its previous value on the thread where the Runnable/Callable/Supplier is executed instead of setting it to the hub that was used on the thread where the Runnable/Callable/Supplier was created.
  • Fix add missing thread name/id to app start spans (#3226)

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 7.4.0

Features

  • Add new threshold parameters to monitor config (#3181)
  • Report process init time as a span for app start performance (#3159)
  • (perf-v2): Calculate frame delay on a span level (#3197)
  • Resolve spring properties in @SentryCheckIn annotation (#3194)
  • Experimental: Add Spotlight integration (#3166)
    • For more details about Spotlight head over to https://spotlightjs.com/
    • Set options.isEnableSpotlight = true to enable Spotlight

Fixes

  • Don't wait on main thread when SDK restarts (#3200)
  • Fix Jetpack Compose widgets are not being correctly identified for user interaction tracing (#3209)
  • Fix issue title on Android when a wrapping RuntimeException is thrown by the system (#3212)
    • This will change grouping of the issues that were previously titled RuntimeInit$MethodAndArgsCaller to have them split up properly by the original root cause exception

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 7.3.0

Features

  • Added App Start profiling
    • This depends on the new option io.sentry.profiling.enable-app-start, other than the already existing io.sentry.traces.profiling.sample-rate.
    • Sampler functions can check the new isForNextAppStart flag, to adjust startup profiling sampling programmatically. Relevant PRs:
    • Decouple Profiler from Transaction (#3101)
    • Add options and sampling logic (#3121)
    • Add ContentProvider and start profile (#3128)
  • Extend internal performance collector APIs (#3102)
  • Collect slow and frozen frames for spans using OnFrameMetricsAvailableListener (#3111)
  • Interpolate total frame count to match span duration (#3158)

Fixes

  • Avoid multiple breadcrumbs from OkHttpEventListener (#3175)
  • Apply OkHttp listener auto finish timestamp to all running spans (#3167)
  • Fix not eligible for auto proxying warnings (#3154)
  • Set default fingerprint for ANRv2 events to correctly group background and foreground ANRs (#3164)
    • This will improve grouping of ANRs that have similar stacktraces but differ in background vs foreground state. Only affects newly-ingested ANR events with mechanism:AppExitInfo
  • Fix UserFeedback disk cache name conflicts with linked events (#3116)

Breaking changes

  • Remove HostnameVerifier option as it's flagged by security tools of some app stores (#3150)
    • If you were using this option, you have 3 possible paths going forward:
    • Provide a custom ITransportFactory through SentryOptions.setTransportFactory(), where you can copy over most of the parts like HttpConnection and AsyncHttpTransport from the SDK with necessary modifications
    • Get a certificate for your server through e.g. Let's Encrypt
    • Fork the SDK and add the hostname verifier back

Dependencies

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 7.2.0

Features

  • Handle monitor/check_in in client reports and rate limiter (#3096)
  • Add support for graphql-java version 21 (#3090)

Fixes

  • Avoid concurrency in AndroidProfiler performance data collection (#3130)
  • Improve thresholds for network changes breadcrumbs (#3083)
  • SchedulerFactoryBeanCustomizer now runs first so user customization is not overridden (#3095)
    • If you are setting global job listeners please also add SentryJobListener
  • Ensure serialVersionUID of Exception classes are unique (#3115)
  • Get rid of "is not eligible for getting processed by all BeanPostProcessors" warnings in Spring Boot (#3108)
  • Fix missing release and other fields for ANRs reported with mechanism:AppExitInfo (#3074)

Dependencies

  • Bump opentelemetry-sdk to 1.33.0 and opentelemetry-javaagent to 1.32.0 (#3112)

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 7.1.0

Features

  • Support multiple debug-metadata.properties (#3024)
  • Automatically downsample transactions when the system is under load (#3072)
    • You can opt into this behaviour by setting enable-backpressure-handling=true.
    • We're happy to receive feedback, e.g. in this GitHub issue
    • When the system is under load we start reducing the tracesSampleRate automatically.
    • Once the system goes back to healthy, we reset the tracesSampleRate to its original value.
  • (Android) Experimental: Provide more detailed cold app start information (#3057)
    • Attaches spans for Application, ContentProvider, and Activities to app-start timings
    • Uses Process.startUptimeMillis to calculate app-start timings
    • To enable this feature set options.isEnablePerformanceV2 = true
  • Move slow+frozen frame calculation, as well as frame delay inside SentryFrameMetricsCollector (#3100)
  • Extract Activity Breadcrumbs generation into own Integration (#3064)

Fixes

  • Send breadcrumbs and client error in SentryOkHttpEventListener even without transactions (#3087)
  • Keep io.sentry.exception.SentryHttpClientException from obfuscation to display proper issue title on Sentry (#3093)
  • (Android) Fix wrong activity transaction duration in case SDK init is deferred (#3092)

Dependencies

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 7.0.0

Version 7 of the Sentry Android/Java SDK brings a variety of features and fixes. The most notable changes are: - Bumping minSdk level to 19 (Android 4.4) - The SDK will now listen to connectivity changes and try to re-upload cached events when internet connection is re-established additionally to uploading events on app restart - Sentry.getSpan now returns the root transaction, which should improve the span hierarchy and make it leaner - Multiple improvements to reduce probability of the SDK causing ANRs - New sentry-okhttp artifact is unbundled from Android and can be used in pure JVM-only apps

Sentry Self-hosted Compatibility

This SDK version is compatible with a self-hosted version of Sentry 22.12.0 or higher. If you are using an older version of self-hosted Sentry (aka onpremise), you will need to upgrade. If you're using sentry.io no action is required.

Sentry Integrations Version Compatibility (Android)

Make sure to align all Sentry dependencies to the same version when bumping the SDK to 7.+, otherwise it will crash at runtime due to binary incompatibility. (E.g. if you're using -timber, -okhttp or other packages)

For example, if you're using the Sentry Android Gradle plugin with the autoInstallation feature (enabled by default), make sure to use version 4.+ of the gradle plugin together with version 7.+ of the SDK. If you can't do that for some reason, you can specify sentry version via the plugin config block:

kotlin sentry { autoInstallation { sentryVersion.set("7.0.0") } }

Similarly, if you have a Sentry SDK (e.g. sentry-android-core) dependency on one of your Gradle modules and you're updating it to 7.+, make sure the Gradle plugin is at 4.+ or specify the SDK version as shown in the snippet above.

Breaking Changes

  • Bump min API to 19 (#2883)
  • If you're using sentry-kotlin-extensions, it requires kotlinx-coroutines-core version 1.6.1 or higher now (#2838)
  • Move enableNdk from SentryOptions to SentryAndroidOptions (#2793)
  • Apollo v2 BeforeSpanCallback now allows returning null (#2890)
  • SentryOkHttpUtils was removed from public API as it's been exposed by mistake (#3005)
  • Scope now implements the IScope interface, therefore some methods like ScopeCallback.run accept IScope now (#3066)
  • Cleanup startTransaction overloads (#2964)
    • We have reduced the number of overloads by allowing to pass in a TransactionOptions object instead of having separate parameters for certain options
    • TransactionOptions has defaults set and can be customized, for example:

kotlin // old val transaction = Sentry.startTransaction("name", "op", bindToScope = true) // new val transaction = Sentry.startTransaction("name", "op", TransactionOptions().apply { isBindToScope = true })

Behavioural Changes

  • Android only: Sentry.getSpan() returns the root span/transaction instead of the latest span (#2855)
  • Capture failed HTTP and GraphQL (Apollo) requests by default (#2794)
    • This can increase your event consumption and may affect your quota, because we will report failed network requests as Sentry events by default, if you're using the sentry-android-okhttp or sentry-apollo-3 integrations. You can customize what errors you want/don't want to have reported for OkHttp and Apollo3 respectively.
  • Measure AppStart time till First Draw instead of onResume (#2851)
  • Automatic user interaction tracking: every click now starts a new automatic transaction (#2891)
    • Previously performing a click on the same UI widget twice would keep the existing transaction running, the new behavior now better aligns with other SDKs
  • Add deadline timeout for automatic transactions (#2865)
    • This affects all automatically generated transactions on Android (UI, clicks), the default timeout is 30s, meaning the automatic transaction will be force-finished with status deadline_exceeded when reaching the deadline
  • Set ip_address to {{auto}} by default, even if sendDefaultPII is disabled (#2860)
    • Instead use the "Prevent Storing of IP Addresses" option in the "Security & Privacy" project settings on sentry.io
  • Raw logback message and parameters are now guarded by sendDefaultPii if an encoder has been configured (#2976)
  • The maxSpans setting (defaults to 1000) is enforced for nested child spans which means a single transaction can have maxSpans number of children (nested or not) at most (#3065)
  • The ScopeCallback in withScope is now always executed (#3066)

Deprecations

  • sentry-android-okhttp was deprecated in favour of the new sentry-okhttp module. Make sure to replace io.sentry.android.okhttp package name with io.sentry.okhttp before the next major, where the classes will be removed (#3005)

Other Changes

Features

  • Observe network state to upload any unsent envelopes (#2910)
    • Android: it works out-of-the-box as part of the default SendCachedEnvelopeIntegration
    • JVM: you'd have to install SendCachedEnvelopeFireAndForgetIntegration as mentioned in https://docs.sentry.io/platforms/java/configuration/#configuring-offline-caching and provide your own implementation of IConnectionStatusProvider via SentryOptions
  • Add sentry-okhttp module to support instrumenting OkHttp in non-Android projects (#3005)
  • Do not filter out Sentry SDK frames in case of uncaught exceptions (#3021)
  • Do not try to send and drop cached envelopes when rate-limiting is active (#2937)

Fixes

  • Use getMyMemoryState() instead of getRunningAppProcesses() to retrieve process importance (#3004)
    • This should prevent some app stores from flagging apps as violating their privacy
  • Reduce flush timeout to 4s on Android to avoid ANRs (#2858)
  • Reduce timeout of AsyncHttpTransport to avoid ANR (#2879)
  • Do not overwrite UI transaction status if set by the user (#2852)
  • Capture unfinished transaction on Scope with status aborted in case a crash happens (#2938)
    • This will fix the link between transactions and corresponding crashes, you'll be able to see them in a single trace
  • Fix Coroutine Context Propagation using CopyableThreadContextElement (#2838)
  • Fix don't overwrite the span status of unfinished spans (#2859)
  • Migrate from default interface methods to proper implementations in each interface implementor (#2847)
    • This prevents issues when using the SDK on older AGP versions (< 4.x.x)
  • Reduce main thread work on init (#3036)
  • Move Integrations registration to background on init (#3043)
  • Fix SentryOkHttpInterceptor.BeforeSpanCallback was not finishing span when it was dropped (#2958)

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 6.34.0

Features

  • Add current activity name to app context (#2999)
  • Add MonitorConfig param to CheckInUtils.withCheckIn (#3038)
    • This makes it easier to automatically create or update (upsert) monitors.
  • (Internal) Extract Android Profiler and Measurements for Hybrid SDKs (#3016)
  • (Internal) Remove SentryOptions dependency from AndroidProfiler (#3051)
  • (Internal) Add readBytesFromFile for use in Hybrid SDKs (#3052)
  • (Internal) Add getProguardUuid for use in Hybrid SDKs (#3054)

Fixes

  • Fix SIGSEV, SIGABRT and SIGBUS crashes happening after/around the August Google Play System update, see #2955 for more details (fix provided by Native SDK bump)
  • Ensure DSN uses http/https protocol (#3044)

Dependencies

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 7.0.0-rc.2

Fixes

  • Fix SIGSEV, SIGABRT and SIGBUS crashes happening after/around the August Google Play System update, see #2955 for more details (fix provided by Native SDK bump)

Dependencies

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 6.33.2-beta.1

Fixes

  • Fix SIGSEV, SIGABRT and SIGBUS crashes happening after/around the August Google Play System update, see #2955 for more details (fix provided by Native SDK bump)

Dependencies

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 7.0.0-rc.1

Features

  • Do not filter out Sentry SDK frames in case of uncaught exceptions (#3021)

Breaking changes: - Cleanup startTransaction overloads (#2964) - We have reduce the number of overloads by allowing to pass in TransactionOptions instead of having separate parameters for certain options. - TransactionOptions has defaults set and can be customized - Raw logback message and parameters are now guarded by sendDefaultPii if an encoder has been configured (#2976)

Fixes

  • Use getMyMemoryState() instead of getRunningAppProcesses() to retrieve process importance (#3004)
    • This should prevent some app stores from flagging apps as violating their privacy

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 6.33.1

Fixes

  • Do not register sentrySpringFilter in ServletContext for Spring Boot (#3027)

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 6.33.0

Features

  • Add thread information to spans (#2998)
  • Use PixelCopy API for capturing screenshots on API level 24+ (#3008)

Fixes

  • Fix crash when HTTP connection error message contains formatting symbols (#3002)
  • Cap max number of stack frames to 100 to not exceed payload size limit (#3009)
    • This will ensure we report errors with a big number of frames such as StackOverflowError
  • Fix user interaction tracking not working for Jetpack Compose 1.5+ (#3010)
  • Make sure to close all Closeable resources (#3000)

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 6.32.0

Features

  • Make DebugImagesLoader public (#2993)

Fixes

  • Make SystemEventsBroadcastReceiver exported on API 33+ (#2990)
    • This will fix the SystemEventsBreadcrumbsIntegration crashes that you might have encountered on Play Console

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 6.31.0

Features

  • Improve default debouncing mechanism (#2945)
  • Add CheckInUtils.withCheckIn which abstracts away some of the manual check-ins complexity (#2959)
  • Add @SentryCaptureExceptionParameter annotation which captures exceptions passed into an annotated method (#2764)
    • This can be used to replace Sentry.captureException calls in @ExceptionHandler of a @ControllerAdvice
  • Add ServerWebExchange to Hint for WebFlux as WEBFLUX_EXCEPTION_HANDLER_EXCHANGE (#2977)
  • Allow filtering GraphQL errors (#2967)
    • This list can be set directly when calling the constructor of SentryInstrumentation
    • For Spring Boot it can also be set in application.properties as sentry.graphql.ignored-error-types=SOME_ERROR,ANOTHER_ERROR

Fixes

  • Add OkHttp span auto-close when response body is not read (#2923)
  • Fix json parsing of nullable/empty fields for Hybrid SDKs (#2968)
    • (Internal) Rename nextList to nextListOrNull to actually match what the method does
    • (Hybrid) Check if there's any object in a collection before trying to parse it (which prevents the "Failed to deserilize object in list" log message)
    • (Hybrid) If a date can't be parsed as an ISO timestamp, attempts to parse it as millis silently, without printing a log message
    • (Hybrid) If op is not defined as part of SpanContext, fallback to an empty string, because the filed is optional in the spec
  • Always attach OkHttp errors and Http Client Errors only to call root span (#2961)
  • Fixed crash accessing Choreographer instance (#2970)

Dependencies

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 7.0.0-beta.1

Features

Breaking changes: - Capture failed HTTP requests by default (#2794) - Reduce flush timeout to 4s on Android to avoid ANRs (#2858) - Set ip_address to {{auto}} by default, even if sendDefaultPII is disabled (#2860) - Instead use the "Prevent Storing of IP Addresses" option in the "Security & Privacy" project settings on sentry.io - Reduce timeout of AsyncHttpTransport to avoid ANR (#2879) - Add deadline timeout for automatic transactions (#2865) - This affects all automatically generated transactions on Android (UI, clicks), the default timeout is 30s - Apollo v2 BeforeSpanCallback now allows returning null (#2890) - Automatic user interaction tracking: every click now starts a new automatic transaction (#2891) - Previously performing a click on the same UI widget twice would keep the existing transaction running, the new behavior now better aligns with other SDKs - Android only: If global hub mode is enabled, Sentry.getSpan() returns the root span instead of the latest span (#2855) - Observe network state to upload any unsent envelopes (#2910) - Android: it works out-of-the-box as part of the default SendCachedEnvelopeIntegration - JVM: you'd have to install SendCachedEnvelopeFireAndForgetIntegration as mentioned in https://docs.sentry.io/platforms/java/configuration/#configuring-offline-caching and provide your own implementation of IConnectionStatusProvider via SentryOptions - Do not try to send and drop cached envelopes when rate-limiting is active (#2937)

Fixes

  • Measure AppStart time till First Draw instead of onResume (#2851)
  • Do not overwrite UI transaction status if set by the user (#2852)
  • Capture unfinished transaction on Scope with status aborted in case a crash happens (#2938)
    • This will fix the link between transactions and corresponding crashes, you'll be able to see them in a single trace

Breaking changes: - Move enableNdk from SentryOptions to SentryAndroidOptions (#2793) - Fix Coroutine Context Propagation using CopyableThreadContextElement, requires kotlinx-coroutines-core version 1.6.1 or higher (#2838) - Bump min API to 19 (#2883) - Fix don't overwrite the span status of unfinished spans (#2859) - If you're using a self hosted version of sentry, sentry self hosted >= 22.12.0 is required - Migrate from default interface methods to proper implementations in each interface implementor (#2847) - This prevents issues when using the SDK on older AGP versions (< 4.x.x) - Make sure to align Sentry dependencies to the same version when bumping the SDK to 7.+, otherwise it will crash at runtime due to binary incompatibility. (E.g. if you're using -timber, -okhttp or other packages)

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 6.30.0

Features

  • Add sendModules option for disable sending modules (#2926)
  • Send db.system and db.name in span data for androidx.sqlite spans (#2928)
  • Check-ins (CRONS) support (#2952)
    • Add API for sending check-ins (CRONS) manually (#2935)
    • Support check-ins (CRONS) for Quartz (#2940)
    • @SentryCheckIn annotation and advice config for Spring (#2946)
    • Add option for ignoring certain monitor slugs (#2943)

Fixes

  • Always send memory stats for transactions (#2936)
    • This makes it possible to query transactions by the device.class tag on Sentry
  • Add sentry.enable-aot-compatibility property to SpringBoot Jakarta SentryAutoConfiguration to enable building for GraalVM (#2915)

Dependencies

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 6.29.0

Features

  • Send db.system and db.name in span data (#2894)
  • Send http.request.method in span data (#2896)
  • Add enablePrettySerializationOutput option for opting out of pretty print (#2871)

- Kotlin
Published by getsentry-bot over 2 years ago

https://github.com/getsentry/sentry-java - 6.28.0

Features

  • Add HTTP response code to Spring WebFlux transactions (#2870)
  • Add sampled to Dynamic Sampling Context (#2869)
  • Improve server side GraphQL support for spring-graphql and Nextflix DGS (#2856)
    • If you have already been using SentryDataFetcherExceptionHandler that still works but has been deprecated. Please use SentryGenericDataFetcherExceptionHandler combined with SentryInstrumentation instead for better error reporting.
    • More exceptions and errors caught and reported to Sentry by also looking at the ExecutionResult (more specifically its errors)
    • More details for Sentry events: query, variables and response (where possible)
    • Breadcrumbs for operation (query, mutation, subscription), data fetchers and data loaders (Spring only)
    • Better hub propagation by using GraphQLContext
  • Add autoconfigure modules for Spring Boot called sentry-spring-boot and sentry-spring-boot-jakarta (#2880)
    • The autoconfigure modules sentry-spring-boot and sentry-spring-boot-jakarta have a compileOnly dependency on spring-boot-starter which is needed for our auto installation in sentry-android-gradle-plugin
    • The starter modules sentry-spring-boot-starter and sentry-spring-boot-starter-jakarta now bring spring-boot-starter as a dependency
  • You can now disable Sentry by setting the enabled option to false (#2840)

Fixes

  • Propagate OkHttp status to parent spans (#2872)

- Kotlin
Published by getsentry-bot almost 3 years ago

https://github.com/getsentry/sentry-java - 6.27.0

Features

  • Add TraceOrigin to Transactions and Spans (#2803)

Fixes

  • Deduplicate events happening in multiple threads simultaneously (e.g. OutOfMemoryError) (#2845)
    • This will improve Crash-Free Session Rate as we no longer will send multiple Session updates with Crashed status, but only the one that is relevant
  • Ensure no Java 8 method reference sugar is used for Android (#2857)
  • Do not send session updates for terminated sessions (#2849)

- Kotlin
Published by getsentry-bot almost 3 years ago

https://github.com/getsentry/sentry-java - 6.26.0

Features

  • (Internal) Extend APIs for hybrid SDKs (#2814, #2846)

Fixes

  • Fix ANRv2 thread dump parsing for native-only threads (#2839)
  • Derive TracingContext values from event for ANRv2 events (#2839)

- Kotlin
Published by getsentry-bot almost 3 years ago

https://github.com/getsentry/sentry-java - 6.25.2

Fixes

  • Change Spring Boot, Apollo, Apollo 3, JUL, Logback, Log4j2, OpenFeign, GraphQL and Kotlin coroutines core dependencies to compileOnly (#2837)

- Kotlin
Published by getsentry-bot almost 3 years ago