Skip to content

Commit affaa25

Browse files
authored
chore(replay): Add org & proj context to event parser log (#102691)
We have a high volume of "[EVENT PARSE FAIL] Could not transform breadcrumb to trace-item" logs. Let's add some org and proj context to find out if it's a specific customer that caused the increase in volume. Also, let's change exc_info=e to exc_info=True as this matches the other log in the file.
1 parent ced98a8 commit affaa25

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/sentry/replays/usecases/ingest/event_parser.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,16 @@ def parse_trace_item(
341341
) -> TraceItem | None:
342342
try:
343343
return as_trace_item(context, event_type, event)
344-
except (AttributeError, KeyError, TypeError, ValueError) as e:
344+
except (AttributeError, KeyError, TypeError, ValueError):
345345
if random.random() < 0.01:
346346
logger.warning(
347347
"[EVENT PARSE FAIL] Could not transform breadcrumb to trace-item",
348-
exc_info=e,
349-
extra={"event": event},
348+
exc_info=True,
349+
extra={
350+
"organization_id": context["organization_id"],
351+
"project_id": context["project_id"],
352+
"event": event,
353+
},
350354
)
351355
return None
352356

0 commit comments

Comments
 (0)