Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(tracing): duration histogram counts the population the active view shows (#71494)

Jon McCallum308eb2d29e2e
diff --git a/products/tracing/frontend/tracingDataLogic.ts b/products/tracing/frontend/tracingDataLogic.ts
index 70346f0e7a1f..2700de125e41 100644
--- a/products/tracing/frontend/tracingDataLogic.ts
+++ b/products/tracing/frontend/tracingDataLogic.ts
@@ -624,6 +624,9 @@ export const tracingDataLogic = kea<tracingDataLogicType>([
serviceNames:
values.filters.serviceNames.length > 0 ? values.filters.serviceNames : undefined,
filterGroup: values.queryFilterGroup as PropertyGroupFilter,
+ // Match the population the list shows (and the sparkline counts):
+ // root spans in Traces view, every matching span in Spans view.
+ rootSpans: values.filters.viewMode === 'traces',
},
controller.signal
)