-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Conversation
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.
@@ -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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this part need to be fixed as well?
https://github.com/elastic/kibana/blob/master/x-pack/plugins/security_solution/server/lib/detection_engine/signals/signal_rule_alert_type.ts#L212
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
💚 Build SucceededMetrics [docs]
To update your PR or re-run it, just comment with: |
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.
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.
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.
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