-
Notifications
You must be signed in to change notification settings - Fork 8.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
[OneDiscover] Add EBT event to track field usage #193996
Conversation
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
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.
Code changes look good and it works well, thanks! I think it would also be a good idea for us to start documenting some of this new telemetry soon for future reference.
}); | ||
}; | ||
|
||
private registerEmbeddable(core: CoreSetup<DiscoverStartPlugins>, plugins: DiscoverSetupPlugins) { | ||
const ebtManager = new DiscoverEBTManager(); // It is not initialized outside of Discover |
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.
We may want to consider also tracking the custom events in embeddables too since we don't have the same issue as we do with context. We can discuss first and do it as a followup though if we decide to.
…usage # Conflicts: # src/plugins/discover/public/plugin.tsx
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @jughosta |
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11110144397 |
- Closes elastic#186156 - Closes elastic#189454 ## Summary This PR adds new EBT event type `discover_field_usage` which we use for tracking adding and removing grid columns and adding filters via +/-/exists buttons. Properties of the added events consist of: `eventType`: `dataTableSelection`, `dataTableRemoval`, or `filterAddition` `fieldName`: name of the field if it's from ECS schema `filterOperation`: `+`, `-`, or `_exists_` <img width="1002" alt="Screenshot 2024-09-25 at 17 51 27" src="https://github.com/user-attachments/assets/b3f3fb69-55e1-43b2-9683-a6d8884f56fe"> ## Testing Enable "Usage collection" global setting. Navigate to Discover and observe `kibana-browser` requests in Network tab. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 7aa64b6)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…4457) # Backport This will backport the following commits from `main` to `8.x`: - [[OneDiscover] Add EBT event to track field usage (#193996)](#193996) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-30T16:20:21Z","message":"[OneDiscover] Add EBT event to track field usage (#193996)\n\n- Closes https://github.com/elastic/kibana/issues/186156\r\n- Closes https://github.com/elastic/kibana/issues/189454\r\n\r\n## Summary\r\n\r\nThis PR adds new EBT event type `discover_field_usage` which we use for\r\ntracking adding and removing grid columns and adding filters via\r\n+/-/exists buttons. Properties of the added events consist of:\r\n\r\n`eventType`: `dataTableSelection`, `dataTableRemoval`, or\r\n`filterAddition`\r\n`fieldName`: name of the field if it's from ECS schema\r\n`filterOperation`: `+`, `-`, or `_exists_`\r\n\r\n\r\n<img width=\"1002\" alt=\"Screenshot 2024-09-25 at 17 51 27\"\r\nsrc=\"https://github.com/user-attachments/assets/b3f3fb69-55e1-43b2-9683-a6d8884f56fe\">\r\n\r\n## Testing\r\n\r\nEnable \"Usage collection\" global setting.\r\n\r\nNavigate to Discover and observe `kibana-browser` requests in Network\r\ntab.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"7aa64b6ed59488ab10a5136199b69de0c86668af","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor","Project:OneDiscover"],"title":"[OneDiscover] Add EBT event to track field usage","number":193996,"url":"https://github.com/elastic/kibana/pull/193996","mergeCommit":{"message":"[OneDiscover] Add EBT event to track field usage (#193996)\n\n- Closes https://github.com/elastic/kibana/issues/186156\r\n- Closes https://github.com/elastic/kibana/issues/189454\r\n\r\n## Summary\r\n\r\nThis PR adds new EBT event type `discover_field_usage` which we use for\r\ntracking adding and removing grid columns and adding filters via\r\n+/-/exists buttons. Properties of the added events consist of:\r\n\r\n`eventType`: `dataTableSelection`, `dataTableRemoval`, or\r\n`filterAddition`\r\n`fieldName`: name of the field if it's from ECS schema\r\n`filterOperation`: `+`, `-`, or `_exists_`\r\n\r\n\r\n<img width=\"1002\" alt=\"Screenshot 2024-09-25 at 17 51 27\"\r\nsrc=\"https://github.com/user-attachments/assets/b3f3fb69-55e1-43b2-9683-a6d8884f56fe\">\r\n\r\n## Testing\r\n\r\nEnable \"Usage collection\" global setting.\r\n\r\nNavigate to Discover and observe `kibana-browser` requests in Network\r\ntab.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"7aa64b6ed59488ab10a5136199b69de0c86668af"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193996","number":193996,"mergeCommit":{"message":"[OneDiscover] Add EBT event to track field usage (#193996)\n\n- Closes https://github.com/elastic/kibana/issues/186156\r\n- Closes https://github.com/elastic/kibana/issues/189454\r\n\r\n## Summary\r\n\r\nThis PR adds new EBT event type `discover_field_usage` which we use for\r\ntracking adding and removing grid columns and adding filters via\r\n+/-/exists buttons. Properties of the added events consist of:\r\n\r\n`eventType`: `dataTableSelection`, `dataTableRemoval`, or\r\n`filterAddition`\r\n`fieldName`: name of the field if it's from ECS schema\r\n`filterOperation`: `+`, `-`, or `_exists_`\r\n\r\n\r\n<img width=\"1002\" alt=\"Screenshot 2024-09-25 at 17 51 27\"\r\nsrc=\"https://github.com/user-attachments/assets/b3f3fb69-55e1-43b2-9683-a6d8884f56fe\">\r\n\r\n## Testing\r\n\r\nEnable \"Usage collection\" global setting.\r\n\r\nNavigate to Discover and observe `kibana-browser` requests in Network\r\ntab.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"7aa64b6ed59488ab10a5136199b69de0c86668af"}}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <[email protected]>
Summary
This PR adds new EBT event type
discover_field_usage
which we use for tracking adding and removing grid columns and adding filters via +/-/exists buttons. Properties of the added events consist of:eventType
:dataTableSelection
,dataTableRemoval
, orfilterAddition
fieldName
: name of the field if it's from ECS schemafilterOperation
:+
,-
, or_exists_
Testing
Enable "Usage collection" global setting.
Navigate to Discover and observe
kibana-browser
requests in Network tab.Checklist