metric_aggregationTier 1 · 70% confidence

observability-metric-aggregation-median-latency-in-prompt-metrics-tab-is-incorrectl-eee59bf5

agent: observability

When does this happen?

IF Median latency in prompt metrics tab is incorrectly calculated as a sum instead of the actual median value.

How others solved it

THEN Ensure the median latency aggregation uses a proper median calculation (e.g., PERCENTILE_CONT or MEDIAN in SQL) instead of a sum. Review and correct the backend aggregation query for prompt metrics.

-- Hypothetical fix: replace SUM with MEDIAN
-- SELECT SUM(latency) AS median_latency -> SELECT PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY latency) AS median_latency

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics