Skip to content
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

[Discover] Report kibana:plugin_render_time metric event #194754

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

jughosta
Copy link
Contributor

@jughosta jughosta commented Oct 2, 2024

Summary

This PR adds kibana:plugin_render_time EBT performance event to Discover plugin. It will be fired when user navigates to one of Discover main views:

  • Discover Documents tab (when the first data grid row is rendered)
  • Single Doc page (when tabs are rendered)
  • Surrounding Docs page (when the first data grid row is rendered)

If the initial page was something else (like error, no data view, Field Statistics tab, etc), then it would report it too and we skip any further tracking as it would not report the correct time between the page visit and getting to the main content. Also navigation between Discover routes will not trigger the event.

Testing

Enable "Usage collection" global setting.

Navigate to Discover and observe kibana-browser requests in Network tab. It will be one of performance_metric event.

To enable logging, add the following to your kibana.dev.yml:

# Configure Analytics (EBT) Logs
logging.loggers:
  - name: analytics
    level: debug

logging.browser.loggers:
  - name: analytics
    level: debug

Checklist

@jughosta jughosta added release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Project:OneDiscover Enrich Discover with contextual awareness / Merge with Logs Explorer labels Oct 2, 2024
@jughosta jughosta self-assigned this Oct 2, 2024
@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 2, 2024

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!

@kibana-ci
Copy link
Collaborator

kibana-ci commented Oct 7, 2024

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #18 / discover/ccs_compatible saved queries saved objects saved query selection should unselect saved query when navigating to a 'new'
  • [job] [logs] FTR Configs #37 / discover/ccs_compatible saved queries saved objects saved query selection should unselect saved query when navigating to a 'new'
  • [job] [logs] FTR Configs #18 / discover/ccs_compatible saved queries saved objects saved query selection should unselect saved query when navigating to a 'new'
  • [job] [logs] FTR Configs #37 / discover/ccs_compatible saved queries saved objects saved query selection should unselect saved query when navigating to a 'new'
  • [job] [logs] FTR Configs #57 / discover/classic discover doc table legacy expand a document row should show allow toggling columns from the expanded document
  • [job] [logs] FTR Configs #57 / discover/classic discover doc table legacy expand a document row should show allow toggling columns from the expanded document
  • [job] [logs] FTR Configs #8 / discover/context_awareness extension getDefaultAppState ES|QL mode should reset default columns and row height when clicking "New"
  • [job] [logs] FTR Configs #18 / discover/context_awareness extension getDefaultAppState ES|QL mode should reset default columns and row height when clicking "New"
  • [job] [logs] FTR Configs #29 / discover/context_awareness extension getDefaultAppState ES|QL mode should reset default columns and row height when clicking "New"
  • [job] [logs] FTR Configs #99 / discover/context_awareness extension getDefaultAppState ES|QL mode should reset default columns and row height when clicking "New"
  • [job] [logs] FTR Configs #18 / discover/context_awareness extension getDefaultAppState ES|QL mode should reset default columns and row height when clicking "New"
  • [job] [logs] FTR Configs #29 / discover/context_awareness extension getDefaultAppState ES|QL mode should reset default columns and row height when clicking "New"
  • [job] [logs] FTR Configs #8 / discover/context_awareness extension getDefaultAppState ES|QL mode should reset default columns and row height when clicking "New"
  • [job] [logs] FTR Configs #99 / discover/context_awareness extension getDocViewer data view mode should not render logs overview tab for non-logs data source
  • [job] [logs] FTR Configs #81 / discover/esql discover esql columns should render initial columns for non-transformational commands correctly
  • [job] [logs] FTR Configs #81 / discover/esql discover esql columns should render initial columns for non-transformational commands correctly
  • [job] [logs] FTR Configs #7 / discover/group7 discover new search action should work correctly for data view mode
  • [job] [logs] FTR Configs #7 / discover/group7 discover new search action should work correctly for data view mode

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
discover 991 993 +2

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/ebt-tools 28 29 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cloudSecurityPosture 507.6KB 507.8KB +205.0B
discover 820.0KB 820.8KB +786.0B
esqlDataGrid 154.1KB 154.3KB +205.0B
securitySolution 20.6MB 20.6MB +1.0KB
slo 855.4KB 855.6KB +205.0B
unifiedDocViewer 125.8KB 125.9KB +116.0B
total +2.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
discover 50.6KB 50.9KB +352.0B
kbnUiSharedDeps-srcJs 3.4MB 3.4MB +50.0B
total +402.0B
Unknown metric groups

API count

id before after diff
@kbn/ebt-tools 37 38 +1
@kbn/unified-data-table 183 184 +1
total +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jughosta

@jughosta
Copy link
Contributor Author

jughosta commented Oct 7, 2024

Blocked by #195264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Project:OneDiscover Enrich Discover with contextual awareness / Merge with Logs Explorer release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Discover] Report kibana:plugin_render_time metric event.
3 participants