Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/sentry/spans/consumers/process_segments/shim.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,20 @@ def build_shim_event_data(
# Add legacy span attributes required only by issue detectors. As opposed to
# real event payloads, this also adds the segment span so detectors can run
# topological sorting on the span tree.
#
# TODO: Remove this code once `organizations:performance-issues-spans` has graduated
# and performance issue detection runs 100% on spans.
for span in spans:
event_span = cast(dict[str, Any], deepcopy(span))
event_span["start_timestamp"] = span["start_timestamp"]
event_span["timestamp"] = span["end_timestamp"]
event_span["data"] = {}
for key, value in (span.get("attributes") or {}).items():
if (value := attribute_value(event_span, key)) is not None:
if key == "sentry.description":
event_span["description"] = value
else:
event_span["data"][key] = value

event["spans"].append(event_span)

return event
Loading