Skip to content

Commit e88e83c

Browse files
authored
fix(meps): Only overwrite status code if int (#58251)
When we fetch transaction.status results from metrics, the status code that's returned back is not an int but rather a string with the value we'd typically get if we resolve through the map. This causes issues because for metrics responses, `transaction.status` gets set to `None` for all rows. This checks if the value is an int and if it is, fetch from the map, otherwise don't overwrite it.
1 parent 998b5c3 commit e88e83c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sentry/api/bases/organization_events.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def handle_data(
365365
# once those APIs are used across the application.
366366
if "transaction.status" in first_row:
367367
for row in results:
368-
if "transaction.status" in row:
368+
if "transaction.status" in row and type(row["transaction.status"]) is int:
369369
row["transaction.status"] = SPAN_STATUS_CODE_TO_NAME.get(
370370
row["transaction.status"]
371371
)

0 commit comments

Comments
 (0)