Using sentry_sdk version 0.13.0 in Python 3.7.3, strings encoded as bytes objects are serialized as lists of integers:
>>> from sentry_sdk.serializer import serialize
>>> serialize(b'123abc')
[49, 50, 51, 97, 98, 99]
>>> serialize(b'123abc', should_repr_strings=True)
['49', '50', '51', '97', '98', '99']
This doesn't seem like the expected behavior, instead it could be:
>>> serialize(b'123abc')
'123abc'
>>> serialize(b'123abc', should_repr_strings=True)
"b'123abc'"
I was able to reproduce the issue with Python 3.7.3, 3.6.7, 3.5.6 and 3.4.10. The serialization seems to behave properly with Python 2.7.
Using
sentry_sdkversion 0.13.0 in Python 3.7.3, strings encoded asbytesobjects are serialized as lists of integers:This doesn't seem like the expected behavior, instead it could be:
I was able to reproduce the issue with Python 3.7.3, 3.6.7, 3.5.6 and 3.4.10. The serialization seems to behave properly with Python 2.7.