Skip to content

Commit f31f09d

Browse files
loglog
1 parent 0d56e0a commit f31f09d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sentry_sdk/serializer.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,17 @@ def _serialize_node_impl(
297297
for processor in global_repr_processors:
298298
result = processor(obj, hints)
299299
if result is not NotImplemented:
300+
print("global repr")
300301
return _flatten_annotated(result)
301302

302303
sentry_repr = getattr(type(obj), "__sentry_repr__", None)
303304

305+
print(
306+
"check:",
307+
isinstance(obj, serializable_str_types),
308+
isinstance(obj, tuple(sequence_types)),
309+
)
310+
304311
if obj is None or isinstance(obj, (bool, int, float)):
305312
if should_repr_strings or (
306313
isinstance(obj, float) and (math.isinf(obj) or math.isnan(obj))
@@ -310,9 +317,11 @@ def _serialize_node_impl(
310317
return obj
311318

312319
elif callable(sentry_repr):
320+
print("callable")
313321
return sentry_repr(obj)
314322

315323
elif isinstance(obj, datetime):
324+
print("datetime")
316325
return (
317326
str(format_timestamp(obj))
318327
if not should_repr_strings
@@ -377,6 +386,7 @@ def _serialize_node_impl(
377386
return rv_list
378387

379388
if should_repr_strings:
389+
print("string")
380390
obj = _safe_repr_wrapper(obj)
381391
else:
382392
if isinstance(obj, bytes) or isinstance(obj, bytearray):
@@ -391,6 +401,7 @@ def _serialize_node_impl(
391401
len(path) == 3 and path[0] == "spans" and path[-1] == "description"
392402
)
393403
if is_span_description:
404+
print("is_description")
394405
return obj
395406

396407
return _flatten_annotated(strip_string(obj, max_length=max_value_length))

0 commit comments

Comments
 (0)