Contexts.setTrace can't be null
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.
Thanks for opening this issue @leonchen83. We'll change this to actually allow setting null.
I've just taken a more detailed look at this and we do actually want a trace context to be there. Transactions are even dropped, if trace context is missing. I'll send a PR to update the annotation(s) but we'll keep requiring trace.
Hi but this behavior is not consistent with the iOS SDK, and we do not need to set the context trace
Thanks, I'll clarify about consistency, but for now I'll move forward with the @NotNull since that reflects what the current implementation does.
We just had a talk about this and want to keep trace context required, i.e. @NotNull.