Skip to content

Commit 71aa39d

Browse files
authored
Fix regression in our ml usage collection (#81945) (#81962)
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.
1 parent b252b56 commit 71aa39d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/plugins/security_solution/server/usage/detections/detections_helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export const getMlJobsUsage = async (ml: MlPluginSetup | undefined): Promise<MlJ
172172

173173
if (ml) {
174174
try {
175-
const fakeRequest = {} as KibanaRequest;
175+
const fakeRequest = { headers: {} } as KibanaRequest;
176176
const fakeSOClient = {} as SavedObjectsClient;
177177

178178
const modules = await ml.modulesProvider(fakeRequest, fakeSOClient).listModules();

0 commit comments

Comments
 (0)