From 38ed39c2f86bb8f7521557b04708159f3fbda30e Mon Sep 17 00:00:00 2001 From: Vladyslav Matsiiako Date: Sun, 4 Feb 2024 09:37:56 -0800 Subject: [PATCH 1/2] remove certain python sdk events --- backend/src/server/routes/v3/secret-router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/server/routes/v3/secret-router.ts b/backend/src/server/routes/v3/secret-router.ts index 5c5890a6b..c07a717a3 100644 --- a/backend/src/server/routes/v3/secret-router.ts +++ b/backend/src/server/routes/v3/secret-router.ts @@ -479,7 +479,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => { } } - const shouldCapture = req.headers["user-agent"] !== "k8-operator" || shouldRecordK8Event; + const shouldCapture = (req.query.workspaceId != "650e71fbae3e6c8572f436d4") && (req.headers["user-agent"] !== "k8-operator" || shouldRecordK8Event); const approximateNumberTotalSecrets = secrets.length * 20; if (shouldCapture) { server.services.telemetry.sendPostHogEvents({ From 11399d73dc4943de5cb501632850ac1bf3746eef Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Sun, 4 Feb 2024 16:24:01 -0500 Subject: [PATCH 2/2] fix eslint errors --- backend/src/server/routes/v3/secret-router.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/server/routes/v3/secret-router.ts b/backend/src/server/routes/v3/secret-router.ts index c07a717a3..01746507f 100644 --- a/backend/src/server/routes/v3/secret-router.ts +++ b/backend/src/server/routes/v3/secret-router.ts @@ -479,7 +479,9 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => { } } - const shouldCapture = (req.query.workspaceId != "650e71fbae3e6c8572f436d4") && (req.headers["user-agent"] !== "k8-operator" || shouldRecordK8Event); + const shouldCapture = + req.query.workspaceId !== "650e71fbae3e6c8572f436d4" && + (req.headers["user-agent"] !== "k8-operator" || shouldRecordK8Event); const approximateNumberTotalSecrets = secrets.length * 20; if (shouldCapture) { server.services.telemetry.sendPostHogEvents({