Conversation
|
Pinging @elastic/kibana-platform (Team:Platform) |
src/core/public/kbn_bootstrap.ts
Outdated
| init(apmConfig); | ||
| let i18nError: Error | undefined; | ||
| try { | ||
| await i18n.load(injectedMetadata.i18n.translationsUrl); |
There was a problem hiding this comment.
we can run i18n and apm-agent loading in parallel, but I don't think an error during '@elastic/apm-rum' loading should lead to a global error as i18n does. btw should we mute an error for '@elastic/apm-rum' failed loading?
There was a problem hiding this comment.
Parallel makes sense 👍 Could we also call coreSystem.setup in parallel? I suspect there may be an implicit dependency that the i18n module is initialized before setup, so maybe not.
Agreed, any errors from APM configuration should not block starting up Kibana. I think logging a warning would be nice for debugging purposes.
There was a problem hiding this comment.
Parallel makes sense
@joshdover added. PTAL.
Could we also call coreSystem.setup in parallel
We shouldn't as we may want to instrument setup with apm agent.
| /** | ||
| * This is the entry point used to boot the frontend when serving a application | ||
| * that lives in the Kibana Platform. | ||
| * | ||
| * Any changes to this file should be kept in sync with | ||
| * src/legacy/ui/ui_bundles/app_entry_template.js | ||
| */ |
There was a problem hiding this comment.
I believe this comment can be deleted
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
async chunks size
distributable file count
page load bundle size
History
To update your PR or re-run it, just comment with: |
* load apm-agent-lazily * update docs * remove outdated comment * add test
* master: (97 commits) [Actions] Adds a "Test Connector" button on the Connectors List to make discovery of the Test tab easier (elastic#78746) [Discover] Fix functional time picker test permissions (elastic#78564) [ML] Fixing module datafeed overrides (elastic#78925) Adds some missing licenses to the CSV export (elastic#78719) [dev/cli] ensure plugins/ and all watch source dirs exist (elastic#78973) [Lens] Stop using scripted metric to collect telemetry (elastic#78687) [Lens] fix wrong message in fields accordion (elastic#78924) [Enterprise Search][App Search] Credentials Logic updates (elastic#78644) [Monitoring] Disk usage alerting (elastic#75419) [SECURITY_SOLUTION] Trusted apps list expand/collapse details (elastic#78601) Update content on interstitial page (elastic#78881) chore(NA): include hjson as a prod dependency (elastic#78941) Fix empty meta fields input in Advanced Settings (elastic#78576) [Lens] Maintain order of operations in dimension panel (elastic#78864) Fix plugin doc title (elastic#78880) load apm-rum agent lazily (elastic#78760) [ML] Skip full ML access permission test Optimize charts plugin (elastic#78922) ui_actions service initial docs (elastic#78902) skip failing suite (elastic#78942) ...
Summary
Platform inits
@elastic/apm-rumonly if apm agent is configured. We can load the library lazily only when necessary.Reduces the
core.entry.jsfile size from 790Kb to 611Kb.