Skip to content

Commit

Permalink
update encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
quinna-h committed Feb 26, 2025
1 parent f76a3fb commit 3ec1aa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ddtrace/internal/_encoding.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -844,14 +844,14 @@ cdef class MsgpackEncoderV041(MsgpackEncoderBase):
# pack the name of a span event
ret = pack_text(&self.pk, k)
if ret != 0:
return ret
return return
# pack the timestamp of span event
if isinstance(v, (int, float)):
ret = pack_number(&self.pk, v)
elif isinstance(v, str):
ret = pack_text(&self.pk, v)
elif k == "attributes":
# span links can contain attributes, this is analougous to span tags
# attributes are serialized as a nested dict with string keys and values
# span events can contain attributes, this is analougous to span tags
attributes = v.items()
ret = msgpack_pack_map(&self.pk, len(attributes))
for attr_k, attr_v in attributes:
Expand Down

0 comments on commit 3ec1aa6

Please sign in to comment.