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: resolve actorId to username for consistent PostHog distinctId
Devin AIac2611a1a007
diff --git a/backend/src/services/secret/secret-queue.ts b/backend/src/services/secret/secret-queue.tsindex e62da6e1ba..3f5163c76b 100644--- a/backend/src/services/secret/secret-queue.ts+++ b/backend/src/services/secret/secret-queue.ts@@ -1034,9 +1034,18 @@ export const secretQueueFactory = ({isSynced: response?.isSynced ?? true});+ // Resolve the actor to a canonical telemetry distinct ID consistent with getTelemetryDistinctId+ let telemetryDistinctId = `platform/${projectId}`;+ if (isManual && actorId) {+ const actor = await userDAL.findById(actorId);+ if (actor) {+ telemetryDistinctId = actor.username;+ }+ }+await telemetryService.sendPostHogEvents({event: PostHogEventTypes.IntegrationSynced,- distinctId: actorId ?? `platform/${projectId}`,+ distinctId: telemetryDistinctId,organizationId: project.orgId,properties: {integrationId: integration.id,