{"version":3,"file":"preload.js","sources":["../../src/preload.ts"],"sourcesContent":["import { envToBool } from '@sentry/node-core';\nimport { preloadOpenTelemetry } from './sdk/initOtel';\n\nconst debug = envToBool(process.env.SENTRY_DEBUG);\nconst integrationsStr = process.env.SENTRY_PRELOAD_INTEGRATIONS;\n\nconst integrations = integrationsStr ? integrationsStr.split(',').map(integration => integration.trim()) : undefined;\n\n/**\n * The @sentry/node/preload export can be used with the node --import and --require args to preload the OTEL\n * instrumentation, without initializing the Sentry SDK.\n *\n * This is useful if you cannot initialize the SDK immediately, but still want to preload the instrumentation,\n * e.g. if you have to load the DSN from somewhere else.\n *\n * You can configure this in two ways via environment variables:\n * - `SENTRY_DEBUG` to enable debug logging\n * - `SENTRY_PRELOAD_INTEGRATIONS` to preload specific integrations - e.g. `SENTRY_PRELOAD_INTEGRATIONS=\"Http,Express\"`\n */\npreloadOpenTelemetry({ debug, integrations });\n"],"names":[],"mappings":";;;AAGA,MAAM,KAAA,GAAQ,SAAA,CAAU,OAAA,CAAQ,GAAA,CAAI,YAAY,CAAA;AAChD,MAAM,eAAA,GAAkB,QAAQ,GAAA,CAAI,2BAAA;AAEpC,MAAM,YAAA,GAAe,eAAA,GAAkB,eAAA,CAAgB,KAAA,CAAM,GAAG,CAAA,CAAE,GAAA,CAAI,CAAA,WAAA,KAAe,WAAA,CAAY,IAAA,EAAM,CAAA,GAAI,MAAA;AAa3G,oBAAA,CAAqB,EAAE,KAAA,EAAO,YAAA,EAAc,CAAA"}