🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(worker): add llm-as-judge concurrency env (#12956)
Max Deichmann427305bb80b0
diff --git a/.env.dev.example b/.env.dev.exampleindex df55a51ae3..35d0034a46 100644--- a/.env.dev.example+++ b/.env.dev.example@@ -131,6 +131,8 @@ NEXT_PUBLIC_LANGFUSE_RUN_NEXT_INIT="false"# For SDK integration tests to pass, decrease the ingestion queue delay by uncommenting the env vars:# LANGFUSE_INGESTION_QUEUE_DELAY_MS=10# LANGFUSE_INGESTION_CLICKHOUSE_WRITE_INTERVAL_MS=10+# LANGFUSE_EVAL_EXECUTION_WORKER_CONCURRENCY=5+# LANGFUSE_LLM_AS_JUDGE_EXECUTION_WORKER_CONCURRENCY=5# Slack credentials for developmentSLACK_CLIENT_ID=your_slack_client_iddiff --git a/.env.prod.example b/.env.prod.exampleindex 41aa89efa1..e249f98ec2 100644--- a/.env.prod.example+++ b/.env.prod.example@@ -223,6 +223,10 @@ LANGFUSE_ENABLE_BLOB_STORAGE_FILE_LOG=true# LANGFUSE_INGESTION_CLICKHOUSE_WRITE_INTERVAL_MS=# LANGFUSE_INGESTION_CLICKHOUSE_MAX_ATTEMPTS=+# Evaluation worker concurrency+# LANGFUSE_EVAL_EXECUTION_WORKER_CONCURRENCY=5+# LANGFUSE_LLM_AS_JUDGE_EXECUTION_WORKER_CONCURRENCY=5+# API Traces endpoint controls (may induce breaking changes on API when changed!)# Reject GET /api/public/traces requests that do not include a fromTimestamp parameter (returns 400)# LANGFUSE_API_TRACES_REJECT_NO_DATE_RANGE=falsediff --git a/worker/src/app.ts b/worker/src/app.tsindex b97a86ca48..76ea1478f0 100644--- a/worker/src/app.ts+++ b/worker/src/app.ts@@ -253,14 +253,13 @@ if (env.QUEUE_CONSUMER_EVAL_EXECUTION_QUEUE_IS_ENABLED === "true") {);});- // LLM-as-Judge execution for observation-level evals (uses same env flag as trace evals)const llmAsJudgeShardNames = LLMAsJudgeExecutionQueue.getShardNames();llmAsJudgeShardNames.forEach((shardName) => {WorkerManager.register(shardName as QueueName,llmAsJudgeExecutionQueueProcessorBuilder(shardName),{- concurrency: env.LANGFUSE_EVAL_EXECUTION_WORKER_CONCURRENCY,+ concurrency: env.LANGFUSE_LLM_AS_JUDGE_EXECUTION_WORKER_CONCURRENCY,lockDuration: 60000,stalledInterval: 120000,maxStalledCount: 3,diff --git a/worker/src/env.ts b/worker/src/env.tsindex 3fc7a90f1e..72abf74407 100644--- a/worker/src/env.ts+++ b/worker/src/env.ts@@ -121,6 +121,10 @@ const EnvSchema = z.object({.number().positive().default(5),+ LANGFUSE_LLM_AS_JUDGE_EXECUTION_WORKER_CONCURRENCY: z.coerce+ .number()+ .positive()+ .default(5),LANGFUSE_EVAL_EXECUTION_SECONDARY_QUEUE_PROCESSING_CONCURRENCY: z.coerce.number().positive()