-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Metrics][Discover] Fix time range losing sync in metrics grid #243373
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
base: main
Are you sure you want to change the base?
[Metrics][Discover] Fix time range losing sync in metrics grid #243373
Conversation
|
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
💚 Build Succeeded
Metrics [docs]Async chunks
|
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.
Thanks for this PR @miloszmarcinkowski.
I'd like to propose a different approach.
From what I gathered, what’s happening here is that the Metrics Experience profile misses the fetch emissions that happen while the profile or component is still loading, which makes it not call updateTimeRange. That may be amplified by the fact that the component is lazy-loaded (just a guess).
We may be able to solve this on our end by ensuring that input$ calls updateTimeRange once when it first get subscribed, and making sure this is utilized by both metrics and traces or any other component exposed in the plugin.
I'm not sure whether this can be solved on Discover side, but it may also be worth investigating.
wdyt?
crespocarlos
left a comment
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.
See comment above
Summary
Closes #243167
The
getDataRangefunction doesn't properly propagate selected values when users switch from Classic to ESQL view in Discover. We switched over totimeRangeproperty provided by Discover plugin to solve this issue in the Metrics grid.Before:
Screen.Recording.2025-11-18.at.17.23.35.mov
After:
Screen.Recording.2025-11-18.at.16.21.51.mov
How to test:
TS metrics-*Last 15 minutesin the time range