github getsentry/sentry-java 8.4.0

23 hours ago

Fixes

  • The SDK now handles null on many APIs instead of expecting a non null value (#4245)
    • Certain APIs like setTag, setData, setExtra, setContext previously caused a NullPointerException when invoked with either null key or value.
    • The SDK now tries to have a sane fallback when null is passed and no longer throws NullPointerException
    • If null is passed, the SDK will
      • do nothing if a null key is passed, returning null for non void methods
      • remove any previous value if the new value is set to null
  • 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
  • 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
  • Pass OpenTelemetry span attributes into TracesSampler callback (#4253)
    • SamplingContext now has a getAttribute 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 span op 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 caused OutOfMemoryError on certain devices due to high frequency of calling the method.

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 in sentry.properties to enable it
    • Set sentry.capture-open-telemetry-events=true in Springs application.properties to enable it
    • Set sentry.captureOpenTelemetryEvents: true in Springs application.yml to enable it

Behavioural Changes

  • Use java.net.URI for parsing URLs in UrlUtils (#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

Dependencies

Don't miss a new sentry-java release

NewReleases is sending notifications on new releases.