Skip to content

[Metrics][Discover] Discover input$ observable emission lost fix#241092

Merged
crespocarlos merged 1 commit intoelastic:mainfrom
crespocarlos:240429-discover-input-observable-emission-lost-fix
Oct 29, 2025
Merged

[Metrics][Discover] Discover input$ observable emission lost fix#241092
crespocarlos merged 1 commit intoelastic:mainfrom
crespocarlos:240429-discover-input-observable-emission-lost-fix

Conversation

@crespocarlos
Copy link
Contributor

@crespocarlos crespocarlos commented Oct 29, 2025

fixes 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

After

obs-fix

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
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.

@crespocarlos crespocarlos added release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. backport:version Backport to applied version labels v9.2.0 v9.3.0 labels Oct 29, 2025
@crespocarlos crespocarlos marked this pull request as ready for review October 29, 2025 10:10
@crespocarlos crespocarlos requested a review from a team October 29, 2025 10:10
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@jennypavlova jennypavlova self-requested a review October 29, 2025 10:41
Copy link
Contributor

@miloszmarcinkowski miloszmarcinkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review only, LGTM!

Copy link
Member

@jennypavlova jennypavlova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀 I wasn't able to reproduce the issue connecting to edge edot 🎉
Thanks for fixing that!

@crespocarlos crespocarlos enabled auto-merge (squash) October 29, 2025 11:24
@crespocarlos crespocarlos merged commit 2ad7f51 into elastic:main Oct 29, 2025
27 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 9.2

https://github.com/elastic/kibana/actions/runs/18907163096

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
9.2 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 241092

Questions ?

Please refer to the Backport tool documentation

tkajtoch pushed a commit to tkajtoch/kibana that referenced this pull request Oct 29, 2025
…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.
@crespocarlos
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.2

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

crespocarlos added a commit to crespocarlos/kibana that referenced this pull request Oct 29, 2025
…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 added a commit that referenced this pull request Oct 29, 2025
#241092) (#241129)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Metrics][Discover] Discover input$ observable emission lost fix
(#241092)](#241092)

<!--- Backport version: 10.1.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"crespocarlos@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-10-29T12:01:59Z","message":"[Metrics][Discover]
Discover input$ observable emission lost fix (#241092)\n\nfixes
[240429](https://github.com/elastic/kibana/issues/240429)\n\n##
Summary\n\nThis PR fixes a bug where the Discover `input# Backport

This will backport the following commits from `main` to `9.2`:
{{{{raw}}}} - [[Metrics][Discover] Discover input$ observable emission
lost fix
(#241092)](https://github.com/elastic/kibana/pull/241092){{{{/raw}}}}
qn895 pushed a commit to qn895/kibana that referenced this pull request Oct 30, 2025
…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.
ana-davydova pushed a commit to ana-davydova/kibana that referenced this pull request Nov 3, 2025
…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.
albertoblaz pushed a commit to albertoblaz/kibana that referenced this pull request Nov 4, 2025
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. v9.2.0 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Metrics][Discover] Charts loading with no data unless you click refresh

5 participants