Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(blob-export): make Parquet the default export format for all projects (LFE-10748) (#14880)

Niklas Semmler7c46d98718a4
diff --git a/fern/apis/server/definition/blob-storage-integrations.yml b/fern/apis/server/definition/blob-storage-integrations.yml
index ba135c5a1f..ad6b0a4517 100644
--- a/fern/apis/server/definition/blob-storage-integrations.yml
+++ b/fern/apis/server/definition/blob-storage-integrations.yml
@@ -43,14 +43,17 @@ types:
- AZURE_BLOB_STORAGE
BlobStorageIntegrationFileType:
+ docs: |
+ File format for exported data. `PARQUET` is a columnar binary format encoded and compressed by the storage engine; gzip compression does not apply to it. Note that the model-price columns (`input_price`, `output_price`, `total_price`) are not included in Parquet observation exports.
enum:
- JSON
- CSV
- JSONL
+ - PARQUET
BlobStorageIntegrationFileTypeResponse:
docs: |
- File type reported for an existing integration. Includes `PARQUET`, which a project may enable through the Langfuse UI but cannot yet be set via this API (the request `fileType` omits it).
+ File type reported for an existing integration.
enum:
- JSON
- CSV
diff --git a/web/public/generated/api/openapi.yml b/web/public/generated/api/openapi.yml
index a66c295cab..a58867f47a 100644
--- a/web/public/generated/api/openapi.yml
+++ b/web/public/generated/api/openapi.yml
@@ -7630,6 +7630,13 @@ components:
- JSON
- CSV
- JSONL
+ - PARQUET
+ description: >-
+ File format for exported data. `PARQUET` is a columnar binary format
+ encoded and compressed by the storage engine; gzip compression does not
+ apply to it. Note that the model-price columns (`input_price`,
+ `output_price`, `total_price`) are not included in Parquet observation
+ exports.
BlobStorageIntegrationFileTypeResponse:
title: BlobStorageIntegrationFileTypeResponse
type: string
@@ -7638,10 +7645,7 @@ components:
- CSV
- JSONL
- PARQUET
- description: >-
- File type reported for an existing integration. Includes `PARQUET`,
- which a project may enable through the Langfuse UI but cannot yet be set
- via this API (the request `fileType` omits it).
+ description: File type reported for an existing integration.
BlobStorageExportMode:
title: BlobStorageExportMode
type: string
diff --git a/web/src/__tests__/server/blob-storage-integration-api.servertest.ts b/web/src/__tests__/server/blob-storage-integration-api.servertest.ts
index 522b3ca8aa..395ff9b568 100644
--- a/web/src/__tests__/server/blob-storage-integration-api.servertest.ts
+++ b/web/src/__tests__/server/blob-storage-integration-api.servertest.ts
@@ -39,8 +39,6 @@ const BlobStorageIntegrationResponseSchema = z.object({
exportFrequency: z.enum(["every_20_minutes", "hourly", "daily", "weekly"]),
enabled: z.boolean(),
forcePathStyle: z.boolean(),
- // Response-only PARQUET: reportable for UI-enabled projects, not creatable
- // via the API (mirrors BlobStorageIntegrationFileTypeResponse in Fern).
fileType: z.enum(["JSON", "CSV", "JSONL", "PARQUET"]),
exportMode: z.enum(["FULL_HISTORY", "FROM_TODAY", "FROM_CUSTOM_DATE"]),
exportStartDate: z.coerce.date().nullable(),
@@ -1873,7 +1871,7 @@ describe("Blob Storage Integrations API", () => {
});
});
- describe("Parquet fileType stabilisation guards", () => {
+ describe("Parquet fileType", () => {
const seedParquetIntegration = () =>
prisma.blobStorageIntegration.create({
data: {
@@ -1889,6 +1887,9 @@ describe("Blob Storage Integrations API", () => {
forcePathStyle: false,
fileType: "PARQUET",
exportMode: "FULL_HISTORY",
+ // Non-legacy source so updates aren't rejected by the Cloud
+ // legacy-export-source cutoff gate (orthogonal to fileType here).
+ exportSource: "EVENTS",
},
});
@@ -1904,7 +1905,7 @@ describe("Blob Storage Integrations API", () => {
});
});
- it("rejects PARQUET as a request fileType", async () => {
+ it("accepts PARQUET as a request fileType", async () => {
const result = await makeAPICall(
"PUT",
"/api/public/integrations/blob-storage",
@@ -1915,28 +1916,33 @@ describe("Blob Storage Integrations API", () => {
},
createBasicAuthHeader(testApiKey, testApiSecretKey),
);
- expect(result.status).toBe(400);
- expect(result.body.message).toContain("Invalid request data");
+ expect(result.status).toBe(200);
+
+ const saved = await prisma.blobStorageIntegration.findUnique({
+ where: { projectId: testProject1Id },
+ });
+ expect(saved?.fileType).toBe("PARQUET");
});
- it("rejects any PUT against a Parquet-configured integration", async () => {
+ it("allows changing the fileType of a Parquet-configured integration", async () => {
await seedParquetIntegration();
const result = await makeAPICall(
"PUT",
"/api/public/integrations/blob-storage",
- { ...validBlobStorageConfig, projectId: testProject1Id },
+ {
+ ...validBlobStorageConfig,
+ projectId: testProject1Id,
+ exportSource: "OBSERVATIONS_V2",
+ },
createBasicAuthHeader(testApiKey, testApiSecretKey),
);
- expect(result.status).toBe(400);
- expect(result.body.message).toContain("managed through the Langfuse UI");
+ expect(result.status).toBe(200);
- // No silent downgrade: the persisted integration is untouched.
const saved = await prisma.blobStorageIntegration.findUnique({
where: { projectId: testProject1Id },
});
- expect(saved?.fileType).toBe("PARQUET");
- expect(saved?.compressed).toBe(true);
+ expect(saved?.fileType).toBe(validBlobStorageConfig.fileType);
});
it("GET reports fileType PARQUET for a Parquet-configured integration", async () => {
diff --git a/web/src/__tests__/server/blob-storage-integration-trpc.servertest.ts b/web/src/__tests__/server/blob-storage-integration-trpc.servertest.ts
index ee87d858d9..c81d09e0c7 100644
--- a/web/src/__tests__/server/blob-storage-integration-trpc.servertest.ts
+++ b/web/src/__tests__/server/blob-storage-integration-trpc.servertest.ts
@@ -43,14 +43,6 @@ vi.mock("@langfuse/shared/src/server", async () => {
};
});
-// The parquet whitelist ships as an in-code constant (empty by default), so the
-// helper is mocked to exercise both sides of the gate deterministically.
-const isParquetFileTypeAllowedMock = vi.hoisted(() => vi.fn(() => false));
-
-vi.mock("@/src/features/blobstorage-integration/parquetFileType", () => ({
- isParquetFileTypeAllowed: isParquetFileTypeAllowedMock,
-}));
-
const __orgIds: string[] = [];
const prepare = async () => {
@@ -1057,31 +1049,8 @@ describe("Blob Storage Integration tRPC Router", () => {
});
});
- describe("parquet fileType whitelist gate", () => {
- beforeEach(() => {
- isParquetFileTypeAllowedMock.mockReset();
- isParquetFileTypeAllowedMock.mockReturnValue(false);
- });
-
- it("rejects changing fileType to PARQUET for a non-whitelisted project", async () => {
- const { caller, project } = await prepare();
-
- await expect(
- caller.blobStorageIntegration.update({
- projectId: project.id,
- ...baseConfig,
- fileType: "PARQUET" as const,
- }),
- ).rejects.toThrow("Parquet export is not available for this project.");
-
- const row = await prisma.blobStorageIntegration.findUnique({
- where: { projectId: project.id },
- });
- expect(row).toBeNull();
- });
-
- it("persists PARQUET for a whitelisted project", async () => {
- isParquetFileTypeAllowedMock.mockReturnValue(true);
+ describe("parquet fileType", () => {
+ it("persists PARQUET for any project", async () => {
const { caller, project } = await prepare();
await caller.blobStorageIntegration.update({
@@ -1096,7 +1065,7 @@ describe("Blob Storage Integration tRPC Router", () => {
expect(row.fileType).toBe("PARQUET");
});
- it("still saves edits for a de-whitelisted project that already persists PARQUET", async () => {
+ it("saves edits alongside a persisted PARQUET fileType", async () => {
const { caller, project } = await prepare();
await createIntegration({ projectId: project.id });
await prisma.blobStorageIntegration.update({
@@ -1104,8 +1073,6 @@ describe("Blob Storage Integration tRPC Router", () => {
data: { fileType: "PARQUET" },
});
- // Whitelist off: only a *change to* PARQUET is gated, so re-submitting the
- // persisted PARQUET alongside an unrelated edit must not lock the user out.
await caller.blobStorageIntegration.update({
projectId: project.id,
...baseConfig,
@@ -1121,8 +1088,8 @@ describe("Blob Storage Integration tRPC Router", () => {
});
it("preserves persisted PARQUET when fileType is omitted from the update input", async () => {
- // Without the router-level .optional() the base schema would default an
- // omitted fileType to JSONL and silently downgrade the persisted PARQUET.
+ // The router-level .optional() drops the base default so an omitted
+ // fileType preserves the persisted value instead of rewriting it.
const { caller, project } = await prepare();
await createIntegration({ projectId: project.id });
await prisma.blobStorageIntegration.update({
@@ -1144,8 +1111,7 @@ describe("Blob Storage Integration tRPC Router", () => {
expect(row.enabled).toBe(false);
});
- it("defaults to JSONL when fileType is omitted on CREATE", async () => {
- // The Prisma column default is CSV; the historical Zod default was JSONL.
+ it("defaults to PARQUET when fileType is omitted on CREATE", async () => {
const { caller, project } = await prepare();
const { fileType: _fileType, ...configWithoutFileType } = baseConfig;
@@ -1157,7 +1123,7 @@ describe("Blob Storage Integration tRPC Router", () => {
const row = await prisma.blobStorageIntegration.findUniqueOrThrow({
where: { projectId: project.id },
});
- expect(row.fileType).toBe("JSONL");
+ expect(row.fileType).toBe("PARQUET");
});
});
});
diff --git a/web/src/features/blobstorage-integration/blobstorage-integration-router.ts b/web/src/features/blobstorage-integration/blobstorage-integration-router.ts
index cf04b48157..8e417767e2 100644
--- a/web/src/features/blobstorage-integration/blobstorage-integration-router.ts
+++ b/web/src/features/blobstorage-integration/blobstorage-integration-router.ts
@@ -33,7 +33,6 @@ import {
InvalidRequestError,
isEnrichedBlobExportAvailable,
} from "@langfuse/shared";
-import { isParquetFileTypeAllowed } from "@/src/features/blobstorage-integration/parquetFileType";
const getAuditLogErrorType = (error: unknown) =>
error instanceof TRPCError
@@ -108,8 +107,8 @@ export const blobStorageIntegrationRouter = createTRPCRouter({
// Drop the base schema default so an omitted value preserves the
// persisted source instead of rewriting it to the legacy default.
exportSource: z.enum(AnalyticsIntegrationExportSource).optional(),
- // Same for fileType: the base default (JSONL) would silently
- // downgrade a persisted PARQUET past the change-to-Parquet gate.
+ // Same for fileType: drop the base default so an omitted value
+ // preserves the persisted fileType instead of rewriting it.
fileType: z.enum(BlobStorageIntegrationFileType).optional(),
})
.superRefine(validateAzureContainerName)
@@ -130,20 +129,9 @@ export const blobStorageIntegrationRouter = createTRPCRouter({
const existingIntegration =
await ctx.prisma.blobStorageIntegration.findUnique({
where: { projectId: input.projectId },
- select: { createdAt: true, exportSource: true, fileType: true },
+ select: { createdAt: true, exportSource: true },
});
- // Gate only a *change to* PARQUET — not re-submission of an already-persisted value.
- const isChangingToParquet =
- input.fileType === BlobStorageIntegrationFileType.PARQUET &&
- existingIntegration?.fileType !==
- BlobStorageIntegrationFileType.PARQUET;
- if (isChangingToParquet && !isParquetFileTypeAllowed(input.projectId)) {
- throw new InvalidRequestError(
- "Parquet export is not available for this project.",
- );
- }
-
// Legacy gate checks explicit values only; omitted preserves the row,
// CREATE is covered by forceEventsOnCreate below.
if (input.exportSource) {
diff --git a/web/src/features/blobstorage-integration/parquetFileType.clienttest.ts b/web/src/features/blobstorage-integration/parquetFileType.clienttest.ts
deleted file mode 100644
index 71256f4c3d..0000000000
--- a/web/src/features/blobstorage-integration/parquetFileType.clienttest.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { describe, expect, it } from "vitest";
-import {
- PARQUET_FILE_TYPE_PROJECT_IDS,
- isParquetFileTypeAllowed,
-} from "@/src/features/blobstorage-integration/parquetFileType";
-
-describe("isParquetFileTypeAllowed", () => {
- it("returns false for a project that is not whitelisted", () => {
- expect(isParquetFileTypeAllowed("not-a-whitelisted-project-id")).toBe(
- false,
- );
- });
-
- it("reflects membership in PARQUET_FILE_TYPE_PROJECT_IDS", () => {
- // Equivalence check that stays correct and non-vacuous whether the shipped
- // whitelist is empty or populated: the helper must return true exactly for
- // ids in the constant. The appended non-member guarantees at least one real
- // assertion runs (so the test can't pass vacuously while the list is empty)
- // and would catch a regression to `return true`; every entry actually in
- // the list (once populated) guards against `return false`.
- for (const id of [...PARQUET_FILE_TYPE_PROJECT_IDS, "not-in-the-list"]) {
- expect(isParquetFileTypeAllowed(id)).toBe(
- PARQUET_FILE_TYPE_PROJECT_IDS.includes(id),
- );
- }
- });
-});
diff --git a/web/src/features/blobstorage-integration/parquetFileType.ts b/web/src/features/blobstorage-integration/parquetFileType.ts
deleted file mode 100644
index 780fa6f48e..0000000000
--- a/web/src/features/blobstorage-integration/parquetFileType.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-// In-code whitelist gating the first-class `fileType = PARQUET` option while
-// it stabilises. Projects on the legacy `exportTuning.parquet` override do not
-// need to be listed here — that path is independent (see worker parquetEligible).
-
-export const PARQUET_FILE_TYPE_PROJECT_IDS: readonly string[] = [
- "cmpyefoyg03yiad0jeoymrmcv",
-];
-
-const PARQUET_FILE_TYPE_PROJECT_ID_SET = new Set(PARQUET_FILE_TYPE_PROJECT_IDS);
-
-/** True when a project may select Parquet as its fileType. */
-export function isParquetFileTypeAllowed(projectId: string): boolean {
- return PARQUET_FILE_TYPE_PROJECT_ID_SET.has(projectId);
-}
diff --git a/web/src/features/blobstorage-integration/service.ts b/web/src/features/blobstorage-integration/service.ts
index 4ec8d49590..96e242629f 100644
--- a/web/src/features/blobstorage-integration/service.ts
+++ b/web/src/features/blobstorage-integration/service.ts
@@ -26,7 +26,7 @@ type UpsertBlobStorageIntegrationInput = {
enabled: boolean;
forcePathStyle: boolean;
// Optional: undefined preserves the persisted value on UPDATE (Prisma omits
- // the column) and falls back to JSONL on CREATE.
+ // the column) and falls back to PARQUET on CREATE.
fileType?: BlobStorageIntegrationFileType;
exportMode: BlobStorageExportMode;
exportStartDate: Date | null;
@@ -158,9 +158,10 @@ export async function upsertBlobStorageIntegration(params: {
create: {
...writeData,
exportSource: createExportSource,
- // The Prisma column default is CSV; keep the historical JSONL default
- // when the caller omits fileType on CREATE.
- fileType: data.fileType ?? BlobStorageIntegrationFileType.JSONL,
+ // Parquet is the default export format; apply it when the caller omits
+ // fileType on CREATE. This app-level fallback (not the Prisma column
+ // default) is the source of truth for the default across every write path.
+ fileType: data.fileType ?? BlobStorageIntegrationFileType.PARQUET,
projectId,
secretAccessKey: encryptedSecret,
},
diff --git a/web/src/features/blobstorage-integration/types.ts b/web/src/features/blobstorage-integration/types.ts
index a26a6345f8..6e0342c624 100644
--- a/web/src/features/blobstorage-integration/types.ts
+++ b/web/src/features/blobstorage-integration/types.ts
@@ -32,7 +32,7 @@ export const blobStorageIntegrationFormSchemaBase = z.object({
forcePathStyle: z.boolean(),
fileType: z
.enum(BlobStorageIntegrationFileType)
- .default(BlobStorageIntegrationFileType.JSONL),
+ .default(BlobStorageIntegrationFileType.PARQUET),
exportMode: z
.enum(BlobStorageExportMode)
.default(BlobStorageExportMode.FULL_HISTORY),
diff --git a/web/src/features/public-api/types/blob-storage-integrations.ts b/web/src/features/public-api/types/blob-storage-integrations.ts
index d616427695..040505c459 100644
--- a/web/src/features/public-api/types/blob-storage-integrations.ts
+++ b/web/src/features/public-api/types/blob-storage-integrations.ts
@@ -20,15 +20,15 @@ export const BlobStorageIntegrationType = z.enum([
"AZURE_BLOB_STORAGE",
]);
-export const BlobStorageIntegrationFileType = z.enum(["JSON", "CSV", "JSONL"]);
-
-// Response-only file type. Parquet is a first-class fileType that the public API
-// cannot yet *create* (the request enum above intentionally omits it, gating it
-// behind an in-code project whitelist on the web side), but a project that
-// enabled Parquet through the UI persists `PARQUET`, so the API must be able to
-// *report* it. Adding a value to the response enum is additive/backwards
-// compatible. Promote PARQUET into the request enum once it is generally
-// available.
+export const BlobStorageIntegrationFileType = z.enum([
+ "JSON",
+ "CSV",
+ "JSONL",
+ "PARQUET",
+]);
+
+// Kept as a separate export for the response type. Now identical to the request
+// enum since Parquet is generally available and settable via the API.
export const BlobStorageIntegrationFileTypeResponse = z.enum([
"JSON",
"CSV",
diff --git a/web/src/pages/api/public/integrations/blob-storage/index.ts b/web/src/pages/api/public/integrations/blob-storage/index.ts
index 3df4bef06a..b2e2d0f39d 100644
--- a/web/src/pages/api/public/integrations/blob-storage/index.ts
+++ b/web/src/pages/api/public/integrations/blob-storage/index.ts
@@ -12,8 +12,6 @@ import {
} from "@/src/features/public-api/types/blob-storage-integrations";
import {
type ObservationFieldGroupFull,
- BlobStorageIntegrationFileType,
- InvalidRequestError,
LangfuseNotFoundError,
UnauthorizedError,
ForbiddenError,
@@ -174,23 +172,9 @@ async function handleUpsertBlobStorageIntegration(
// enriched value is rejected.
const existingIntegration = await prisma.blobStorageIntegration.findUnique({
where: { projectId: validatedData.projectId },
- select: { createdAt: true, exportSource: true, fileType: true },
+ select: { createdAt: true, exportSource: true },
});
- // PARQUET cannot be set via the REST API yet (request enum omits it). Block
- // any PUT that would silently downgrade a Parquet integration to a text format.
- // Written as a downgrade check (existing === PARQUET && request !== PARQUET) so
- // it automatically narrows to no-op once PARQUET is added to the request enum at GA.
- const requestFileType: string = validatedData.fileType;
- if (
- existingIntegration?.fileType === BlobStorageIntegrationFileType.PARQUET &&
- requestFileType !== BlobStorageIntegrationFileType.PARQUET
- ) {
- throw new InvalidRequestError(
- "Integrations exporting Parquet must be managed through the Langfuse UI; the public API cannot modify them while Parquet is in stabilisation.",
- );
- }
-
if (internalExportSource) {
assertLegacyBlobExportSourceAllowedForUpsert({
project,
diff --git a/web/src/pages/project/[projectId]/settings/integrations/blobstorage.tsx b/web/src/pages/project/[projectId]/settings/integrations/blobstorage.tsx
index 9d5d4fde83..842be5093e 100644
--- a/web/src/pages/project/[projectId]/settings/integrations/blobstorage.tsx
+++ b/web/src/pages/project/[projectId]/settings/integrations/blobstorage.tsx
@@ -34,7 +34,6 @@ import {
type BlobStorageIntegrationFormSchema,
type BlobStorageSyncStatus,
} from "@/src/features/blobstorage-integration/types";
-import { isParquetFileTypeAllowed } from "@/src/features/blobstorage-integration/parquetFileType";
import { deriveSyncStatus } from "@/src/features/blobstorage-integration/deriveSyncStatus";
import { Alert, AlertTitle, AlertDescription } from "@/src/components/ui/alert";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
@@ -321,7 +320,7 @@ const BlobStorageIntegrationSettingsForm = ({
| "hourly",
enabled: state?.enabled || false,
forcePathStyle: state?.forcePathStyle || false,
- fileType: state?.fileType || BlobStorageIntegrationFileType.JSONL,
+ fileType: state?.fileType || BlobStorageIntegrationFileType.PARQUET,
exportMode: state?.exportMode || BlobStorageExportMode.FULL_HISTORY,
exportStartDate: state?.exportStartDate || null,
exportSource: getExportSourceFormValue(state?.exportSource, availability),
@@ -355,7 +354,7 @@ const BlobStorageIntegrationSettingsForm = ({
| "hourly",
enabled: state?.enabled || false,
forcePathStyle: state?.forcePathStyle || false,
- fileType: state?.fileType || BlobStorageIntegrationFileType.JSONL,
+ fileType: state?.fileType || BlobStorageIntegrationFileType.PARQUET,
exportMode: state?.exportMode || BlobStorageExportMode.FULL_HISTORY,
exportStartDate: state?.exportStartDate || null,
exportSource: getExportSourceFormValue(
@@ -379,7 +378,6 @@ const BlobStorageIntegrationSettingsForm = ({
// Internal `exportTuning.parquet` override (no write path); reflected read-only
// below since the worker forces Parquet over the persisted fileType + gzip.
const isParquetOverride = parquetEnabledFromTuning(state?.exportTuning);
- const isParquetWhitelisted = isParquetFileTypeAllowed(projectId);
const watchedFileType = blobStorageForm.watch("fileType");
const isParquetExport =
isParquetOverride ||
@@ -724,15 +722,10 @@ const BlobStorageIntegrationSettingsForm = ({
<SelectValue placeholder="Select file type" />
</SelectTrigger>
<SelectContent>
+ <SelectItem value="PARQUET">Parquet</SelectItem>
<SelectItem value="JSONL">JSONL</SelectItem>
<SelectItem value="CSV">CSV</SelectItem>
<SelectItem value="JSON">JSON</SelectItem>
- {(isParquetWhitelisted ||
- isParquetOverride ||
- watchedFileType ===
- BlobStorageIntegrationFileType.PARQUET) && (
- <SelectItem value="PARQUET">Parquet</SelectItem>
- )}
</SelectContent>
</Select>
</FormControl>
diff --git a/worker/src/__tests__/blobStorageIntegrationProcessing.test.ts b/worker/src/__tests__/blobStorageIntegrationProcessing.test.ts
index eb0178ef77..4bd9ff5fc9 100644
--- a/worker/src/__tests__/blobStorageIntegrationProcessing.test.ts
+++ b/worker/src/__tests__/blobStorageIntegrationProcessing.test.ts
@@ -321,6 +321,9 @@ describe("BlobStorageIntegrationProcessingJob", () => {
enabled: true,
exportFrequency: "hourly",
exportSource: "TRACES_OBSERVATIONS_EVENTS",
+ // Explicit CSV: this test asserts on text content, and the column
+ // default is now PARQUET (binary).
+ fileType: BlobStorageIntegrationFileType.CSV,
nextSyncAt: twoHoursAgo,
lastSyncAt: twoHoursAgo,
compressed: false,