logtail / logtail-python

Better Stack Python client
https://betterstack.com/logs
Other
36 stars 10 forks source link

ensure extra events are serializable before uploading #20

Closed gorkem2020 closed 10 months ago

gorkem2020 commented 11 months ago

extra events may include objects that are not serializable by msgpack and results in failure when trying to upload. Adding json.loads/dumps ensures that each extra event is serializable before uploading, so that msgpack can process

curusarn commented 11 months ago

Hi @gorkem2020,

Thank you for submitting the PR. We'll merge this and release a new version soon!

PetrHeinz commented 10 months ago

Hello @gorkem2020 and thanks again for the contribution! 🙌 I've noticed that your change doesn't really work for values passed in the context (only for extra). I've patched it up and updated tests.

Too late I realized that you had opened a PR from your master brach - I've pushed directly into it. I hope that's alright and you're using the fork just to create this PR.

PetrHeinz commented 10 months ago

@gorkem2020 Thank you again for the contribution, I just released it as v0.2.9 ❤️