()
| 347 | } |
| 348 | |
| 349 | export async function register() { |
| 350 | await initializeOpenTelemetry() |
| 351 | |
| 352 | const shutdownPostHog = async () => { |
| 353 | try { |
| 354 | const { getPostHogClient } = await import('@/lib/posthog/server') |
| 355 | await getPostHogClient()?.shutdown() |
| 356 | logger.info('PostHog client shut down successfully') |
| 357 | } catch (err) { |
| 358 | logger.error('Error shutting down PostHog client', err) |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | process.on('SIGTERM', shutdownPostHog) |
| 363 | process.on('SIGINT', shutdownPostHog) |
| 364 | |
| 365 | const { startMemoryTelemetry } = await import('./lib/monitoring/memory-telemetry') |
| 366 | startMemoryTelemetry() |
| 367 | } |
nothing calls this directly
no test coverage detected