fix: Enable Next.js instrumentation hook to start critical services on startup

Add `instrumentationHook: true` to `next.config.js` experimental section.

This fixes a critical bug where the instrumentation.ts file was not being
executed on server startup, causing all startup services to not run:
- Stop Hunt Revenge Tracker (93 revenge opportunities missed)
- Position Manager (no monitoring of open trades)
- Ghost Position Cleanup
- Data Cleanup Service
- Blocked Signal Tracking
- Smart Validation Queue
- Database Sync Validator

The instrumentation.ts file existed and contained proper initialization code,
but Next.js requires explicit opt-in via the experimental.instrumentationHook
flag to enable this feature.

Co-authored-by: mindesbunister <32161838+mindesbunister@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-05 14:21:16 +00:00
parent 0a768e2f5c
commit 5711fc2fec

View File

@@ -2,6 +2,7 @@
const nextConfig = { const nextConfig = {
output: 'standalone', output: 'standalone',
experimental: { experimental: {
instrumentationHook: true, // Enable instrumentation.ts on server startup
serverActions: { serverActions: {
bodySizeLimit: '2mb', bodySizeLimit: '2mb',
}, },