sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

Using `setContext` on transaction fails ingestion for simple types

Open adinauer opened this issue 10 months ago • 3 comments

Integration

sentry

Java Version

any

Version

7.8.0

Steps to Reproduce

Use setContext on transaction and set any of String, Boolean or number as value.

Expected Result

Event is ingested

Actual Result

Ingestion doesn't work for these values.

adinauer avatar Apr 12 '24 12:04 adinauer

In Scope.java we wrap simple values with a HashMap and key value. See https://github.com/getsentry/sentry-java/blob/7b7964f423f45db68b01e66b1b6ce08dacb3e7b6/sentry/src/main/java/io/sentry/Scope.java#L614-L690

adinauer avatar Apr 12 '24 12:04 adinauer

@adinauer is the event just dropped, or just the values that are set incorrectly are not showing up?

romtsn avatar Apr 17 '24 12:04 romtsn

The simple values in Contexts are dropped and the ingested JSON and UI have some info about it but the event shows up in Sentry.

adinauer avatar Apr 18 '24 03:04 adinauer