Skip to content

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

fix: use trace/observation createdAt for health endpoint (#3825)

Marc Klingen254c399ec6c1
diff --git a/web/src/pages/api/public/health.ts b/web/src/pages/api/public/health.ts
index 6c11869614..46db1d9878 100644
--- a/web/src/pages/api/public/health.ts
+++ b/web/src/pages/api/public/health.ts
@@ -19,7 +19,7 @@ export default async function handler(
const now = Date.now();
const trace = await prisma.trace.findFirst({
where: {
- timestamp: {
+ createdAt: {
gte: new Date(now - 180000), // 3 minutes ago
lte: new Date(now),
},
@@ -30,7 +30,7 @@ export default async function handler(
});
const observation = await prisma.observation.findFirst({
where: {
- startTime: {
+ createdAt: {
gte: new Date(now - 180000), // 3 minutes ago
lte: new Date(now),
},