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
fix(telemetry): skip groupIdentify when event is marked anonymous
Devin AI24fd3748bc44
diff --git a/backend/src/services/telemetry/telemetry-service.ts b/backend/src/services/telemetry/telemetry-service.tsindex 5b6e0ca17e..dd805f15fc 100644--- a/backend/src/services/telemetry/telemetry-service.ts+++ b/backend/src/services/telemetry/telemetry-service.ts@@ -267,7 +267,22 @@ To opt into telemetry, you can set "TELEMETRY_ENABLED=true" within the environme}));} else {- if (event.organizationId) {+ // Skip groupIdentify entirely when the event is marked anonymous.+ //+ // posthog-node implements `groupIdentify` as a regular capture of a+ // `$groupidentify` event keyed by the supplied `distinctId`. For an+ // anonymous-share viewer of an org-scoped share, that `distinctId`+ // is the synthesised `anonymous-<shareId>` value, so calling+ // groupIdentify here would create exactly the per-share person+ // record we are trying to suppress — defeating the+ // `$process_person_profile: false` flag we set on the explicit+ // capture below. Org-level attribution on the captured event itself+ // is still preserved via the `groups` field, so analytics that+ // slice by organization continue to work; only the periodic refresh+ // of the org's group properties is skipped on this code path.+ // Authenticated events for the same org refresh those properties+ // frequently anyway, so there is no analytical loss.+ if (event.organizationId && !event.anonymous) {const orgId = event.organizationId;// Dedup groupIdentify: only fire once per org per hour to avoid redundant DB/API callsconst groupIdentifyCacheKey = KeyStorePrefixes.TelemetryGroupIdentify(orgId);