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
perf: make groupIdentify fire-and-forget in sendPostHogEvents to avoid blocking HTTP responses
Devin AIbf580bb53f59
diff --git a/backend/src/services/telemetry/telemetry-service.ts b/backend/src/services/telemetry/telemetry-service.tsindex 1301b0a53b..d28370c5ea 100644--- a/backend/src/services/telemetry/telemetry-service.ts+++ b/backend/src/services/telemetry/telemetry-service.ts@@ -159,16 +159,19 @@ To opt into telemetry, you can set "TELEMETRY_ENABLED=true" within the environme);} else {if (event.organizationId) {- try {- const groupProperties = await getOrgGroupProperties(event.organizationId, resolvedOrgName);- postHog.groupIdentify({- groupType: "organization",- groupKey: event.organizationId,- properties: groupProperties+ // Fire-and-forget: enrich groupIdentify without blocking the HTTP response+ const orgId = event.organizationId;+ void getOrgGroupProperties(orgId, resolvedOrgName)+ .then((groupProperties) => {+ postHog.groupIdentify({+ groupType: "organization",+ groupKey: orgId,+ properties: groupProperties+ });+ })+ .catch((error) => {+ logger.error(error, "Failed to identify PostHog organization");});- } catch (error) {- logger.error(error, "Failed to identify PostHog organization");- }}postHog.capture({event: event.event,