🪢 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
chore: improve logging (#1965)
Max Deichmann366ccde9024d
diff --git a/web/src/pages/api/public/ingestion.ts b/web/src/pages/api/public/ingestion.tsindex 564461c6ca..eb55b32bc4 100644--- a/web/src/pages/api/public/ingestion.ts+++ b/web/src/pages/api/public/ingestion.ts@@ -253,11 +253,11 @@ const handleSingleEvent = async (req: NextApiRequest,apiScope: ApiAccessScope,) => {- if ("input" in event && "output" in event) {+ if ("body" in event && "input" in event.body && "output" in event.body) {// eslint-disable-next-line @typescript-eslint/no-unused-vars- const { input, output, ...restEvent } = event;+ const { input, output, ...restEvent } = event.body;console.log(- `handling single event ${event.id} ${JSON.stringify(restEvent)}`,+ `handling single event ${event.id} ${JSON.stringify({ event, body: restEvent })}`,);} else {console.log(`handling single event ${event.id} ${JSON.stringify(event)}`);diff --git a/web/src/server/api/services/EventProcessor.ts b/web/src/server/api/services/EventProcessor.tsindex 8a5cf0a91a..5abc7e7220 100644--- a/web/src/server/api/services/EventProcessor.ts+++ b/web/src/server/api/services/EventProcessor.ts@@ -422,8 +422,8 @@ export class TraceProcessor implements EventProcessor {console.log("Trying to create trace, project ",apiScope.projectId,- ", body:",- body,+ ", id:",+ internalId,);const existingTrace = await prisma.trace.findFirst({