Fix regression in our ml usage collection (#81945)

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.
This commit is contained in:
Ryland Herrick 2020-10-28 17:20:55 -05:00 committed by GitHub
parent 271a799ef8
commit 91a84d5d0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
const fakeSOClient = {} as SavedObjectsClient;
const modules = await ml.modulesProvider(fakeRequest, fakeSOClient).listModules();