Open kitgxrl opened 2 months ago
In order to fix this while extracting the additional data I see three solutions:
Payload::BinaryText(Bytes, Vec<Value>)
Payload::Binary(Bytes)
to Payload::Binary(Bytes, Vec<Value>)
(Potentially Option<Vec<Value>>
for easier checking?)Emit both Payload::Text
and Payload::Binary
separately
1 sounds the best as it does not break the existing API and is easier to handle when both the binary data and additional Text data are related.
Currently if there is some additional data attached to a binary event, it is not possible to retrieve that additional data, e.g
xxx["my_binary_event", "extra data"]
is not correctly handled. The worst case scenario is that the event name is labelled entirely wrong. In the previous example the library currently just strips the brackets and"
, which would cause an event name of:my_binary_eventextra data
or something along those lines.