Conversation
Promote `sentry_value_to_msgpack` from experimental to stable, and expose `sentry_value_from_msgpack(_stream)` alongside it to make the API symmetric and complete for reading and writing commonly used file formats for events, breadcrumbs, and attachment manifests. Ref: #2116
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2153 +/- ##
==========================================
- Coverage 75.40% 75.34% -0.07%
==========================================
Files 103 103
Lines 28105 28102 -3
Branches 5133 5132 -1
==========================================
- Hits 21193 21173 -20
- Misses 5577 5602 +25
+ Partials 1335 1327 -8 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Any idea why it was public in the first place?
PS: I tried to find any public consumer on GH, but there seems to be none, bar some declaration in a testing file that seems to be unused.
|
Both JSON and MessagePack serialization were originally made available side by side in c082e7d. Hard to say what the motivation for MessagePack was back then, but one potential could've been sentry-contrib-native, some old unofficial Rust bindings with familiar contributors, where I don't have super strong feelings about public MessagePack (de)serialization. Doing the opposite and hiding the still-experimental function from the public API could also be a fine alternative. On the other hand, MessagePack would be superior to JSON when doing |
Only if you are lazy 😄 Since we've got |
limbonaut
left a comment
There was a problem hiding this comment.
This may be useful for Android scope sync, but currently unused.
I wonder if it makes some sense to put such APIs that are only used by downstream/hybrid SDKs into a separate header? Say include/sentry_internal.h. Just to keep user-facing header less bulky.
|
|
|
I missed that even |
|
I agree. A lot of SDKs support serialization/deserialization, the JSON at least. |
Expose
sentry_value_from_json,sentry_value_from_msgpack, andsentry_value_from_msgpack_streamalongside the existing serializers to provide public bidirectional APIs for reading and writing sentry values as JSON and MessagePack. Promotesentry_value_to_msgpackfrom experimental to stable.Ref: #2116