diff --git a/plugin-server/src/config/config.ts b/plugin-server/src/config/config.ts index a2a6bb6cbbf6e..c1643247ea839 100644 --- a/plugin-server/src/config/config.ts +++ b/plugin-server/src/config/config.ts @@ -155,8 +155,7 @@ export function getDefaultConfig(): PluginsServerConfig { SESSION_RECORDING_PARALLEL_CONSUMPTION: false, POSTHOG_SESSION_RECORDING_REDIS_HOST: undefined, POSTHOG_SESSION_RECORDING_REDIS_PORT: undefined, - // by default a very restricted list of teams, so we can slowly roll out - MAX_TEAM_TO_ALLOW_SESSION_RECORDING_CONSOLE_LOGS_INGESTION: 2, + SESSION_RECORDING_CONSOLE_LOGS_INGESTION_ENABLED: true, } } diff --git a/plugin-server/src/main/ingestion-queues/session-recording/services/console-logs-ingester.ts b/plugin-server/src/main/ingestion-queues/session-recording/services/console-logs-ingester.ts index 4234637b8b68b..9356582f4a277 100644 --- a/plugin-server/src/main/ingestion-queues/session-recording/services/console-logs-ingester.ts +++ b/plugin-server/src/main/ingestion-queues/session-recording/services/console-logs-ingester.ts @@ -25,12 +25,12 @@ const consoleLogEventsCounter = new Counter({ // am going to leave this duplication and then collapse it when/if we add a performance events ingester export class ConsoleLogsIngester { producer?: RdKafkaProducer - max_allowed_team: number + enabled: boolean constructor( private readonly serverConfig: PluginsServerConfig, private readonly persistentHighWaterMarker: OffsetHighWaterMarker ) { - this.max_allowed_team = serverConfig.MAX_TEAM_TO_ALLOW_SESSION_RECORDING_CONSOLE_LOGS_INGESTION + this.enabled = serverConfig.SESSION_RECORDING_CONSOLE_LOGS_INGESTION_ENABLED } public async consumeBatch(messages: IncomingRecordingMessage[]) { @@ -82,6 +82,10 @@ export class ConsoleLogsIngester { } public async consume(event: IncomingRecordingMessage): Promise[] | void> { + if (!this.enabled) { + return + } + const warn = (text: string, labels: Record = {}) => status.warn('⚠️', `[console-log-events-ingester] ${text}`, { offset: event.metadata.offset, @@ -119,10 +123,6 @@ export class ConsoleLogsIngester { return drop('high_water_mark') } - if (event.team_id > this.max_allowed_team) { - return drop('team_above_max_allowed') - } - try { const consoleLogEvents = gatherConsoleLogEvents(event.team_id, event.session_id, event.events) diff --git a/plugin-server/src/types.ts b/plugin-server/src/types.ts index c6616f0d31c00..dbddf6a25cd58 100644 --- a/plugin-server/src/types.ts +++ b/plugin-server/src/types.ts @@ -222,8 +222,7 @@ export interface PluginsServerConfig { SESSION_RECORDING_REDIS_PREFIX: string SESSION_RECORDING_PARTITION_REVOKE_OPTIMIZATION: boolean SESSION_RECORDING_PARALLEL_CONSUMPTION: boolean - // team ids greater than this won't ingest console logs separately, allows controlled rollout by team - MAX_TEAM_TO_ALLOW_SESSION_RECORDING_CONSOLE_LOGS_INGESTION: number + SESSION_RECORDING_CONSOLE_LOGS_INGESTION_ENABLED: boolean // Dedicated infra values SESSION_RECORDING_KAFKA_HOSTS: string | undefined