Add Sentry, Pino logs, and OTel spans on WS pipeline (M2).

Capture REST/WS/SSE errors in Sentry, emit structured pino logs with correlation IDs, and trace the book-tick pipeline to Sentry via OpenTelemetry.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Mauricio Barragan
2026-06-11 01:01:20 -06:00
parent f4def0c214
commit fd4170963e
22 changed files with 1280 additions and 50 deletions
+6
View File
@@ -1,4 +1,9 @@
import { initInstrumentation } from "./instrumentation/index.js";
initInstrumentation();
import express from "express";
import * as Sentry from "@sentry/node";
import { apiReference } from "@scalar/express-api-reference";
import { existsSync } from "node:fs";
import { fileURLToPath } from "node:url";
@@ -25,6 +30,7 @@ function main(): void {
const server = express();
server.use(express.json());
server.use("/api", createRouter(ctx.application, sse));
Sentry.setupExpressErrorHandler(server);
server.use(
"/api-docs",