Releases: getsentry/sentry-java
Releases · getsentry/sentry-java
8.27.1
8.27.0
Features
- Implement OpenFeature Integration that tracks Feature Flag evaluations (#4910)
- To make use of it, add the
sentry-openfeaturedependency and register the the hook using:openFeatureApiInstance.addHooks(new SentryOpenFeatureHook());
- To make use of it, add the
- Implement LaunchDarkly Integrations that track Feature Flag evaluations (#4917)
- For Android, please add
sentry-launchdarkly-androidas a dependency and register theSentryLaunchDarklyAndroidHook - For Server / JVM, please add
sentry-launchdarkly-serveras a dependency and register theSentryLaunchDarklyServerHook
- For Android, please add
- Detect oversized events and reduce their size (#4903)
- You can opt into this new behaviour by setting
enableEventSizeLimitingtotrue(sentry.enable-event-size-limiting=truefor Spring Bootapplication.properties) - You may optionally register an
onOversizedEventcallback to implement custom logic that is executed in case an oversized event is detected- This is executed first and if event size was reduced sufficiently, no further truncation is performed
- In case we detect an oversized event, we first drop breadcrumbs and if that isn't sufficient we also drop stack frames in order to get an events size down
- You can opt into this new behaviour by setting
Improvements
- Do not send manual log origin (#4897)
Dependencies
- Bump Spring Boot 4 to GA (#4923)
8.26.0
Features
- Add feature flags API (#4812) and (#4831)
- You may now keep track of your feature flag evaluations and have them show up in Sentry.
- Top level API (
Sentry.addFeatureFlag("my-feature-flag", true);) writes to scopes and the current span (if there is one) - It is also possible to use API on
IScope,IScopes,ISpanandITransactiondirectly - Feature flag evaluations tracked on scope(s) will be added to any errors reported to Sentry.
- The SDK keeps the latest 100 evaluations from scope(s), replacing old entries as new evaluations are added.
- For feature flag evaluations tracked on spans:
- Only 10 evaluations are tracked per span, existing flags are updated but new ones exceeding the limit are ignored
- Spans do not inherit evaluations from their parent
- Drop log events once buffer hits hard limit (#4889)
- If we have 1000 log events queued up, we drop any new logs coming in to prevent OOM
- Remove vendored code and upgrade to async profiler 4.2 (#4856)
- This adds support for JDK 23+
Fixes
- Removed SentryExecutorService limit for delayed scheduled tasks (#4846)
- Fix visual artifacts for the Canvas strategy on some devices (#4861)
- [Config] Trim whitespace on properties path (#4880)
- Only set
DefaultReplayBreadcrumbConverterif replay is available (#4888) - Session Replay: Cache connection status instead of using blocking calls (#4891)
- Fix log count in client reports (#4869)
- Fix profilerId propagation (#4833)
- Fix profiling init for Spring and Spring Boot w Agent auto-init (#4815)
- Copy active span on scope clone (#4878)
Improvements
- Fallback to distinct-id as user.id logging attribute when user is not set (#4847)
- Report Timber.tag() as
timber.taglog attribute (#4845) - Session Replay: Add screenshot strategy serialization to RRWeb events (#4851)
- Report discarded log bytes (#4871)
- Log why a properties file was not loaded (#4879)
Dependencies
8.25.0 (stable)
Fixes
- [ANR] Removed AndroidTransactionProfiler lock (#4817)
- Avoid ExecutorService for DefaultCompositePerformanceCollector timeout (#4841)
- This avoids infinite data collection for never stopped transactions, leading to OOMs
- Fix wrong .super() call in SentryTimberTree (#4844)
Improvements
- [ANR] Defer some class availability checks (#4825)
- Collect PerformanceCollectionData only for sampled transactions (#4834)
- Breaking change: Transactions with a deferred sampling decision (
sampled == null) won't be collecting any performance data anymore (CPU, RAM, slow/frozen frames).
- Breaking change: Transactions with a deferred sampling decision (
Dependencies
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)