Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make enums ser/deser forward-compatible #2268

Closed
romtsn opened this issue Sep 30, 2022 · 2 comments
Closed

Make enums ser/deser forward-compatible #2268

romtsn opened this issue Sep 30, 2022 · 2 comments

Comments

@romtsn
Copy link
Member

romtsn commented Sep 30, 2022

Description

Some enums like

return SpanStatus.valueOf(reader.nextString().toUpperCase(Locale.ROOT));
ser/deser are not forward compatible, meaning if, for example, RN adds a new span status, the deserialization will fail during serialization roundtrip.

We should fallback to UNKNOWN statuses/enums in case the value is not part of the enum set.

@marandaneto
Copy link
Contributor

marandaneto commented Oct 2, 2022

I'd not say that we should always fallback to UNKNOWN statues/enums, that's fine if this value is only used at runtime for ifs, switches, etc, but if the value is forwarded to Sentry, its value should be kept.
Eg. If RN or Flutter captures a transaction with a status that is not defined in the SpanStatus enum, this value should not be lost during roundtrip serialization.
This is a real example getsentry/develop#383 gets implemented.

@kahest
Copy link
Member

kahest commented Dec 13, 2024

closing as outdated - if it's still relevant it will come up again

@kahest kahest closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Mobile & Cross Platform SDK Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

5 participants