Releases: getsentry/sentry-java
Releases · 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)
inSentry.init
/SentryAndroid.init
<meta-data android:name="io.sentry.logs.enabled" android:value="true" />
inAndroidManifest.xml
logs.enabled=true
insentry.properties
sentry.logs.enabled=true
inapplication.properties
sentry.logs.enabled: true
inapplication.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
- The feature is disabled by default and needs to be enabled by:
Fixes
- Hook User Interaction integration into running Activity in case of deferred SDK init (#4337)
Dependencies
8.11.1
8.11.0
Features
- Make
RequestDetailsResolver
public (#4326)RequestDetailsResolver
is now public and has an additional constructor, making it easier to use a customTransportFactory
Fixes
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 kindCLIENT
(#4349)- Defaults to
false
meaning standalone OpenTelemetry spans with kindCLIENT
will be turned into Sentry transactions
- Defaults to
- Make
RequestDetailsResolver
public (#4326)RequestDetailsResolver
is now public and has an additional constructor, making it easier to use a customTransportFactory
Fixes
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 yourjava
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 usingSentryOtelThreadLocalStorage
- This is only relevant if you see
Fixes
- Update profile chunk rate limit and client report (#4353)
Dependencies
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 kindCLIENT
(#4349)- Defaults to
false
meaning standalone OpenTelemetry spans with kindCLIENT
will be turned into Sentry transactions
- Defaults to
Fixes
- Update profile chunk rate limit and client report (#4353)
8.9.0
Features
- Add
SentryWrapper.wrapRunnable
to wrapRunnable
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
- This should suppress the StrictMode's
- 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
8.9.0-alpha.1
Features
- Add
SentryWrapper.wrapRunnable
to wrapRunnable
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
- This should suppress the StrictMode's
- 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)
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 withSentryContext
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
- This is now part of
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)
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: Bothoptions.profilesSampler
andoptions.profilesSampleRate
must not be set to enable UI Profiling.
To keep the same transaction-based behaviour, without the 30 seconds limitation, you can use thetrace
lifecycle mode.<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>
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); });
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 })
Fixes
- Compress Screenshots on a background thread (#4295)