From 1c787295b00715aff4b45c19fda4b8da881353d5 Mon Sep 17 00:00:00 2001 From: Rodney Norris Date: Tue, 17 Dec 2024 06:13:40 -0600 Subject: [PATCH] [Search] add telemetry saved objects to privileges (#204478) --- .../enterprise_search/server/plugin.ts | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/enterprise_search/server/plugin.ts b/x-pack/plugins/enterprise_search/server/plugin.ts index 9120db1b93ac1..0fbbc174c83db 100644 --- a/x-pack/plugins/enterprise_search/server/plugin.ts +++ b/x-pack/plugins/enterprise_search/server/plugin.ts @@ -58,10 +58,19 @@ import { databaseSearchGuideConfig, } from '../common/guided_onboarding/search_guide_config'; -import { registerTelemetryUsageCollector as registerASTelemetryUsageCollector } from './collectors/app_search/telemetry'; +import { + AS_TELEMETRY_NAME, + registerTelemetryUsageCollector as registerASTelemetryUsageCollector, +} from './collectors/app_search/telemetry'; import { registerTelemetryUsageCollector as registerCNTelemetryUsageCollector } from './collectors/connectors/telemetry'; -import { registerTelemetryUsageCollector as registerESTelemetryUsageCollector } from './collectors/enterprise_search/telemetry'; -import { registerTelemetryUsageCollector as registerWSTelemetryUsageCollector } from './collectors/workplace_search/telemetry'; +import { + ES_TELEMETRY_NAME, + registerTelemetryUsageCollector as registerESTelemetryUsageCollector, +} from './collectors/enterprise_search/telemetry'; +import { + WS_TELEMETRY_NAME, + registerTelemetryUsageCollector as registerWSTelemetryUsageCollector, +} from './collectors/workplace_search/telemetry'; import { registerEnterpriseSearchIntegrations } from './integrations'; import { entSearchHttpAgent } from './lib/enterprise_search_http_agent'; @@ -194,8 +203,8 @@ export class EnterpriseSearchPlugin implements Plugin { api: [], catalogue: PLUGIN_IDS, savedObject: { - all: [], - read: [], + all: [ES_TELEMETRY_NAME, AS_TELEMETRY_NAME, WS_TELEMETRY_NAME], + read: [ES_TELEMETRY_NAME, AS_TELEMETRY_NAME, WS_TELEMETRY_NAME], }, ui: [], },