Skip to content

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

fix: improve error logs (#1827)

Max Deichmanne70831855837
diff --git a/worker/src/eval-service.ts b/worker/src/eval-service.ts
index 00a3ecff49..0e84cb7fb9 100644
--- a/worker/src/eval-service.ts
+++ b/worker/src/eval-service.ts
@@ -260,8 +260,8 @@ export const evaluate = async ({
.executeTakeFirst();
if (!apiKey) {
- console.log(
- `API key for provider ${provider} and project ${event.projectId} not found.`
+ logger.error(
+ `API key for provider ${provider} and project ${event.projectId} not found. Failing job id ${job.id}`
);
// this will fail the eval execution if a user deletes the API key.
throw new Error(
diff --git a/worker/src/redis/consumer.ts b/worker/src/redis/consumer.ts
index 5b4ebd589b..c5176b6e9c 100644
--- a/worker/src/redis/consumer.ts
+++ b/worker/src/redis/consumer.ts
@@ -27,7 +27,7 @@ export const evalJobCreator = redis
} catch (e) {
logger.error(
e,
- `Failed job Evaluation for traceId ${job.data.payload.traceId}`
+ `Failed job Evaluation for traceId ${job.data.payload.traceId} ${e}`
);
throw e;
} finally {
@@ -59,7 +59,7 @@ export const evalJobExecutor = redis
} catch (e) {
logger.error(
e,
- `Failed Evaluation_Execution job for id ${job.data.payload.jobExecutionId}`
+ `Failed Evaluation_Execution job for id ${job.data.payload.jobExecutionId} ${e}`
);
await kyselyPrisma.$kysely
.updateTable("job_executions")