Browse Source

fix(tracing): Tracing instrumentation (#67518)

- Tracing duration was a timedelta object, not a number. This updates
the measurement to be the total seconds instead
William Mak 11 months ago
parent
commit
366f18ebb1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/sentry/api/endpoints/organization_events_trace.py

+ 1 - 1
src/sentry/api/endpoints/organization_events_trace.py

@@ -608,7 +608,7 @@ def augment_transactions_with_spans(
 
         if ts_params["max"] and ts_params["min"]:
             sentry_sdk.set_measurement(
-                "trace_view.trace_duration", ts_params["max"] - ts_params["min"]
+                "trace_view.trace_duration", (ts_params["max"] - ts_params["min"]).total_seconds()
             )
             sentry_sdk.set_tag("trace_view.missing_timestamp_constraints", False)
         else: