feat(server/otel): restructure observability metrics and add active sessions gauge
- Moved RateLimitMetrics import path to a more centralized location. - Introduced a new file for active sessions gauge to track user sessions in the database. - Updated index.ts to include new metrics and ensure proper initialization of observability metrics. - Modified various routes and services to utilize the new observability structure. - Added smoke tests for HTTP and WebSocket metrics to ensure proper metric registration and functionality. - Enhanced error handling for metrics reading failures to improve observability.
This commit is contained in:
@@ -6,13 +6,14 @@
|
||||
"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 --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",
|
||||
"dev": "pnpm run apply:env -- tsx --import ./instrumentation.ts --watch src/bin/run.ts api",
|
||||
"start": "pnpm run apply:env -- tsx --import ./instrumentation.ts src/bin/run.ts api",
|
||||
"server": "pnpm run apply:env -- tsx --import ./instrumentation.ts src/bin/run.ts",
|
||||
"build": "tsc -b",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"db:generate": "drizzle-kit generate",
|
||||
"db:push": "pnpm run apply:env -- drizzle-kit push"
|
||||
"db:push": "pnpm run apply:env -- drizzle-kit push",
|
||||
"otel:dashboards": "tsx otel/grafana/dashboards/build.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@better-auth/drizzle-adapter": "^1.6.5",
|
||||
|
||||
Reference in New Issue
Block a user