Skip to content

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

chore: bump fast limit for early media check path (#18831)

Valery Meleshkinbc1ade0aacca
diff --git a/worker/src/features/otel-ingestion/prepareOtelBatch.ts b/worker/src/features/otel-ingestion/prepareOtelBatch.ts
index 4b5796163e..e55194ff34 100644
--- a/worker/src/features/otel-ingestion/prepareOtelBatch.ts
+++ b/worker/src/features/otel-ingestion/prepareOtelBatch.ts
@@ -16,7 +16,7 @@ import {
} from "@langfuse/shared/src/server/ee/ingestionMasking";
/** Limits synchronous marker scanning so small marker-free inputs avoid a native task and copy. */
-const MAX_SYNC_MEDIA_CHECK_BYTES = 64 * 1024;
+const MAX_SYNC_MEDIA_CHECK_BYTES = 128 * 1024;
type PreparedInput =
| {
diff --git a/worker/src/features/otel-ingestion/prepareOtelBatch.unit.test.ts b/worker/src/features/otel-ingestion/prepareOtelBatch.unit.test.ts
index e1823c9067..def63e7fe5 100644
--- a/worker/src/features/otel-ingestion/prepareOtelBatch.unit.test.ts
+++ b/worker/src/features/otel-ingestion/prepareOtelBatch.unit.test.ts
@@ -109,9 +109,9 @@ describe("prepareOtelBatch native input boundary", { retry: 0 }, () => {
);
it.each([
- [64 * 1024, false, 0],
- [64 * 1024 + 1, false, 1],
- [64 * 1024, true, 1],
+ [128 * 1024, false, 0],
+ [128 * 1024 + 1, false, 1],
+ [128 * 1024, true, 1],
] as const)(
"prepares %i bytes with media=%s using %i extraction tasks",
async (size, withMedia, tasks) => {
@@ -127,7 +127,7 @@ describe("prepareOtelBatch native input boundary", { retry: 0 }, () => {
});
try {
expect(nativeMocks.hasOtelMediaCandidate).toHaveBeenCalledTimes(
- size <= 64 * 1024 ? 1 : 0,
+ size <= 128 * 1024 ? 1 : 0,
);
expect(nativeMocks.extractOtelMedia).toHaveBeenCalledTimes(tasks);
expect(nativeMocks.validateOtelJson).not.toHaveBeenCalled();