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

[Security Solution][Detections] Fix error causing ml rules telemetry to be discarded #81945

Merged
merged 1 commit into from
Oct 28, 2020

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Oct 28, 2020

A regression was introduced in #74965 that caused an error to be thrown while collecting telemetry on ML jobs. Because such exceptions are caught and we degrade to zeroing out those counts, this one was not caught until manual testing of telemetry.

For maintainers

A regression was introduced in elastic#74965 that caused an error to be
thrown while collecting telemetry on ML jobs. Because such exceptions
are caught and we degrade to zeroing out those counts, this one was not
caught until manual testing of telemetry.
@rylnd rylnd added bug Fixes for quality problems that affect the customer experience v8.0.0 v7.10.0 Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. labels Oct 28, 2020
@rylnd rylnd requested review from a team as code owners October 28, 2020 19:28
@rylnd rylnd added the release_note:skip Skip the PR/issue when compiling release notes label Oct 28, 2020
@rylnd rylnd mentioned this pull request Oct 28, 2020
3 tasks
@rylnd rylnd changed the title [Security Solution][Detections] Fix error causing ml rules telemetry to be discounted [Security Solution][Detections] Fix error causing ml rules telemetry to be discarded Oct 28, 2020
@@ -172,7 +172,7 @@ export const getMlJobsUsage = async (ml: MlPluginSetup | undefined): Promise<MlJ

if (ml) {
try {
const fakeRequest = {} as KibanaRequest;
const fakeRequest = { headers: {} } as KibanaRequest;
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question! For now, it's only the modulesProvider that performs the additional headers check, the jobsProvider (and thus ML Rule execution) continues to function as expected.

Copy link
Contributor

@FrankHassanabad FrankHassanabad left a comment

Choose a reason for hiding this comment

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

Took a look and it looks simple enough, just one question.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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

@rylnd rylnd merged commit 91a84d5 into elastic:master Oct 28, 2020
@rylnd rylnd deleted the fix_ml_telemetry branch October 28, 2020 22:20
rylnd added a commit to rylnd/kibana that referenced this pull request Oct 28, 2020
A regression was introduced in elastic#74965 that caused an error to be
thrown while collecting telemetry on ML jobs. Because such exceptions
are caught and we degrade to zeroing out those counts, this one was not
caught until manual testing of telemetry.
@rylnd rylnd added the v7.11.0 label Oct 28, 2020
rylnd added a commit that referenced this pull request Oct 29, 2020
A regression was introduced in #74965 that caused an error to be
thrown while collecting telemetry on ML jobs. Because such exceptions
are caught and we degrade to zeroing out those counts, this one was not
caught until manual testing of telemetry.
rylnd added a commit that referenced this pull request Oct 29, 2020
A regression was introduced in #74965 that caused an error to be
thrown while collecting telemetry on ML jobs. Because such exceptions
are caught and we degrade to zeroing out those counts, this one was not
caught until manual testing of telemetry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.10.0 v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants