🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
build: prepare deployment for HIPAA compatibility (#6613)
Steffen Schmitz9f1fafd1bbc3
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.ymlindex 5c6a2561f4..f28e322adc 100644--- a/.github/workflows/deploy.yml+++ b/.github/workflows/deploy.yml@@ -21,6 +21,7 @@ on:- staging- prod-eu- prod-us+ - prod-hipaarequired: trueconcurrency:@@ -78,7 +79,7 @@ jobs:return `["staging"]`}if (context.ref === "refs/heads/production") {- return `["prod-eu", "prod-us"]`+ return `["prod-eu", "prod-us", "prod-hipaa"]`}}return "[]"diff --git a/packages/shared/src/server/clickhouse/client.ts b/packages/shared/src/server/clickhouse/client.tsindex 1db399c51f..27fecf77f3 100644--- a/packages/shared/src/server/clickhouse/client.ts+++ b/packages/shared/src/server/clickhouse/client.ts@@ -70,7 +70,7 @@ export class ClickHouseClientManager {const cloudOptions: Record<string, unknown> = {};if (- ["STAGING", "EU", "US"].includes(+ ["STAGING", "EU", "US", "HIPAA"].includes(env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION ?? "",)) {diff --git a/packages/shared/src/server/services/email/organizationInvitation/sendMembershipInvitationEmail.ts b/packages/shared/src/server/services/email/organizationInvitation/sendMembershipInvitationEmail.tsindex 737937183d..0a3dcb234a 100644--- a/packages/shared/src/server/services/email/organizationInvitation/sendMembershipInvitationEmail.ts+++ b/packages/shared/src/server/services/email/organizationInvitation/sendMembershipInvitationEmail.ts@@ -9,6 +9,7 @@ const langfuseUrls = {US: "https://us.cloud.langfuse.com",EU: "https://cloud.langfuse.com",STAGING: "https://staging.langfuse.com",+ HIPAA: "https://hipaa.cloud.langfuse.com",};type SendMembershipInvitationParams = {@@ -36,7 +37,7 @@ export const sendMembershipInvitationEmail = async ({}: SendMembershipInvitationParams) => {if (!env.EMAIL_FROM_ADDRESS || !env.SMTP_CONNECTION_URL) {logger.error(- "Missing environment variables for sending membership invitation email."+ "Missing environment variables for sending membership invitation email.",);return;}@@ -44,6 +45,7 @@ export const sendMembershipInvitationEmail = async ({const getAuthURL = () =>env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "US" ||env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "EU" ||+ env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "HIPAA" ||env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "STAGING"? langfuseUrls[env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION]: env.NEXTAUTH_URL;@@ -51,7 +53,7 @@ export const sendMembershipInvitationEmail = async ({const authUrl = getAuthURL();if (!authUrl) {logger.error(- "Missing NEXTAUTH_URL or NEXT_PUBLIC_LANGFUSE_CLOUD_REGION environment variable."+ "Missing NEXTAUTH_URL or NEXT_PUBLIC_LANGFUSE_CLOUD_REGION environment variable.",);return;}@@ -68,7 +70,7 @@ export const sendMembershipInvitationEmail = async ({inviteLink: authUrl,emailFromAddress: env.EMAIL_FROM_ADDRESS,langfuseCloudRegion: env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION,- })+ }),);await mailer.sendMail({diff --git a/web/src/components/EnvLabel.tsx b/web/src/components/EnvLabel.tsxindex c73eed72bb..3a9982d467 100644--- a/web/src/components/EnvLabel.tsx+++ b/web/src/components/EnvLabel.tsx@@ -18,7 +18,7 @@ export const EnvLabel = ({ className }: { className?: string }) => {className,)}>- {["EU", "US"].includes(env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION)+ {["EU", "US", "HIPAA"].includes(env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION)? `PROD-${env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION}`: env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION}</div>diff --git a/web/src/env.mjs b/web/src/env.mjsindex 015e2f38c9..dff170ec50 100644--- a/web/src/env.mjs+++ b/web/src/env.mjs@@ -306,7 +306,7 @@ export const env = createEnv({// NEXT_PUBLIC_CLIENTVAR: z.string().min(1),NEXT_PUBLIC_LANGFUSE_CLOUD_REGION: z- .enum(["US", "EU", "STAGING", "DEV"])+ .enum(["US", "EU", "STAGING", "DEV", "HIPAA"]).optional(),NEXT_PUBLIC_DEMO_PROJECT_ID: z.string().optional(),NEXT_PUBLIC_DEMO_ORG_ID: z.string().optional(),diff --git a/web/src/features/auth/components/AuthCloudRegionSwitch.tsx b/web/src/features/auth/components/AuthCloudRegionSwitch.tsxindex 6931da53fd..c28976d693 100644--- a/web/src/features/auth/components/AuthCloudRegionSwitch.tsx+++ b/web/src/features/auth/components/AuthCloudRegionSwitch.tsx@@ -33,18 +33,26 @@ const regions =flag: "🚧",},]- : [- {- name: "US",- hostname: "us.cloud.langfuse.com",- flag: "🇺🇸",- },- {- name: "EU",- hostname: "cloud.langfuse.com",- flag: "🇪🇺",- },- ];+ : env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "HIPAA"+ ? [+ {+ name: "HIPAA",+ hostname: "hipaa.cloud.langfuse.com",+ flag: "⚕️",+ },+ ]+ : [+ {+ name: "US",+ hostname: "us.cloud.langfuse.com",+ flag: "🇺🇸",+ },+ {+ name: "EU",+ hostname: "cloud.langfuse.com",+ flag: "🇪🇺",+ },+ ];export function CloudRegionSwitch({isSignUpPage,@@ -134,7 +142,8 @@ const DataRegionInfo = () => (<p>Regions are strictly separated, and no data is shared across regions.Choosing a region close to you can help improve speed and comply with- local data residency laws and privacy regulations.+ local data residency laws and privacy regulations. Contact us to+ onboard into a HIPAA compliant region.</p><p>You can have accounts in both regions and data migrations are