Browse Source

feat(trace-view): Add duration so that we can sort children by it (#23897)

- This is for the new dropdown we'll be adding to the trace view so that
  we can show the slowest children first
William Mak 4 years ago
parent
commit
e585dd0353
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/sentry/api/endpoints/organization_events_trace.py

+ 2 - 0
src/sentry/api/endpoints/organization_events_trace.py

@@ -25,6 +25,7 @@ def serialize_event(event, parent, is_root_event=False):
         "event_id": event["id"],
         "span_id": event["trace.span"],
         "transaction": event["transaction"],
+        "transaction.duration": event["transaction.duration"],
         "project_id": event["project_id"],
         "parent_event_id": parent,
         "is_root": is_root_event,
@@ -51,6 +52,7 @@ class OrganizationEventsTraceLightEndpoint(OrganizationEventsEndpointBase):
                 selected_columns=[
                     "id",
                     "timestamp",
+                    "transaction.duration",
                     "transaction",
                     "project_id",
                     "trace.span",