Skip to content

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

perf: add sentry counter for ingested events (#1999)

Max Deichmann702a591a0d2c
diff --git a/web/src/pages/api/public/ingestion.ts b/web/src/pages/api/public/ingestion.ts
index eb55b32bc4..b60ac72a1c 100644
--- a/web/src/pages/api/public/ingestion.ts
+++ b/web/src/pages/api/public/ingestion.ts
@@ -73,6 +73,11 @@ export default async function handler(
const parsedSchema = batchType.safeParse(req.body);
+ Sentry.metrics.increment(
+ "ingestion_event",
+ parsedSchema.success ? parsedSchema.data.batch.length : 0,
+ );
+
if (!parsedSchema.success) {
console.log("Invalid request data", parsedSchema.error);
return res.status(400).json({