Skip to content

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

chore: add dummy route that accepts all otel metrics calls (#6408)

Steffen Schmitz8c44314f5668
diff --git a/web/src/pages/api/public/otel/v1/metrics/index.ts b/web/src/pages/api/public/otel/v1/metrics/index.ts
new file mode 100644
index 0000000000..a18d2a93b8
--- /dev/null
+++ b/web/src/pages/api/public/otel/v1/metrics/index.ts
@@ -0,0 +1,22 @@
+import { withMiddlewares } from "@/src/features/public-api/server/withMiddlewares";
+import { createAuthedAPIRoute } from "@/src/features/public-api/server/createAuthedAPIRoute";
+import { z } from "zod";
+
+export const config = {
+ api: {
+ bodyParser: false,
+ },
+};
+
+export default withMiddlewares({
+ POST: createAuthedAPIRoute({
+ name: "OTel Metrics",
+ querySchema: z.any(),
+ responseSchema: z.any(),
+ rateLimitResource: "ingestion",
+ fn: async ({ res }) => {
+ // Just return a 200 status code without processing the request body
+ return res.status(200).json({ status: "ok" });
+ },
+ }),
+});