[Perfomance] Add is_initial_load meta#206645
Conversation
afharo
left a comment
There was a problem hiding this comment.
Approving from the Core POV because a Set is better than a string[].
I added a comment because I'd love to understand what we're trying to track here.
...m/packages/shared/kbn-ebt-tools/src/performance_metrics/context/measure_interaction/index.ts
Outdated
Show resolved
Hide resolved
maryam-saeidi
left a comment
There was a problem hiding this comment.
Awesome! 🥇
Do we also have a way to distinguish whether the event was related to a page load via inside Kibana navigation or the initial load of Kibana?
with the current implementation we don't have a way to distinguish this. There is another EBT metric, kibana_started, which we might be able to correlate with these two events using their timestamps. However, this would require additional analysis work. |
awahab07
left a comment
There was a problem hiding this comment.
is_initial_load changes with date change because selected time range is persisted via URL state. Also, URL could change even against UI actions which do not cause a data reload.
206645-initial-load-meta-url-issue.mov
See if extracting the plugin url or using pathname is better suited here instead of the full url.
Thanks, I will take a look |
|
I discovered a bug while addressing the issue Abdul mentioned. The initial marker isn't removed when the page is refreshed, causing it to report an incorrect duration. |
|
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
|
Since I found the bug, I refactored and updated the code. I'm requesting another review. 🙏 |
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
|
awahab07
left a comment
There was a problem hiding this comment.
LGTM!
Thanks for adding the prop.
|
Starting backport for target branches: 9.0 https://github.com/elastic/kibana/actions/runs/13528675783 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
closes elastic/observability-dev#4185 ## Summary This PR adds the `is_initial_load` parameter to the meta field to distinguish whether the `onPageReady` trigger occurs during the initial load or a page refresh. Refactoring: - Removed the `target` field. as `context.pageName` now provides the necessary information - Refactor APM instrumentation to simplify it Fixes: - elastic/observability-dev#3464 ###⚠️ Instrumentation The plugins need to call the following function: ``` onPageRefreshStart()``` This method adds a performance marker `start::pageRefresh` to indicate when a page refresh begins. This marker is used along with an end marker `end::pageReady` to determine the total refresh duration. https://github.com/user-attachments/assets/62587d18-b33e-437b-9774-d8e196dbf764 https://github.com/user-attachments/assets/e9c9a761-57bc-4743-9cc7-ea7634696ee3 ### How to test - Checkout the PR - make sure you run `yarn kbn bootstrap` - go to any page that has onPageReady function instrumented (ex services) ### TODO - Once approved, update docs --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
closes elastic/observability-dev#4185 ## Summary This PR adds the `is_initial_load` parameter to the meta field to distinguish whether the `onPageReady` trigger occurs during the initial load or a page refresh. Refactoring: - Removed the `target` field. as `context.pageName` now provides the necessary information - Refactor APM instrumentation to simplify it Fixes: - elastic/observability-dev#3464 ###⚠️ Instrumentation The plugins need to call the following function: ``` onPageRefreshStart()``` This method adds a performance marker `start::pageRefresh` to indicate when a page refresh begins. This marker is used along with an end marker `end::pageReady` to determine the total refresh duration. https://github.com/user-attachments/assets/62587d18-b33e-437b-9774-d8e196dbf764 https://github.com/user-attachments/assets/e9c9a761-57bc-4743-9cc7-ea7634696ee3 ### How to test - Checkout the PR - make sure you run `yarn kbn bootstrap` - go to any page that has onPageReady function instrumented (ex services) ### TODO - Once approved, update docs --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
closes https://github.com/elastic/observability-dev/issues/4185
Summary
This PR adds the
is_initial_loadparameter to the meta field to distinguish whether theonPageReadytrigger occurs during the initial load or a page refresh.Refactoring:
targetfield. ascontext.pageNamenow provides the necessary informationFixes:
The plugins need to call the following function:
onPageRefreshStart()This method adds a performance marker
start::pageRefreshto indicate when a page refresh begins. This marker is used along with an end markerend::pageReadyto determine the total refresh duration.Screen.Recording.2025-02-14.at.12.39.54.PM.mov
Screen.Recording.2025-02-14.at.12.43.29.PM.mov
How to test
yarn kbn bootstrapTODO