Skip to content

Fix Query Trace Patterns tab showing empty (#168)#176

Merged
erikdarlingdata merged 1 commit intodevfrom
feature/query-trace-patterns-fix
Feb 19, 2026
Merged

Fix Query Trace Patterns tab showing empty (#168)#176
erikdarlingdata merged 1 commit intodevfrom
feature/query-trace-patterns-fix

Conversation

@erikdarlingdata
Copy link
Owner

Summary

  • Fixes the Query Trace Patterns tab showing empty despite data being available
  • Root cause: the report.long_running_query_patterns view aggregates ALL data across ALL time, takes TOP 50 by avg duration. Old load test patterns (high duration) dominate the top 50, and when the dashboard applies its time filter, all 50 rows are eliminated because they're older than the selected time range
  • Fix: inline the query in DatabaseService with the time filter inside the CTE, so aggregation only considers data within the selected time range
  • The second part of [BUG] Query Trace Patterns tab is empty; Trace Analysis tab is in wrong location #168 (Trace Analysis in wrong location) was already fixed in PR Move Default Trace tabs from Resource Metrics to Overview #175

Test plan

  • Launch Dashboard, navigate to Queries > Query Trace Patterns
  • Verify patterns appear when data exists in the selected time range
  • Verify time range changes filter patterns correctly

🤖 Generated with Claude Code

The view report.long_running_query_patterns aggregates ALL time then
takes TOP 50 by avg_duration_ms. When recent patterns are shorter than
old load test patterns, the dashboard's time filter eliminates all 50
rows. Fix by inlining the query with time filter inside the CTE so
aggregation only considers data within the selected time range.

The second part of #168 (Trace Analysis in wrong location) was already
fixed in PR #175.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit fe658a7 into dev Feb 19, 2026
3 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/query-trace-patterns-fix branch February 19, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant