Skip to content

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

chore: make event propagation follow-up scheduling configurable (#9819)

Steffen Schmitzffbb7fd59f35
diff --git a/packages/shared/src/env.ts b/packages/shared/src/env.ts
index 70db181eda..8e56d13475 100644
--- a/packages/shared/src/env.ts
+++ b/packages/shared/src/env.ts
@@ -197,7 +197,7 @@ const EnvSchema = z.object({
LANGFUSE_EVENT_PROPAGATION_WORKER_GLOBAL_CONCURRENCY: z.coerce
.number()
.positive()
- .default(5),
+ .default(10),
LANGFUSE_FETCH_LLM_COMPLETION_TIMEOUT_MS: z.coerce
.number()
diff --git a/worker/src/env.ts b/worker/src/env.ts
index ebb24292c6..fdf95b445e 100644
--- a/worker/src/env.ts
+++ b/worker/src/env.ts
@@ -224,6 +224,11 @@ const EnvSchema = z.object({
.enum(["true", "false"])
.default("false"),
+ LANGFUSE_EVENT_PROPAGATION_WORKER_GLOBAL_CONCURRENCY: z.coerce
+ .number()
+ .positive()
+ .default(10),
+
// Core data S3 upload - Langfuse Cloud
LANGFUSE_S3_CORE_DATA_EXPORT_IS_ENABLED: z
.enum(["true", "false"])
diff --git a/worker/src/features/eventPropagation/handleEventPropagationJob.ts b/worker/src/features/eventPropagation/handleEventPropagationJob.ts
index 2e7f2204e7..5b1f6de5bd 100644
--- a/worker/src/features/eventPropagation/handleEventPropagationJob.ts
+++ b/worker/src/features/eventPropagation/handleEventPropagationJob.ts
@@ -380,7 +380,8 @@ export const handleEventPropagationJob = async (
);
if (partitions.length > 3) {
- let additionalSchedules = 5;
+ let additionalSchedules =
+ env.LANGFUSE_EVENT_PROPAGATION_WORKER_GLOBAL_CONCURRENCY;
const queue = EventPropagationQueue.getInstance();
while (queue && partitions.length > 3 && additionalSchedules > 0) {
const internalPartition = partitions.pop()!;