Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
remove posthog event from gated block
Matheus Nogueiraefd16fe6aa8a
diff --git a/backend/src/ee/services/honey-token/honey-token-service.ts b/backend/src/ee/services/honey-token/honey-token-service.tsindex 7b4a06fb2e..2605c9a36e 100644--- a/backend/src/ee/services/honey-token/honey-token-service.ts+++ b/backend/src/ee/services/honey-token/honey-token-service.ts@@ -1030,22 +1030,23 @@ export const honeyTokenServiceFactory = ({TRIGGER_NOTIFICATION_COOLDOWN_MS);+ void telemetryService+ .sendPostHogEvents({+ event: PostHogEventTypes.HoneyTokenTriggered,+ distinctId: `honey-token-${honeyToken.id}`,+ organizationId: honeyTokenWithOrg.orgId,+ properties: {+ honeyTokenId: honeyToken.id,+ type: honeyToken.type,+ projectId: honeyToken.projectId+ }+ })+ .catch(() => {});+// This block only is executed once per token trigger. So, even if we get 100 events// this will run only once.if (updatedToken) {void $sendTriggerNotification({ orgId: honeyTokenWithOrg.orgId, honeyToken, eventMetadata: parsed.data });- void telemetryService- .sendPostHogEvents({- event: PostHogEventTypes.HoneyTokenTriggered,- distinctId: `honey-token-${honeyToken.id}`,- organizationId: honeyTokenWithOrg.orgId,- properties: {- honeyTokenId: honeyToken.id,- type: honeyToken.type,- projectId: honeyToken.projectId- }- })- .catch(() => {});void auditLogService.createAuditLog({