-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(tracemetrics): Add initial dataset implementation to dashboards #104518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(tracemetrics): Add initial dataset implementation to dashboards #104518
Conversation
static/app/views/dashboards/widgetBuilder/utils/convertBuilderStateToWidget.ts
Show resolved
Hide resolved
static/app/views/dashboards/widgetBuilder/hooks/useWidgetBuilderState.tsx
Show resolved
Hide resolved
| } as QueryFieldValue) | ||
| : axis | ||
| ) ?? [], | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Undefined aggregate set when metric type unknown
When a metric has an unknown type not present in OPTIONS_BY_TYPE, the aggregateOptions array is empty. The useEffect at line 47 sets validAggregate = aggregateOptions[0]?.value, which evaluates to undefined for an empty array. This results in dispatching a function array with undefined as the aggregate name: [undefined, 'value', undefined, undefined]. When converted to a widget query string, this produces an invalid aggregate like undefined(value,...) that would cause backend errors or incorrect widget behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now we can assume the metric type exists and is compatible. We can follow up in a future PR about what to do when the type isn't compatible.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #104518 +/- ##
===========================================
- Coverage 80.51% 80.51% -0.01%
===========================================
Files 9347 9347
Lines 399873 399835 -38
Branches 25651 25640 -11
===========================================
- Hits 321962 321931 -31
+ Misses 77463 77456 -7
Partials 448 448 |
This begins adding the
traceMetricsdataset to Dashboards. This is still a WIP and different aspects of Metrics in dashboards still need iteration before being feature complete and releasable.The functionality captured here are:
The functionality that needs to be iterated on (i.e. not complete in this PR) are: