Skip to content

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

logging

Max Deichmannd5ada7080ee3
diff --git a/src/features/publicApi/server/apiAuth.ts b/src/features/publicApi/server/apiAuth.ts
index 708a2adaae..666ac96e06 100644
--- a/src/features/publicApi/server/apiAuth.ts
+++ b/src/features/publicApi/server/apiAuth.ts
@@ -16,6 +16,7 @@ export async function verifyAuthHeaderAndReturnScope(
authHeader: string | undefined
): Promise<AuthHeaderVerificationResult> {
if (!authHeader) {
+ console.log("No authorization header");
return {
validKey: false,
error: "No authorization header",
@@ -56,6 +57,7 @@ export async function verifyAuthHeaderAndReturnScope(
};
}
} catch (error: unknown) {
+ console.log("Error verifying auth header: ", error);
return {
validKey: false,
error: error instanceof Error ? error.message : "Authorization error",
diff --git a/src/pages/api/public/generations.ts b/src/pages/api/public/generations.ts
index 8db6535fe3..b2a645942f 100644
--- a/src/pages/api/public/generations.ts
+++ b/src/pages/api/public/generations.ts
@@ -70,6 +70,7 @@ export default async function handler(
res: NextApiResponse
) {
await runMiddleware(req, res, cors);
+ console.log("got generation event" + JSON.stringify(req.body, null, 2));
// CHECK AUTH
const authCheck = await verifyAuthHeaderAndReturnScope(