MCPcopy
hub / github.com/simstudioai/sim / register

Function register

apps/sim/instrumentation-node.ts:349–367  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

347}
348
349export 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}

Callers

nothing calls this directly

Calls 3

initializeOpenTelemetryFunction · 0.85
startMemoryTelemetryFunction · 0.85
onMethod · 0.80

Tested by

no test coverage detected