Skip to content

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

chore: reduce amount of ingested dd spans (#6775)

Max Deichmann92567b765b09
diff --git a/packages/shared/src/server/ingestion/processEventBatch.ts b/packages/shared/src/server/ingestion/processEventBatch.ts
index 3abcb71b5f..8efb7ba1fa 100644
--- a/packages/shared/src/server/ingestion/processEventBatch.ts
+++ b/packages/shared/src/server/ingestion/processEventBatch.ts
@@ -13,7 +13,6 @@ import { getClickhouseEntityType } from "../clickhouse/schemaUtils";
import {
getCurrentSpan,
instrumentAsync,
- instrumentSync,
recordDistribution,
recordIncrement,
traceException,
@@ -117,19 +116,7 @@ export const processEventBatch = async (
const batch: z.infer<typeof ingestionEvent>[] = input
.flatMap((event) => {
- const parsed = instrumentSync(
- { name: "ingestion-zod-parse-individual-event" },
- (span) => {
- const parsedBody = ingestionEvent.safeParse(event);
- if (parsedBody.data?.id !== undefined) {
- span.setAttribute(
- "langfuse.ingestion.entity.id",
- parsedBody.data.id,
- );
- }
- return parsedBody;
- },
- );
+ const parsed = ingestionEvent.safeParse(event);
if (!parsed.success) {
validationErrors.push({
id:
diff --git a/web/src/pages/api/public/ingestion.ts b/web/src/pages/api/public/ingestion.ts
index 6261489a24..3444c03139 100644
--- a/web/src/pages/api/public/ingestion.ts
+++ b/web/src/pages/api/public/ingestion.ts
@@ -15,7 +15,7 @@ import {
BaseError,
UnauthorizedError,
} from "@langfuse/shared";
-import { instrumentSync, processEventBatch } from "@langfuse/shared/src/server";
+import { processEventBatch } from "@langfuse/shared/src/server";
import { prisma } from "@langfuse/shared/src/db";
import { ApiAuthService } from "@/src/features/public-api/server/apiAuth";
import { RateLimitService } from "@/src/features/public-api/server/RateLimitService";
@@ -105,10 +105,7 @@ export default async function handler(
metadata: jsonSchema.nullish(),
});
- const parsedSchema = instrumentSync(
- { name: "ingestion-zod-parse-unknown-batch-event" },
- () => batchType.safeParse(req.body),
- );
+ const parsedSchema = batchType.safeParse(req.body);
if (!parsedSchema.success) {
logger.info("Invalid request data", parsedSchema.error);