Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: emit trigger telemetry outside cooldown gating

Devin AI011bbe04f0a6
diff --git a/backend/src/ee/services/honey-token/honey-token-service.ts b/backend/src/ee/services/honey-token/honey-token-service.ts
index e8dca95268..6d7961afd7 100644
--- a/backend/src/ee/services/honey-token/honey-token-service.ts
+++ b/backend/src/ee/services/honey-token/honey-token-service.ts
@@ -1024,20 +1024,20 @@ export const honeyTokenServiceFactory = ({
parsed.data.accessKeyId,
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(() => {});
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(() => {});
}
}
/* eslint-enable no-continue */