Skip to content

feat(insights): Add prebuilt dashboard rendering for queues landing page#109610

Open
DominikB2014 wants to merge 3 commits intomasterfrom
dominikbuszowiecki/browse-371-implement-basic-queues-module-as-dashboard
Open

feat(insights): Add prebuilt dashboard rendering for queues landing page#109610
DominikB2014 wants to merge 3 commits intomasterfrom
dominikbuszowiecki/browse-371-implement-basic-queues-module-as-dashboard

Conversation

@DominikB2014
Copy link
Contributor

@DominikB2014 DominikB2014 commented Feb 27, 2026

Adds support for rendering the queues prebuilt dashboard on the queues landing page when the insights-queue-dashboard-migration flag is enabled, following the same pattern as HTTP and database modules.

  • Adds useHasPlatformizedQueues hook that checks the insights-queue-dashboard-migration feature flag
  • Adds PlatformizedQueuesOverview component that renders the BACKEND_QUEUES prebuilt dashboard via PrebuiltDashboardRenderer
  • Updates PageWithProviders in the queues landing page to branch on the hook
image

@linear
Copy link

linear bot commented Feb 27, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 27, 2026
@DominikB2014
Copy link
Contributor Author

@cursor review

@DominikB2014 DominikB2014 marked this pull request as ready for review February 27, 2026 20:45
@DominikB2014 DominikB2014 requested a review from a team as a code owner February 27, 2026 20:45
Co-Authored-By: Claude <noreply@anthropic.com>
…ue summary dashboard

Co-Authored-By: Claude <noreply@anthropic.com>
Comment on lines +6 to +16
{
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})`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

fields: [
SpanFields.MESSAGING_MESSAGE_DESTINATION_NAME,
`avg(${SpanFields.MESSAGING_MESSAGE_RECEIVE_LATENCY})`,
`avg(${SpanFields.SPAN_DURATION})`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant