Skip to content

feat(tracemetrics): Show all attributes in group by for multi metrics#111012

Open
narsaynorath wants to merge 2 commits intomasterfrom
narsaynorath/logs-613-change-all-filters-and-group-bys-to-show-all-attributes
Open

feat(tracemetrics): Show all attributes in group by for multi metrics#111012
narsaynorath wants to merge 2 commits intomasterfrom
narsaynorath/logs-613-change-all-filters-and-group-bys-to-show-all-attributes

Conversation

@narsaynorath
Copy link
Member

When there are multiple metrics selected, remove the attribute filter from the config where we define properties to use for the trace item attributes request.

Ideally we only fetch the ones that are relevant but I'm not entirely sure the backend supports OR requests properly yet, so we're going to go easy and just fetch everything.

@linear-code
Copy link

linear-code bot commented Mar 18, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 18, 2026
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 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Missing guard on enabled when no metrics selected
    • Changed enabled from unconditional true to defined(traceMetrics[0]) to prevent unnecessary API calls when no metrics are selected.

Create PR

Or push these changes by commenting:

@cursor push 5ca0908349
Preview (5ca0908349)
diff --git a/static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderTraceItemConfig.ts b/static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderTraceItemConfig.ts
--- a/static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderTraceItemConfig.ts
+++ b/static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderTraceItemConfig.ts
@@ -47,7 +47,7 @@
 
     return {
       traceItemType: TraceItemDataset.TRACEMETRICS,
-      enabled: true,
+      enabled: defined(traceMetrics[0]),
       query:
         !hasMultipleMetrics && traceMetrics[0]
           ? createTraceMetricFilter(traceMetrics[0])

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

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