Fixes
- The SDK now handles
null
on many APIs instead of expecting a nonnull
value (#4245)- Certain APIs like
setTag
,setData
,setExtra
,setContext
previously caused aNullPointerException
when invoked with eithernull
key or value. - The SDK now tries to have a sane fallback when
null
is passed and no longer throwsNullPointerException
- If
null
is passed, the SDK will- do nothing if a
null
key is passed, returningnull
for non void methods - remove any previous value if the new value is set to
null
- do nothing if a
- Certain APIs like
- 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
- Please ensure the SentryOkHttpInterceptor is added last to your OkHttpClient, as otherwise changes to the
- 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
- In this case we cannot report the
- Pass OpenTelemetry span attributes into TracesSampler callback (#4253)
SamplingContext
now has agetAttribute
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 spanop
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 causedOutOfMemoryError
on certain devices due to high frequency of calling the method.
- This affects in particular
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
insentry.properties
to enable it - Set
sentry.capture-open-telemetry-events=true
in Springsapplication.properties
to enable it - Set
sentry.captureOpenTelemetryEvents: true
in Springsapplication.yml
to enable it
- OpenTelemetry spans may have exceptions attached to them (
Behavioural Changes
- Use
java.net.URI
for parsing URLs inUrlUtils
(#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