-
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
[ObsUX][Profiling, Infra] Show "No Data" messages when there is no profiling data #173633
[ObsUX][Profiling, Infra] Show "No Data" messages when there is no profiling data #173633
Conversation
Documentation preview: |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
065791c
to
cd686fe
Compare
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
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.
LGTM
Hey! After watching the screen recording, I noticed that when switching tabs, the components re-render, but the date-picker remains unchanged. Are we re-fetching the data every time the components become visible? |
I took a look at this, and this is indeed happening. But, the response is cached by the browser. So even though it shows the loading spinner for a short amount of time, the response comes very fast compared with the first call that was not cached. |
Hey @crespocarlos! @cauemarcondes is correct, I've decided to rely on browser caching, in this case, to make the frontend implementation simpler. In order to do this in one of the previous PRs I've switched profiling endpoints to use GET and include a caching header. The flashing spinner is a bit annoying, but there are ways to mitigate it (like throttling the spinner visibility) if it becomes an issue. |
@elasticmachine merge upstream |
1 similar comment
@elasticmachine merge upstream |
Went digging on this topic a bit and turns out there is a Cache Storage API, never heard of it before. This could be another way to eliminate flashing spinners, we could use a custom cache for the requests and then check if a particular URL is already in the cache and decide whether to show the spinner. There are so many cool APIs in the browser these days 🤯 |
Nice! There's a bunch of new browser stuff I need to catch up on too. I'll have a look at the cache storage. Thanks for sharing it. Another alternative is to use react to cache the content as we did in Asset Details the tabbed content: https://github.com/elastic/kibana/blob/main/x-pack/plugins/infra/public/components/asset_details/content/content.tsx#L66 |
e90b153
to
0a62ffa
Compare
Just fyi, forced-push trying to unblock the CI, no code changes were made. But it seems like CI issue is not related to this PR and is a wider problem. |
Right, I considered caching rendered nodes at first, but then thought that the main bottleneck in this case is not actually rendering but the network, so tried to address it first. For now, it seems like it produces an acceptable result without any extra logic on the FE, kind of for free. |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
…ofiling data (elastic#173633) Closes elastic#173153 ## Summary Adds a message when there is no data for flamegraph or top functions. https://github.com/elastic/kibana/assets/793851/2a6158ca-86d3-4b23-9807-dc177ce0361b (cherry picked from commit 9215e17)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…en there is no profiling data (#173633) (#174163) # Backport This will backport the following commits from `main` to `8.12`: - [[ObsUX][Profiling, Infra] Show "No Data" messages when there is no profiling data (#173633)](#173633) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Mykola Harmash","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-01-03T13:13:09Z","message":"[ObsUX][Profiling, Infra] Show \"No Data\" messages when there is no profiling data (#173633)\n\nCloses https://github.com/elastic/kibana/issues/173153\r\n\r\n## Summary\r\n\r\nAdds a message when there is no data for flamegraph or top functions.\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/793851/2a6158ca-86d3-4b23-9807-dc177ce0361b","sha":"9215e17cb7c9ce49e7b9347ea578ec363d50dd8e","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v8.12.0","Team:obs-ux-infra_services","v8.13.0"],"title":"[ObsUX][Profiling, Infra] Show \"No Data\" messages when there is no profiling data","number":173633,"url":"https://github.com/elastic/kibana/pull/173633","mergeCommit":{"message":"[ObsUX][Profiling, Infra] Show \"No Data\" messages when there is no profiling data (#173633)\n\nCloses https://github.com/elastic/kibana/issues/173153\r\n\r\n## Summary\r\n\r\nAdds a message when there is no data for flamegraph or top functions.\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/793851/2a6158ca-86d3-4b23-9807-dc177ce0361b","sha":"9215e17cb7c9ce49e7b9347ea578ec363d50dd8e"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/173633","number":173633,"mergeCommit":{"message":"[ObsUX][Profiling, Infra] Show \"No Data\" messages when there is no profiling data (#173633)\n\nCloses https://github.com/elastic/kibana/issues/173153\r\n\r\n## Summary\r\n\r\nAdds a message when there is no data for flamegraph or top functions.\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/793851/2a6158ca-86d3-4b23-9807-dc177ce0361b","sha":"9215e17cb7c9ce49e7b9347ea578ec363d50dd8e"}}]}] BACKPORT--> Co-authored-by: Mykola Harmash <[email protected]>
Closes #173153
Summary
Adds a message when there is no data for flamegraph or top functions.
CleanShot.2023-12-19.at.15.05.04.mp4