You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(webapp): give every chart in a synced group the same bucket width
Flooring only the sparse charts on the queue detail page broke the shared hover
crosshair. It is drawn as a recharts ReferenceLine on a category x-axis, so it
only appears where the hovered bucket timestamp exists in the other chart's own
data: a 10-second timestamp has no match in a 60-second series, so hovering
Concurrency drew nothing on Scheduling delay or Throttled. Measured before the
fix, hovering Concurrency reached 2 of the 4 other charts; now it reaches 4.
Every chart inside each ChartSyncProvider on the page therefore takes the same
floor, which is what the Queues list hero row already does. The gauges lose some
resolution (a max over a wider bucket is still the same kind of value) in
exchange for the crosshair working across the row.
Also: a chart whose every plotted value is null still had rows, so it reported
itself as having data while rendering its own no-data placeholder, leaving the
series legend stranded above it. Presence is now derived from the plotted values
rather than the row count.
Copy file name to clipboardExpand all lines: apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues_.$queueParam/route.tsx
query={`SELECT timeBucket() AS t,\n deltaSumTimestampMerge(enqueue_delta) AS enqueued,\n deltaSumTimestampMerge(started_delta) AS started\nFROM queue_metrics\nGROUP BY t\nORDER BY t`}
query={`SELECT timeBucket() AS t,\n round(quantilesMerge(0.5, 0.9, 0.95, 0.99)(wait_quantiles)[1]) AS p50,\n round(quantilesMerge(0.5, 0.9, 0.95, 0.99)(wait_quantiles)[3]) AS p95,\n round(quantilesMerge(0.5, 0.9, 0.95, 0.99)(wait_quantiles)[4]) AS p99,\n sum(wait_ms_count) AS samples\nFROM queue_metrics\nGROUP BY t\nORDER BY t`}
query={`SELECT timeBucket() AS t, max(max_queued) AS queued, max(max_running) AS running\nFROM queue_metrics_by_key\nWHERE ${pin}\nGROUP BY t\nORDER BY t`}
query={`SELECT timeBucket() AS t, if(sum(wait_ms_count) > 0, round(sum(wait_ms_sum) / sum(wait_ms_count)), 0) AS wait, sum(wait_ms_count) AS samples\nFROM queue_metrics_by_key\nWHERE ${pin}\nGROUP BY t\nORDER BY t`}
0 commit comments