Skip to content

[ResponseOps] Lazy load dataViews and wrappedSearchSourceClient services when running alerting rules#189929

Merged
doakalexi merged 13 commits intoelastic:mainfrom
doakalexi:alerting/lazy-load-dataviews-searchsource
Aug 19, 2024
Merged

[ResponseOps] Lazy load dataViews and wrappedSearchSourceClient services when running alerting rules#189929
doakalexi merged 13 commits intoelastic:mainfrom
doakalexi:alerting/lazy-load-dataviews-searchsource

Conversation

@doakalexi
Copy link
Copy Markdown
Contributor

@doakalexi doakalexi commented Aug 5, 2024

Resolves #184322

Summary

This PR updates getExecutorServices to allow alerting rules to only load the dataViews and wrappedSearchSourceClient services when needed. I updated the rule types dependent on dataViews and/or wrappedSearchSourceClient.

Checklist

To verify

  • Verify that the dataviews and searchsource are only loaded when needed. I think the best way to verify this is create an Index threshold rule and make sure that the dataViews and searchSourceClient services are not created.
  • Verify that the updated rules work correctly. I updated the following rule types:
    Custom threshold
    SLO burn rate
    ES query
    Indicator match

@doakalexi
Copy link
Copy Markdown
Contributor Author

/ci

@doakalexi
Copy link
Copy Markdown
Contributor Author

/ci

@doakalexi
Copy link
Copy Markdown
Contributor Author

/ci

…m:doakalexi/kibana into alerting/lazy-load-dataviews-searchsource
@doakalexi
Copy link
Copy Markdown
Contributor Author

/ci

@doakalexi
Copy link
Copy Markdown
Contributor Author

/ci

…m:doakalexi/kibana into alerting/lazy-load-dataviews-searchsource
@doakalexi
Copy link
Copy Markdown
Contributor Author

/ci

@doakalexi doakalexi changed the title Lazy load the dataviews and search source [ResponseOps] Lazy load dataViews and wrappedSearchSourceClient services when running alerting rules Aug 7, 2024
@doakalexi doakalexi added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.16.0 labels Aug 8, 2024
@doakalexi doakalexi marked this pull request as ready for review August 8, 2024 17:52
@doakalexi doakalexi requested review from a team as code owners August 8, 2024 17:52
@doakalexi doakalexi requested a review from nkhristinin August 8, 2024 17:52
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@doakalexi doakalexi requested review from adcoelho and ymao1 August 8, 2024 17:53
Copy link
Copy Markdown
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.

Obs ux management changes LGTM.

@botelastic botelastic Bot added the ci:project-deploy-observability Create an Observability project label Aug 9, 2024
@botelastic botelastic Bot added the Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. label Aug 9, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

@nkhristinin nkhristinin left a comment

Choose a reason for hiding this comment

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

DE changes LGTM

Copy link
Copy Markdown
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

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

LGTM! Verified that all the impacted rule types ran and generated alerts. Looked at the APM transactions and saw the decrease in transaction latency! 🎉

Before:
Screenshot 2024-08-19 at 1 29 21 PM

After:
Screenshot 2024-08-19 at 1 29 42 PM

Interesting that the ES query latency improved as well even though it is still calling both functions.

@doakalexi doakalexi enabled auto-merge (squash) August 19, 2024 17:39
@kibana-ci
Copy link
Copy Markdown

kibana-ci commented Aug 19, 2024

💚 Build Succeeded

  • Buildkite Build
  • Commit: dc60120
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-189929-dc60120f69dc

Metrics [docs]

✅ unchanged

History

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

@doakalexi doakalexi merged commit cbaa3a8 into elastic:main Aug 19, 2024
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lazy load dataViews and wrappedSearchSourceClient services when running alerting rules

7 participants