Features
- Add scope-level attributes API (#5118) via (#5148)
- Automatically include scope attributes in logs and metrics (#5120)
- New APIs are
Sentry.setAttribute,Sentry.setAttributes,Sentry.removeAttribute
- Support collections and arrays in attribute type inference (#5124)
- Add support for
SENTRY_SAMPLE_RATEenvironment variable /sample-rateproperty (#5112) - Create
sentry-opentelemetry-otlpandsentry-opentelemetry-otlp-springmodules for combining OpenTelemetry SDK OTLP export with Sentry SDK (#5100)- OpenTelemetry is configured to send spans to Sentry directly using an OTLP endpoint.
- Sentry only uses trace and span ID from OpenTelemetry (via
OpenTelemetryOtlpEventProcessor) but will not send spans through OpenTelemetry nor use OpenTelemetryContextforScopespropagation. - See the OTLP setup docs for Java and Spring Boot for installation and configuration instructions.
- Add screenshot masking support using view hierarchy (#5077)
- Masks sensitive content (text, images) in error screenshots using the same view hierarchy approach as Session Replay
- Requires the
sentry-android-replaymodule to be present at runtime for masking to work - Enable via code:
SentryAndroid.init(context) { options -> options.isAttachScreenshot = true options.screenshot.setMaskAllText(true) options.screenshot.setMaskAllImages(true) // Or mask specific view classes options.screenshot.addMaskViewClass("com.example.MyCustomView") }
- Or via
AndroidManifest.xml:<meta-data android:name="io.sentry.attach-screenshot" android:value="true" /> <meta-data android:name="io.sentry.screenshot.mask-all-text" android:value="true" /> <meta-data android:name="io.sentry.screenshot.mask-all-images" android:value="true" />
- The
ManifestMetaDataReadernow read theDIST(#5107)
Fixes
- Fix attribute type detection for
Long,Short,Byte,BigInteger,AtomicInteger, andAtomicLongbeing incorrectly inferred asdoubleinstead ofinteger(#5122) - Remove
AndroidRuntimeManagerStrictMode relaxation to prevent ANRs during SDK init (#5127)- IMPORTANT: StrictMode violations may appear again in debug builds. This is intentional to prevent ANRs in production releases.
- Fix crash when unregistering
SystemEventsBroadcastReceiverwith try-catch block. (#5106) - Use
peekDecorViewinstead ofgetDecorViewinSentryGestureListenerto avoid forcing view hierarchy construction (#5134) - Log an actionable error message when Relay returns HTTP 413 (Content Too Large) (#5115)
- Also switch the client report discard reason for all HTTP 4xx/5xx errors (except 429) from
network_errortosend_error
- Also switch the client report discard reason for all HTTP 4xx/5xx errors (except 429) from
- Trim DSN string before parsing to avoid
URISyntaxExceptioncaused by trailing whitespace (#5113) - Reduce allocations and bytecode instructions during
Sentry.init(#5135)