// apps/web-tanstack/src/instrumentation.ts
// Server-entry hook. Imported at the top of the server entry file before any
// request handler runs. Initializes the OTel SDK here so PII scrub processors
// are active from the very first request (C1 fix — closes the startup window
// where Sentry auto-instrumentation could send unscrubbed errors).
import { initOtelServerNode } from "@repo/core-shared/instrumentation/otel/init-server-node";

initOtelServerNode({
  dsn: process.env["WEB_TANSTACK_SENTRY_DSN"] ?? "",
  serviceName: "web-tanstack",
  environment: process.env["NODE_ENV"] ?? "development",
});
