Add msgpack Packer based off msgpack-python 0.6.2#3028
Add msgpack Packer based off msgpack-python 0.6.2#3028mergify[bot] merged 1 commit intoDataDog:masterfrom
Conversation
6175e65 to
806a538
Compare
9747137 to
dd467b6
Compare
It's handy to have a general msgpack encoder that can be used for encoding arbitrary payloads of primitive Python types (see DataDog#2915). It might be useful to use as a fallback for encoding traces as well if an issue with the custom msgpack encoder is suspected.
dd467b6 to
23847b2
Compare
Codecov Report
@@ Coverage Diff @@
## master #3028 +/- ##
==========================================
+ Coverage 84.36% 84.46% +0.10%
==========================================
Files 624 633 +9
Lines 45397 45745 +348
==========================================
+ Hits 38298 38638 +340
- Misses 7099 7107 +8
Continue to review full report at Codecov.
|
| return 0 | ||
|
|
||
|
|
||
| cdef class Packer(object): |
There was a problem hiding this comment.
This source file is already quite big. Would it make sense to put this into its own source file?
There was a problem hiding this comment.
Yeah I considered it but opted not to because, iirc, adding another Cython module significantly increases compilation time 😞. There's also quite a bit of dependence that Packer has that is shared with the other encoders (the underlying C struct and all the methods)
Commit Message
{{title}}
It's handy to have a general msgpack encoder that can be used for
encoding arbitrary payloads of primitive Python types (see #2915).
The encoder added here is based off the one added in #1491.
It might be useful to use as a fallback for encoding traces as well if
an issue with the custom msgpack encoder is suspected.
The relevant tests from the msgpack-python implementation are included
as well to ensure that the implementation is correct.
Checklist