🪢 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
feat: log all project_ids with missing domain id (#3984)
Max Deichmann84ccdc24edae
diff --git a/packages/shared/src/server/ingestion/legacy/EventProcessor.ts b/packages/shared/src/server/ingestion/legacy/EventProcessor.tsindex ec6181597a..0885114247 100644--- a/packages/shared/src/server/ingestion/legacy/EventProcessor.ts+++ b/packages/shared/src/server/ingestion/legacy/EventProcessor.ts@@ -220,7 +220,15 @@ export class ObservationProcessor implements EventProcessor {logger.warn("Prompt not found for observation", this.event.body);}- const observationId = this.event.body.id ?? v4();+ const observationId =+ this.event.body.id ??+ (() => {+ const newId = v4();+ logger.info(+ `observation.id is null. Generating for projectId: ${apiScope.projectId}, id: ${newId}`,+ );+ return newId;+ })();return {id: observationId,@@ -551,7 +559,15 @@ export class TraceProcessor implements EventProcessor {this.auth(apiScope);- const internalId = body.id ?? v4();+ const internalId =+ body.id ??+ (() => {+ const newId = v4();+ logger.info(+ `trace.id is null. Generating for projectId: ${apiScope.projectId}, id: ${newId}`,+ );+ return newId;+ })();logger.debug(`Trying to create trace, project ${apiScope.projectId}, id: ${internalId}`,@@ -663,7 +679,15 @@ export class ScoreProcessor implements EventProcessor {this.auth(apiScope);- const id = body.id ?? v4();+ const id =+ body.id ??+ (() => {+ const newId = v4();+ logger.info(+ `score.id is null. Generating for projectId: ${apiScope.projectId}, id: ${newId}`,+ );+ return newId;+ })();const existingScore = await prisma.score.findFirst({where: {