From f676483def07a128e87a55807c569b7928f2eb37 Mon Sep 17 00:00:00 2001 From: Ben White Date: Tue, 6 Aug 2024 15:01:16 +0200 Subject: [PATCH] fix: Disable observing fetch results for now (#24219) --- plugin-server/src/cdp/cdp-consumers.ts | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/plugin-server/src/cdp/cdp-consumers.ts b/plugin-server/src/cdp/cdp-consumers.ts index bd39fabffd26c..ca0accfc157dc 100644 --- a/plugin-server/src/cdp/cdp-consumers.ts +++ b/plugin-server/src/cdp/cdp-consumers.ts @@ -257,36 +257,14 @@ abstract class CdpConsumerBase { return await runInstrumentedFunction({ statsKey: `cdpConsumer.handleEachBatch.executeAsyncResponses`, func: async () => { - this.hogWatcher.currentObservations.observeAsyncFunctionResponses(asyncResponses) + // NOTE: Disabled for now as it needs some rethinking + // this.hogWatcher.currentObservations.observeAsyncFunctionResponses(asyncResponses) asyncResponses.forEach((x) => { counterAsyncFunctionResponse.inc({ outcome: x.asyncFunctionResponse.error ? 'failed' : 'succeeded', }) }) - // Filter for blocked functions - const asyncResponsesToRun: HogFunctionInvocationAsyncResponse[] = [] - - for (const item of asyncResponses) { - const functionState = this.hogWatcher.getFunctionState(item.hogFunctionId) - - if (functionState > HogWatcherState.disabledForPeriod) { - this.produceAppMetric({ - team_id: item.teamId, - app_source_id: item.hogFunctionId, - metric_kind: 'failure', - metric_name: - functionState === HogWatcherState.disabledForPeriod - ? 'disabled_temporarily' - : 'disabled_permanently', - count: 1, - }) - continue - } else { - asyncResponsesToRun.push(item) - } - } - const invocationsWithResponses: [HogFunctionInvocation, HogFunctionAsyncFunctionResponse][] = [] // Deserialize the compressed data