feat(otel): server instrumentation script

This commit is contained in:
RainbowBird
2026-04-02 18:21:30 +08:00
parent 457ad19f09
commit 9451cd7cc0
5 changed files with 48 additions and 20 deletions
+4 -3
View File
@@ -6,9 +6,9 @@
"scripts": {
"apply:env": "dotenvx run -f .env.local --overload --ignore=MISSING_ENV_FILE",
"auth:generate": "pnpm run apply:env -- better-auth generate --config src/scripts/auth.ts --output src/schemas/accounts.ts -y",
"dev": "pnpm run apply:env -- tsx --watch src/bin/run.ts api",
"start": "pnpm run apply:env -- tsx src/bin/run.ts api",
"server": "pnpm run apply:env -- tsx src/bin/run.ts",
"dev": "pnpm run apply:env -- tsx --import ./instrumentation.mjs --watch src/bin/run.ts api",
"start": "pnpm run apply:env -- tsx --import ./instrumentation.mjs src/bin/run.ts api",
"server": "pnpm run apply:env -- tsx --import ./instrumentation.mjs src/bin/run.ts",
"build": "tsc -b",
"typecheck": "tsc --noEmit",
"db:generate": "drizzle-kit generate",
@@ -29,6 +29,7 @@
"@opentelemetry/exporter-logs-otlp-proto": "^0.214.0",
"@opentelemetry/exporter-metrics-otlp-proto": "^0.214.0",
"@opentelemetry/exporter-trace-otlp-proto": "^0.214.0",
"@opentelemetry/instrumentation": "^0.214.0",
"@opentelemetry/instrumentation-http": "^0.214.0",
"@opentelemetry/instrumentation-ioredis": "^0.62.0",
"@opentelemetry/instrumentation-pg": "^0.66.0",