getsentry / sentry-java

A Sentry SDK for Java, Android and other JVM languages.
https://docs.sentry.io/
MIT License
1.14k stars 430 forks source link

Contexts.setTrace can't be null #3414

Open leonchen83 opened 3 months ago

leonchen83 commented 3 months ago

Integration

sentry-android

Build System

Gradle

AGP Version

7.4.2

Proguard

Enabled

Version

7.8.0

Steps to Reproduce

Contexts.setTrace(final @Nullable SpanContext traceContext)

Expected Result

it's Nullable. so traceContext can set to null.

Actual Result

throw NPE. We want set this value to null as same as iOS sdk.

adinauer commented 3 months ago

Thanks for opening this issue @leonchen83. We'll change this to actually allow setting null.