diff --git a/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts b/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts index 387a60e625..56149a1e9e 100644 --- a/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts +++ b/packages/cli/src/events/__tests__/telemetry-event-relay.test.ts @@ -20,7 +20,22 @@ const flushPromises = async () => await new Promise((resolve) => setImmediate(re describe('TelemetryEventRelay', () => { const telemetry = mock(); const license = mock(); - const globalConfig = mock({ userManagement: { emails: { mode: 'smtp' } } }); + const globalConfig = mock({ + userManagement: { + emails: { + mode: 'smtp', + }, + }, + endpoints: { + metrics: { + enable: true, + includeDefaultMetrics: true, + includeApiEndpoints: false, + includeCacheMetrics: false, + includeMessageEventBusMetrics: false, + }, + }, + }); const workflowRepository = mock(); const nodeTypes = mock(); const sharedWorkflowRepository = mock(); @@ -927,6 +942,13 @@ describe('TelemetryEventRelay', () => { 'Instance started', expect.objectContaining({ earliest_workflow_created: firstWorkflow.createdAt, + metrics: { + metrics_enabled: true, + metrics_category_default: true, + metrics_category_routes: false, + metrics_category_cache: false, + metrics_category_logs: false, + }, }), ); }); diff --git a/packages/cli/src/events/telemetry-event-relay.ts b/packages/cli/src/events/telemetry-event-relay.ts index 6b0ae37a44..d09481f911 100644 --- a/packages/cli/src/events/telemetry-event-relay.ts +++ b/packages/cli/src/events/telemetry-event-relay.ts @@ -762,6 +762,13 @@ export class TelemetryEventRelay extends EventRelay { license_tenant_id: config.getEnv('license.tenantId'), binary_data_s3: isS3Available && isS3Selected && isS3Licensed, multi_main_setup_enabled: config.getEnv('multiMainSetup.enabled'), + metrics: { + metrics_enabled: this.globalConfig.endpoints.metrics.enable, + metrics_category_default: this.globalConfig.endpoints.metrics.includeDefaultMetrics, + metrics_category_routes: this.globalConfig.endpoints.metrics.includeApiEndpoints, + metrics_category_cache: this.globalConfig.endpoints.metrics.includeCacheMetrics, + metrics_category_logs: this.globalConfig.endpoints.metrics.includeMessageEventBusMetrics, + }, }; const firstWorkflow = await this.workflowRepository.findOne({