-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
fix(logging): Add logging of change_dashboard_filter event for native dashboard filters #26333
fix(logging): Add logging of change_dashboard_filter event for native dashboard filters #26333
Conversation
… dashboard filters
ba0450a
to
fb367d4
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #26333 +/- ##
==========================================
- Coverage 69.18% 69.18% -0.01%
==========================================
Files 1945 1945
Lines 75967 75969 +2
Branches 8467 8467
==========================================
+ Hits 52556 52557 +1
- Misses 21224 21225 +1
Partials 2187 2187
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -223,6 +225,7 @@ const FilterBar: React.FC<FiltersBarProps> = ({ | |||
}, [dashboardId, dataMaskAppliedText, history, updateKey, tabId]); | |||
|
|||
const handleApply = useCallback(() => { | |||
dispatch(logEvent(LOG_ACTIONS_CHANGE_DASHBOARD_FILTER, {})); |
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.
Maybe LOG_ACTIONS_CHANGE_DASHBOARD_FILTERS
(plural)?
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.
@michael-s-molina I though there was merit in keeping the action name the same for logging consistency.
Note that previously a single filter-box chart could actually have multiple filters so the singular term was also likely misleading then as well.
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.
LGTM. Left a non-blocking suggestion.
… dashboard filters (apache#26333) (cherry picked from commit 5f5a656)
… dashboard filters (apache#26333)
… dashboard filters (apache#26333)
SUMMARY
For filter-box charts whenever the chart filters are changed we log an event per the
LOG_ACTIONS_CHANGE_DASHBOARD_FILTER
action—containing the filter-box chart ID and the associated filtered dataset columns—which is useful for performance logging.The native dashboard filters log no such event and thus this PR simply logs the same action whenever anyone clicks the
APPLY FILTERS
button. I omitted both the chart ID and columns from the payload. The former is obsolete and the later is somewhat irrelevant as (unlike a filter-box chart) there are multiple datasets/columns impacted. Simply logging the event is suffice for tracking when the filters were updated resulting in a re-render of the dashboard.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
Verified the action was logged to the
logs
table when theAPPLY FILTERS
button was clicked:ADDITIONAL INFORMATION