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

Function shutdownPostHog

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

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 4

getPostHogClientFunction · 0.85
infoMethod · 0.80
errorMethod · 0.80
shutdownMethod · 0.65

Tested by

no test coverage detected