Skip to content

Commit aba2cf1

Browse files
fix op fallback
1 parent 96f86e3 commit aba2cf1

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

sentry_sdk/client.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,12 @@ def _serialized_v1_span_to_serialized_v2_span(
174174
res["span_id"] = span["span_id"]
175175

176176
if "description" in span:
177-
res["name"] = span["description"]
178-
elif (
179-
"op" in span
180-
): # fallback based on observed downstream fallback for transactions
181-
res["name"] = span["op"]
177+
description = span["description"]
178+
179+
if description is None and "op" in span:
180+
res["name"] = span["op"]
181+
182+
res["name"] = description
182183

183184
if "start_timestamp" in span:
184185
start_timestamp = None

0 commit comments

Comments
 (0)