ayush-sharaf opened a new issue, #42562:
URL: https://github.com/apache/superset/issues/42562

   ### Bug description
   
   Drill By is instrumented with four log events (added in #23854):
   
   - `drill_by_modal_opened`
   - `further_drill_by`
   - `drill_by_edit_chart`
   - `drill_by_breadcrumb_clicked`
   
   Its sibling feature, **Drill to Detail**, emits none. There is currently no 
way to tell from the `logs` table that a user opened Drill to Detail, or which 
chart they opened it from.
   
   It also cannot be reconstructed server-side. Opening the modal issues 
exactly one request, `POST /datasource/samples`. Its body is built by 
`getDrillPayload()` as `{granularity, time_range, filters, extras}`, and its 
query args are `datasource_type`, `datasource_id`, `dashboard_id`, `force`, 
`page`, `per_page` — none of which reference a chart. Because one dataset 
commonly backs many charts on the same dashboard, `datasource_id + 
dashboard_id` is not sufficient to identify the chart.
   
   `DatasetRestApi.get_drill_info` does write a log row, but it is not a drill 
signal: `useDatasetDrillInfo` prefetches it when the chart *renders* (gated 
only on `canDrillToDetail`), so it produces one row per dataset per dashboard 
load even when the user never drills, and its payload carries only `pk` (the 
dataset id) and `rison.dashboard_id`.
   
   ### How to reproduce
   
   1. Open a dashboard containing a chart built on a drillable dataset.
   2. Open the chart's ⋮ menu and click **Drill to detail**.
   3. Inspect the `logs` table (or the `/superset/log/` request payloads).
   
   ### Expected results
   
   A user event analogous to `drill_by_modal_opened`, carrying `slice_id`.
   
   ### Actual results
   
   No event is recorded for the drill itself. The only related rows are the 
`DatasetRestApi.get_drill_info` prefetch rows described above, which are 
emitted on render and identify a dataset rather than a chart.
   
   ### Environment
   
   - superset: `master` (also reproduces on 6.0.1)
   - browser: any
   
   ### Additional context
   
   `DrillDetailModal` already receives `chartId` as a prop and already resolves 
the chart name from `sliceEntities` in order to render its own modal title, so 
the information needed is present in the component.
   
   One implementation note: unlike `DrillByModal`, which mounts when it is 
opened, `DrillDetailModal` stays mounted for the lifetime of the chart and is 
toggled via its `showModal` prop, so the event needs to be gated on `showModal` 
rather than fired on mount.
   
   I have a patch for this and will open a PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to