Releases: getsentry/sentry-java
Releases · getsentry/sentry-java
8.24.0
Features
- Attach MDC properties to logs as attributes (#4786)
- MDC properties set using supported logging frameworks (Logback, Log4j2, java.util.Logging) are now attached to structured logs as attributes.
- The attribute reflected on the log is
mdc.<key>, where<key>is the original key in the MDC. - This means that you will be able to filter/aggregate logs in the product based on these properties.
- Only properties with keys matching the configured
contextTagsare sent as log attributes.- You can configure which properties are sent using
options.setContextTagsif initalizing manually, or by specifying a comma-separated list of keys with acontext-tagsentry insentry.propertiesorsentry.context-tagsinapplication.properties. - Note that keys containing spaces are not supported.
- You can configure which properties are sent using
- Add experimental Sentry Android Distribution module for integrating with Sentry Build Distribution to check for and install updates (#4804)
- Allow passing a different
HandlertoSystemEventsBreadcrumbsIntegrationandAndroidConnectionStatusProviderso their callbacks are deliver to that handler (#4808) - Session Replay: Add new experimental Canvas Capture Strategy (#4777)
- A new screenshot capture strategy that uses Android's Canvas API for more accurate and reliable text and image masking
- Any
.drawText()or.drawBitmap()calls are replaced by rectangles, ensuring no text or images are present in the resulting output - Note: If this strategy is used, all text and images will be masked, regardless of any masking configuration
- To enable this feature, set the
screenshotStrategy, either via code:or AndroidManifest.xml:SentryAndroid.init(context) { options -> options.sessionReplay.screenshotStrategy = ScreenshotStrategyType.CANVAS }
<application> <meta-data android:name="io.sentry.session-replay.screenshot-strategy" android:value="canvas" /> </application>
Fixes
- Avoid StrictMode warnings (#4724)
- Use logger from options for JVM profiler (#4771)
- Session Replay: Avoid deadlock when pausing replay if no connection (#4788)
- Session Replay: Fix capturing roots with no windows (#4805)
- Session Replay: Fix
java.lang.IllegalArgumentException: width and height must be > 0(#4805) - Handle
NoOpScopesinContextwhen starting a span through OpenTelemetry (#4823)- This fixes "java.lang.IllegalArgumentException: The DSN is required" when combining WebFlux and OpenTelemetry
- Session Replay: Do not use recycled screenshots for masking (#4790)
- This fixes native crashes seen in
Canvas.<init>/ScreenshotRecorder.capture
- This fixes native crashes seen in
- Session Replay: Ensure bitmaps are recycled properly (#4820)
Miscellaneous
- Mark SentryClient(SentryOptions) constructor as not internal (#4787)
Dependencies
8.24.0-alpha.2
Features
- Attach MDC properties to logs as attributes (#4786)
- MDC properties set using supported logging frameworks (Logback, Log4j2, java.util.Logging) are now attached to structured logs as attributes.
- The attribute reflected on the log is
mdc.<key>, where<key>is the original key in the MDC. - This means that you will be able to filter/aggregate logs in the product based on these properties.
- Only properties with keys matching the configured
contextTagsare sent as log attributes.- You can configure which properties are sent using
options.setContextTagsif initalizing manually, or by specifying a comma-separated list of keys with acontext-tagsentry insentry.propertiesorsentry.contex-tagsinapplication.properties. - Note that keys containing spaces are not supported.
- You can configure which properties are sent using
- Add experimental Sentry Android Distribution module for integrating with Sentry Build Distribution to check for and install updates (#4804)
- Allow passing a different
HandlertoSystemEventsBreadcrumbsIntegrationandAndroidConnectionStatusProviderso their callbacks are deliver to that handler (#4808)
Fixes
- Avoid StrictMode warnings (#4724)
- Use logger from options for JVM profiler (#4771)
- Session Replay: Avoid deadlock when pausing replay if no connection (#4788)
Miscellaneous
- Mark SentryClient(SentryOptions) constructor as not internal (#4787)
Dependencies
8.23.1-alpha.1
8.23.0
Features
- Add session replay id to Sentry Logs (#4740)
- Add support for continuous profiling of JVM applications on macOS and Linux (#4556)
- Sentry continuous profiling on the JVM is using async-profiler under the hood.
- By default this feature is disabled. Set a profile sample rate and chose a lifecycle (see below) to enable it.
- Add the
sentry-async-profilerdependency to your project - Set a sample rate for profiles, e.g.
1.0to send all of them. You may useoptions.setProfileSessionSampleRate(1.0)in code orprofile-session-sample-rate=1.0insentry.properties - Set a profile lifecycle via
options.setProfileLifecycle(ProfileLifecycle.TRACE)in code orprofile-lifecycle=TRACEinsentry.properties- By default the lifecycle is set to
MANUAL, meaning you have to explicitly callSentry.startProfiler()andSentry.stopProfiler() - You may change it to
TRACEwhich will create a profile for each transaction
- By default the lifecycle is set to
- To automatically upload Profiles for each transaction in a Spring Boot application
- set
sentry.profile-session-sample-rate=1.0andsentry.profile-lifecycle=TRACEinapplication.properties - or set
sentry.profile-session-sample-rate: 1.0andsentry.profile-lifecycle: TRACEinapplication.yml
- set
- Profiling can also be combined with our OpenTelemetry integration
Fixes
- Start performance collection on AppStart continuous profiling (#4752)
- Preserve modifiers in
SentryTraced(#4757)
Improvements
8.22.0
Features
- Move SentryLogs out of experimental (#4710)
- Add support for w3c traceparent header (#4671)
- This feature is disabled by default. If enabled, outgoing requests will include the w3c
traceparentheader. - See https://develop.sentry.dev/sdk/telemetry/traces/distributed-tracing/#w3c-trace-context-header for more details.
Sentry(Android).init(context) { options -> // ... options.isPropagateTraceparent = true }
- This feature is disabled by default. If enabled, outgoing requests will include the w3c
- Sentry now supports Spring Boot 4 M3 pre-release (#4739)
Improvements
- Remove internal API status from get/setDistinctId (#4708)
- Remove ApiStatus.Experimental annotation from check-in API (#4721)
Fixes
- Session Replay: Fix
NoSuchElementExceptioninBufferCaptureStrategy(#4717) - Session Replay: Fix continue recording in Session mode after Buffer is triggered (#4719)
Dependencies
8.21.1
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-springis not working yet for Spring Boot 4. Please usesentry-opentelemetry-agentuntil OpenTelemetry has support for Spring Boot 4.
- NOTE: Our
- Replace
UUIDGeneratorimplementation with Apache licensed code (#4662) - Replace
Randomimplementation with MIT licensed code (#4664) - Add support for
varsattribute inSentryStackFrame(#4686)- Breaking change: The type of the
varsattribute has been changed fromMap<String, String>toMap<String, Object>.
- Breaking change: The type of the
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:Sentry.init(options -> { ... options.setOnDiscard( (reason, category, number) -> { // Your logic to process discarded data }); });
- Stub for setting the callback on
8.19.1
8.19.0
Warning
Android: This release is incompatible with API levels below 26. We recommend using SDK version 8.20.0 or higher instead.
Features
- Add a
isEnableSystemEventBreadcrumbsExtrasoption to disable reporting system events extras for breadcrumbs (#4625)
Improvements
- Session Replay: Use main thread looper to schedule replay capture (#4542)
- Use single
LifecycleObserverand multi-cast it to the integrations interested in lifecycle states (#4567) - Add
sentry.originattribute to logs (#4618)- This helps identify which integration captured a log event
- Prewarm
SentryExecutorServicefor 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
NetworkCallbackregistered 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-ndkto theio.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.txtorproguard-android-optimize.txt) the following config should be present:
-keepclasseswithmembernames class * { native <methods>; } - 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 (
- 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
StackOverflowErrorwhen using OSS Licenses plugin
- This fixes