diff --git a/x-pack/plugins/enterprise_search/server/collectors/app_search/telemetry.test.ts b/x-pack/plugins/enterprise_search/server/collectors/app_search/telemetry.test.ts index f6028284f3d0..144f22236ec4 100644 --- a/x-pack/plugins/enterprise_search/server/collectors/app_search/telemetry.test.ts +++ b/x-pack/plugins/enterprise_search/server/collectors/app_search/telemetry.test.ts @@ -48,7 +48,7 @@ describe('App Search Telemetry Usage Collector', () => { expect(registerStub).toHaveBeenCalledTimes(1); expect(makeUsageCollectorStub).toHaveBeenCalledTimes(1); - expect(makeUsageCollectorStub.mock.calls[0][0].type).toBe('app_search_kibana_telemetry'); + expect(makeUsageCollectorStub.mock.calls[0][0].type).toBe('app_search'); }); }); @@ -108,8 +108,8 @@ describe('App Search Telemetry Usage Collector', () => { }); expect(savedObjectsRepoStub.incrementCounter).toHaveBeenCalledWith( - 'app_search_kibana_telemetry', - 'app_search_kibana_telemetry', + 'app_search_telemetry', + 'app_search_telemetry', 'ui_clicked.button' ); expect(response).toEqual({ success: true }); diff --git a/x-pack/plugins/enterprise_search/server/collectors/app_search/telemetry.ts b/x-pack/plugins/enterprise_search/server/collectors/app_search/telemetry.ts index 302e9843488e..c95fc641144e 100644 --- a/x-pack/plugins/enterprise_search/server/collectors/app_search/telemetry.ts +++ b/x-pack/plugins/enterprise_search/server/collectors/app_search/telemetry.ts @@ -24,7 +24,7 @@ export const registerTelemetryUsageCollector = ({ savedObjects, }: Dependencies) => { const telemetryUsageCollector = usageCollection.makeUsageCollector({ - type: AS_TELEMETRY_NAME, + type: 'app_search', fetch: async () => fetchTelemetryMetrics(savedObjects), }); usageCollection.registerCollector(telemetryUsageCollector); diff --git a/x-pack/plugins/enterprise_search/server/saved_objects/app_search/telemetry.ts b/x-pack/plugins/enterprise_search/server/saved_objects/app_search/telemetry.ts index 614492bcf651..28f7d2b45b9f 100644 --- a/x-pack/plugins/enterprise_search/server/saved_objects/app_search/telemetry.ts +++ b/x-pack/plugins/enterprise_search/server/saved_objects/app_search/telemetry.ts @@ -6,7 +6,7 @@ import { SavedObjectsType } from 'src/core/server'; -export const AS_TELEMETRY_NAME = 'app_search_kibana_telemetry'; +export const AS_TELEMETRY_NAME = 'app_search_telemetry'; export interface ITelemetrySavedObject { ui_viewed: {