Skip to content
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

[SLO] Fix bug with 'View events' feature to filter on group-by fields #178260

Conversation

simianhacker
Copy link
Member

Summary

This PR fixes #178231 by adding filters for the group by values. This also fixes a bug where the Discover time picker was missing due to the incompatible data view ID.

Testing

  1. Create an SLO (Custom KQL) with a group by (or multiple)
  2. Visit the SLO detail page
  3. Click on the "View events"

You should see filters for each of the group bys along with disabled filters for "Good events" and "Bad events"

@simianhacker simianhacker marked this pull request as ready for review March 7, 2024 20:07
@simianhacker simianhacker requested a review from a team as a code owner March 7, 2024 20:07
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@simianhacker simianhacker added release_note:skip Skip the PR/issue when compiling release notes Feature:SLO Team:obs-ux-management Observability Management User Experience Team v8.14.0 labels Mar 7, 2024
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

I somehow managed to navigate to the the parent SLO details page for an SLO with a group by (no instanceId in the URL state). I'm not sure how I managed to do that, but when clicking on the events, I ended up with this error. Is this something we want to account for.

Screenshot 2024-03-07 at 8 03 56 PM

@simianhacker
Copy link
Member Author

@dominiqueclarke You probably clicked on the SLO detail page when the SLO definition was in the no-data state before the instances were available. I added a check to ensure slo.groupings is not empty before adding the "group by" filters.

Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

LGTM!

@dominiqueclarke dominiqueclarke self-requested a review March 11, 2024 21:45
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observability 894.7KB 896.1KB +1.3KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@simianhacker simianhacker merged commit 04eabfc into elastic:main Mar 12, 2024
18 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Mar 12, 2024
alias: i18n.translate('xpack.observability.slo.sloDetails.totalFilterLabel', {
defaultMessage: 'Total events',
}),
value: JSON.stringify(customBadFilter),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the customBadFilter the value here?

simianhacker added a commit that referenced this pull request Mar 12, 2024
## Summary
This PR is a follow up to #178260, when we added the "Total events"
filter we forgot to update the value's text representation of the
`customTotalFilter`.
@simianhacker simianhacker deleted the issue-178231-slo-bug-fix-for-view-events branch April 17, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:SLO release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-management Observability Management User Experience Team v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SLO] View events on SLO Detail Page should include filter for the group by fields
6 participants