Skip to content

Commit aac6a31

Browse files
Rachel ChenRachel Chen
authored andcommitted
cleanup
1 parent ef23a80 commit aac6a31

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

snuba/web/rpc/v1/endpoint_get_trace.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,14 +478,12 @@ def _process_results(
478478
"""
479479
last_seen_timestamp_precise = 0.0
480480
last_seen_id = ""
481-
row_count = 0
482481

483482
# First pass: parse rows and build attribute dicts
484483
parsed_rows: list[tuple[str, Timestamp, dict[str, GetTraceResponse.Item.Attribute]]] = []
485484

486485
with sentry_sdk.start_span(op="function", description="add_attributes") as span:
487486
for row in data:
488-
row_count += 1
489487
id = row.pop("id")
490488
ts = row.pop("timestamp")
491489
arrays = row.pop("attributes_array", "{}") or "{}"
@@ -529,8 +527,6 @@ def add_attribute(key: str, value: Any) -> None:
529527

530528
parsed_rows.append((id, timestamp, attributes))
531529

532-
span.set_data("rows_processed", row_count)
533-
534530
# Second pass: sort attributes and assemble items
535531
items: list[GetTraceResponse.Item] = []
536532

@@ -546,7 +542,7 @@ def add_attribute(key: str, value: Any) -> None:
546542
)
547543
items.append(item)
548544

549-
span.set_data("rows_sorted", len(parsed_rows))
545+
span.set_data("rows_processed", len(parsed_rows))
550546

551547
return ProcessedResults(
552548
items=items,

0 commit comments

Comments
 (0)