diff --git a/frontend/packages/console-dynamic-plugin-sdk/src/api/segment-analytics.ts b/frontend/packages/console-dynamic-plugin-sdk/src/api/segment-analytics.ts index 49298112c2d..88bdeb3dec0 100644 --- a/frontend/packages/console-dynamic-plugin-sdk/src/api/segment-analytics.ts +++ b/frontend/packages/console-dynamic-plugin-sdk/src/api/segment-analytics.ts @@ -114,7 +114,13 @@ if (!SAMPLE_SESSION) { console.debug('Analytics session is not being sampled, telemetry events will be ignored'); } -const analyticsEnabled = !TELEMETRY_DISABLED && SAMPLE_SESSION; +if (!window.SERVER_FLAGS.releaseVersion) { + // eslint-disable-next-line no-console + console.debug('No release version set, telemetry events will be ignored'); +} + +const analyticsEnabled = + !TELEMETRY_DISABLED && SAMPLE_SESSION && !!window.SERVER_FLAGS.releaseVersion; // Initialize Segment Analytics as soon as possible, outside of React useEffect. // This ensures that analytics.load method is invoked before any other methods. diff --git a/frontend/packages/console-shared/src/hooks/useTelemetry.ts b/frontend/packages/console-shared/src/hooks/useTelemetry.ts index dcd70902066..3daec03a20b 100644 --- a/frontend/packages/console-shared/src/hooks/useTelemetry.ts +++ b/frontend/packages/console-shared/src/hooks/useTelemetry.ts @@ -46,9 +46,7 @@ export const getClusterProperties = () => { ) { clusterProperties.clusterType = 'DEVSANDBOX'; } - // Prefer to report the OCP version (releaseVersion) if available. - clusterProperties.consoleVersion = - window.SERVER_FLAGS.releaseVersion || window.SERVER_FLAGS.consoleVersion; + clusterProperties.consoleVersion = window.SERVER_FLAGS.releaseVersion; clusterProperties.organizationId = window.SERVER_FLAGS.telemetry?.ORGANIZATION_ID; clusterProperties.accountMail = window.SERVER_FLAGS.telemetry?.ACCOUNT_MAIL; return clusterProperties;