import { env } from "@/src/env.mjs"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/src/components/ui/select"; import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture"; import { Dialog, DialogBody, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, } from "@/src/components/ui/dialog"; import { useLangfuseCloudRegion } from "@/src/features/organizations/hooks"; const regions = env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "STAGING" ? [ { name: "STAGING", hostname: "staging.langfuse.com", flag: "πŸ‡ͺπŸ‡Ί", }, ] : env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "DEV" ? [ { name: "DEV", hostname: null, flag: "🚧", }, ] : [ { name: "US", hostname: "us.cloud.langfuse.com", flag: "πŸ‡ΊπŸ‡Έ", }, { name: "EU", hostname: "cloud.langfuse.com", flag: "πŸ‡ͺπŸ‡Ί", }, { name: "HIPAA", hostname: "hipaa.cloud.langfuse.com", flag: "βš•οΈ", }, ]; export function CloudRegionSwitch({ isSignUpPage, }: { isSignUpPage?: boolean; }) { const capture = usePostHogClientCapture(); const { isLangfuseCloud, region: cloudRegion } = useLangfuseCloudRegion(); if (!isLangfuseCloud) return null; const currentRegion = regions.find((region) => region.name === cloudRegion); return (
Data Region {isSignUpPage && cloudRegion === "HIPAA" ? (

Demo project is not available in the HIPAA data region.

) : null}
{cloudRegion === "HIPAA" && (

The Business Associate Agreement (BAA) is only effective on the Cloud Pro and Teams plans.{" "} Learn more about HIPAA compliance β†’

)}
); } const DataRegionInfo = () => ( (what is this?) Data Regions

Langfuse Cloud is available in three data regions:

  • US: Oregon (AWS us-west-2)
  • EU: Ireland (AWS eu-west-1)
  • HIPAA: Oregon (AWS us-west-2) - HIPAA-compliant region (available with Pro and Teams plans)

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.

You can have accounts in multiple regions. Each region requires a separate subscription.

Learn more about{" "} data regions {" "} and{" "} data security & privacy .

);