feat(insights): Add prebuilt dashboard rendering for queues landing page#109610
feat(insights): Add prebuilt dashboard rendering for queues landing page#109610DominikB2014 wants to merge 3 commits intomasterfrom
Conversation
|
@cursor review |
static/app/views/dashboards/utils/prebuiltConfigs/queues/queueSummary.ts
Show resolved
Hide resolved
static/app/views/dashboards/utils/prebuiltConfigs/queues/queueSummary.ts
Outdated
Show resolved
Hide resolved
Co-Authored-By: Claude <noreply@anthropic.com>
static/app/views/dashboards/utils/prebuiltConfigs/queues/queueSummary.ts
Show resolved
Hide resolved
static/app/views/dashboards/utils/prebuiltConfigs/queues/queueSummary.ts
Outdated
Show resolved
Hide resolved
static/app/views/dashboards/utils/prebuiltConfigs/queues/queueSummary.ts
Show resolved
Hide resolved
…ue summary dashboard Co-Authored-By: Claude <noreply@anthropic.com>
| { | ||
| id: 'average-duration-widget', | ||
| title: t('Average Duration'), | ||
| displayType: DisplayType.AREA, | ||
| widgetType: WidgetType.SPANS, | ||
| interval: '5m', | ||
| queries: [ | ||
| { | ||
| name: '', | ||
| aggregates: [ | ||
| `avg(${SpanFields.MESSAGING_MESSAGE_RECEIVE_LATENCY})`, |
There was a problem hiding this comment.
Bug: The new AREA and LINE widgets in queueCharts.ts are missing the fields property. Other similar widgets in the codebase include fields that mirror aggregates.
Severity: MEDIUM
Suggested Fix
Add a fields property to both the average-duration-widget and throughput-widget in queueCharts.ts. The value of the fields array should be identical to the aggregates array to maintain consistency with other prebuilt chart widgets.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: static/app/views/dashboards/utils/prebuiltConfigs/queues/queueCharts.ts#L6-L16
Potential issue: The `average-duration-widget` and `throughput-widget` in
`queueCharts.ts` are defined with an `aggregates` property but lack a corresponding
`fields` property. While the `WidgetQuery` type defines `fields` as optional, a
consistent pattern across all other prebuilt AREA and LINE chart widgets in the codebase
is to include a `fields` array that mirrors the `aggregates` array. This inconsistency
could lead to runtime errors or incorrect rendering if the dashboard rendering logic
implicitly relies on the `fields` array, as the established pattern suggests it might.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| maxPickableDays={maxPickableDays.maxPickableDays} | ||
| > | ||
| <PrebuiltDashboardRenderer prebuiltId={PrebuiltDashboardId.BACKEND_QUEUES} /> | ||
| </ModulePageProviders> |
There was a problem hiding this comment.
Missing analytics event in platformized queues overview
Medium Severity
PlatformizedQueuesOverview does not pass analyticEventName to ModulePageProviders, so the "insight.page_loads.queue" analytics event won't fire when the migration flag is enabled. The non-platformized path passes analyticEventName="insight.page_loads.queue", and the analogous PlatformizedAssetsOverview correctly includes analyticEventName="insight.page_loads.assets". This silently drops page-load analytics tracking for all users with the flag on.
Additional Locations (1)
| fields: [ | ||
| SpanFields.MESSAGING_MESSAGE_DESTINATION_NAME, | ||
| `avg(${SpanFields.MESSAGING_MESSAGE_RECEIVE_LATENCY})`, | ||
| `avg(${SpanFields.SPAN_DURATION})`, |
There was a problem hiding this comment.
Destination table uses wrong aggregate for processing time
High Severity
The DESTINATION_TABLE uses avg(span.duration) for the column labeled "Avg processing time," but since the query condition includes both queue.publish and queue.process spans, this averages across both operation types. The original non-platformized table and the summary page's TRANSACTIONS_TABLE both correctly use avg_if(span.duration,span.op,equals,queue.process) to restrict the average to only processing spans. This will display incorrect, inflated or deflated values for "Avg processing time" in the destination table.


Adds support for rendering the queues prebuilt dashboard on the queues landing page when the
insights-queue-dashboard-migrationflag is enabled, following the same pattern as HTTP and database modules.useHasPlatformizedQueueshook that checks theinsights-queue-dashboard-migrationfeature flagPlatformizedQueuesOverviewcomponent that renders theBACKEND_QUEUESprebuilt dashboard viaPrebuiltDashboardRendererPageWithProvidersin the queues landing page to branch on the hook