Skip to content

[9.2] [Metrics][Discover] Discover input$ observable emission lost fix (#241092)#241129

Merged
crespocarlos merged 1 commit intoelastic:9.2from
crespocarlos:backport/9.2/pr-241092
Oct 29, 2025
Merged

[9.2] [Metrics][Discover] Discover input$ observable emission lost fix (#241092)#241129
crespocarlos merged 1 commit intoelastic:9.2from
crespocarlos:backport/9.2/pr-241092

Conversation

@crespocarlos
Copy link
Contributor

@crespocarlos crespocarlos commented Oct 29, 2025

Backport

This will backport the following commits from main to 9.2:

Questions ?

Please refer to the Backport tool documentation

…stic#241092)

fixes [240429](elastic#240429)

## Summary

This PR fixes a bug where the Discover `input$` observable emissions
were not always captured by the Metrics Experience, depending on the
interval between the observable emission and the subscription in the
`use_lens_props` hook.

### Before

![obs-bug](https://github.com/user-attachments/assets/a45d26ec-c3ee-4f67-9484-fb5864f14b3c)

### After

![obs-fix](https://github.com/user-attachments/assets/0074ec26-f2b2-4535-847b-fff8a466fef5)

## How to test
- Start a local Kibana instance and point it to an oblt cluster - the
bug is more likely to occur when the performance is worse
```yml
feature_flags.overrides:
  metricsExperienceEnabled: true
 ```
- Navigate to Discover and Switch to ESQL mode
- Change the date picker to a range with no metrics data, then change it again to a range where metrics data is available.

(cherry picked from commit 2ad7f51)

# Conflicts:
#	src/platform/packages/shared/kbn-unified-metrics-grid/src/components/metrics_experience_grid.tsx
@crespocarlos crespocarlos added the backport This PR is a backport of another PR label Oct 29, 2025
@crespocarlos crespocarlos enabled auto-merge (squash) October 29, 2025 12:52
@crespocarlos crespocarlos merged commit 456fa3d into elastic:9.2 Oct 29, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants