@sentry/node
Advanced tools
Comparing version 8.37.1 to 8.38.0
@@ -31,2 +31,4 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
const spotlight = require('./integrations/spotlight.js'); | ||
const knex = require('./integrations/tracing/knex.js'); | ||
const tedious = require('./integrations/tracing/tedious.js'); | ||
const genericPool = require('./integrations/tracing/genericPool.js'); | ||
@@ -87,2 +89,4 @@ const dataloader = require('./integrations/tracing/dataloader.js'); | ||
exports.spotlightIntegration = spotlight.spotlightIntegration; | ||
exports.knexIntegration = knex.knexIntegration; | ||
exports.tediousIntegration = tedious.tediousIntegration; | ||
exports.genericPoolIntegration = genericPool.genericPoolIntegration; | ||
@@ -89,0 +93,0 @@ exports.dataloaderIntegration = dataloader.dataloaderIntegration; |
@@ -8,2 +8,3 @@ var { | ||
const diagnosticsChannel = require('node:diagnostics_channel'); | ||
const node_worker_threads = require('node:worker_threads'); | ||
@@ -15,3 +16,3 @@ const core = require('@sentry/core'); | ||
// This string is a placeholder that gets overwritten with the worker code. | ||
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjM3LjEgKGYyN2VlNGUpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyB0fWZyb20ibm9kZTppbnNwZWN0b3IiO2ltcG9ydHtwYXJlbnRQb3J0IGFzIG4sd29ya2VyRGF0YSBhcyBlfWZyb20ibm9kZTp3b3JrZXJfdGhyZWFkcyI7aW1wb3J0e3Bvc2l4IGFzIHIsc2VwIGFzIG99ZnJvbSJub2RlOnBhdGgiO2ltcG9ydCphcyBzIGZyb20ibm9kZTpodHRwIjtpbXBvcnQqYXMgaSBmcm9tIm5vZGU6aHR0cHMiO2ltcG9ydHtSZWFkYWJsZSBhcyBjfWZyb20ibm9kZTpzdHJlYW0iO2ltcG9ydHtjcmVhdGVHemlwIGFzIHV9ZnJvbSJub2RlOnpsaWIiO2ltcG9ydCphcyBh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y29uc3R7cG9sbDpDbn09ZnVuY3Rpb24odCxuLGUscil7Y29uc3Qgbz10KCk7bGV0IHM9ITEsaT0hMDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCgpPT57Y29uc3QgdD1vLmdldFRpbWVNcygpOyExPT09cyYmdD5uK2UmJihzPSEwLGkmJnIoKSksdDxuK2UmJihzPSExKX0pLDIwKSx7cG9sbDooKT0+e28ucmVzZXQoKX0sZW5hYmxlZDp0PT57aT10fX19KChmdW5jdGlvbigpe2xldCB0PXByb2Nlc3MuaHJ0aW1lKCk7cmV0dXJue2dldFRpbWVNczooKT0+e2NvbnN0W24sZV09cHJvY2Vzcy5ocnRpbWUodCk7cmV0dXJuIE1hdGguZmxvb3IoMWUzKm4rZS8xZTYpfSxyZXNldDooKT0+e3Q9cHJvY2Vzcy5ocnRpbWUoKX19fSksZG4ucG9sbEludGVydmFsLGRuLmFuclRocmVzaG9sZCwoZnVuY3Rpb24oKXtibigiV2F0Y2hkb2cgdGltZW91dCIpLE5uPyhibigiUGF1c2luZyBkZWJ1Z2dlciB0byBjYXB0dXJlIHN0YWNrIHRyYWNlIiksTm4oKSk6KGJuKCJDYXB0dXJpbmcgZXZlbnQgd2l0aG91dCBhIHN0YWNrIHRyYWNlIikseG4oKS50aGVuKG51bGwsKCgpPT57Ym4oIlNlbmRpbmcgQU5SIGV2ZW50IGZhaWxlZCBvbiB3YXRjaGRvZyB0aW1lb3V0LiIpfSkpKX0pKTtuPy5vbigibWVzc2FnZSIsKHQ9Pnt0LnNlc3Npb24mJihtbj15dCh0LnNlc3Npb24pKSx0LmRlYnVnSW1hZ2VzJiYoZ249dC5kZWJ1Z0ltYWdlcyksQ24oKX0pKTs='; | ||
@@ -105,2 +106,9 @@ const DEFAULT_INTERVAL = 50; | ||
function onModuleLoad(callback) { | ||
// eslint-disable-next-line deprecation/deprecation | ||
diagnosticsChannel.channel('module.require.end').subscribe(() => callback()); | ||
// eslint-disable-next-line deprecation/deprecation | ||
diagnosticsChannel.channel('module.import.asyncEnd').subscribe(() => callback()); | ||
} | ||
/** | ||
@@ -159,2 +167,8 @@ * Starts the ANR worker thread | ||
let debugImages = utils.getFilenameToDebugIdMap(initOptions.stackParser); | ||
onModuleLoad(() => { | ||
debugImages = utils.getFilenameToDebugIdMap(initOptions.stackParser); | ||
}); | ||
const worker = new node_worker_threads.Worker(new URL(`data:application/javascript;base64,${base64WorkerScript}`), { | ||
@@ -178,3 +192,3 @@ workerData: options, | ||
// message the worker to tell it the main event loop is still running | ||
worker.postMessage({ session }); | ||
worker.postMessage({ session, debugImages }); | ||
} catch (_) { | ||
@@ -181,0 +195,0 @@ // |
@@ -13,3 +13,3 @@ var { | ||
// This string is a placeholder that gets overwritten with the worker code. | ||
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjM3LjEgKGYyN2VlNGUpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPSI4LjM3LjEiLG89Z2xvYmFsVGhpcztjb25zdCBpPSJ1bmRlZmluZWQiPT10eXBlb2YgX19TRU5UUllfREVCVUdfX3x8X19TRU5UUllfREVCVUdfXyxhPVsiZGVidWciLCJpbmZvIiwid2FybiIsImVycm9yIiwibG9nIiwiYXNzZXJ0IiwidHJhY2UiXSxzPXt9O2Z1bmN0aW9uIGMoZSl7aWYoISgiY29uc29sZSJpbiBvKSlyZXR1cm4gZSgpO2NvbnN0IHQ9by5jb25zb2xlLG49e30saT1PYmplY3Qua2V5cyhzKTtpLmZvckVhY2goKGU9Pntjb25zdCBvPXNbZV07bltlXT10W2VdLHRbZV09b30pKTt0cnl7cmV0dXJuIGUoKX1maW5hbGx5e2kuZm9yRWFjaCgoZT0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PT1hJiZ0KCkpLG89MH0pLDFlMykudW5yZWYoKSwoKT0+e28rPTF9fShlLChhc3luYygpPT57bCgiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9KSwoYXN5bmMgZT0+e2woYFJhdGUtbGltaXQgZXhjZWVkZWQuIERpc2FibGluZyBjYXB0dXJpbmcgb2YgY2F1Z2h0IGV4Y2VwdGlvbnMgZm9yICR7ZX0gc2Vjb25kcy5gKSxhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6InVuY2F1Z2h0In0pfSkpfX0pKCkuY2F0Y2goKGU9PntsKCJGYWlsZWQgdG8gc3RhcnQgZGVidWdnZXIiLGUpfSkpLHNldEludGVydmFsKCgoKT0+e30pLDFlNCk7'; | ||
@@ -16,0 +16,0 @@ function log(...args) { |
@@ -30,2 +30,16 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
* Adds Sentry tracing instrumentation for the [amqplib](https://www.npmjs.com/package/amqplib) library. | ||
* | ||
* For more information, see the [`amqplibIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/amqplib/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.amqplibIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
const amqplibIntegration = core.defineIntegration(_amqplibIntegration); | ||
@@ -32,0 +46,0 @@ |
@@ -21,2 +21,18 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
* Adds Sentry tracing instrumentation for [Connect](https://github.com/senchalabs/connect/). | ||
* | ||
* If you also want to capture errors, you need to call `setupConnectErrorHandler(app)` after you initialize your connect app. | ||
* | ||
* For more information, see the [connect documentation](https://docs.sentry.io/platforms/javascript/guides/connect/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.connectIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
const connectIntegration = core.defineIntegration(_connectIntegration); | ||
@@ -30,2 +46,21 @@ | ||
/** | ||
* Add a Connect middleware to capture errors to Sentry. | ||
* | ||
* @param app The Connect app to attach the error handler to | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const connect = require("connect"); | ||
* | ||
* const app = connect(); | ||
* | ||
* Sentry.setupConnectErrorHandler(app); | ||
* | ||
* // Add you connect routes here | ||
* | ||
* app.listen(3000); | ||
* ``` | ||
*/ | ||
const setupConnectErrorHandler = (app) => { | ||
@@ -32,0 +67,0 @@ app.use(connectErrorMiddleware); |
@@ -53,5 +53,14 @@ var { | ||
/** | ||
* Dataloader integration | ||
* Adds Sentry tracing instrumentation for the [dataloader](https://www.npmjs.com/package/dataloader) library. | ||
* | ||
* Capture tracing data for Dataloader. | ||
* For more information, see the [`dataloaderIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/dataloader/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.dataloaderIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -58,0 +67,0 @@ const dataloaderIntegration = core.defineIntegration(_dataloaderIntegration); |
@@ -65,6 +65,16 @@ var { | ||
/** | ||
* Express integration | ||
* Adds Sentry tracing instrumentation for [Express](https://expressjs.com/). | ||
* | ||
* Capture tracing data for express. | ||
* In order to capture exceptions, you have to call `setupExpressErrorHandler(app)` before any other middleware and after all controllers. | ||
* If you also want to capture errors, you need to call `setupExpressErrorHandler(app)` after you set up your Express server. | ||
* | ||
* For more information, see the [express documentation](https://docs.sentry.io/platforms/javascript/guides/express/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.expressIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
@@ -116,4 +126,24 @@ const expressIntegration = core.defineIntegration(_expressIntegration); | ||
/** | ||
* Setup an error handler for Express. | ||
* Add an Express error handler to capture errors to Sentry. | ||
* | ||
* The error handler must be before any other middleware and after all controllers. | ||
* | ||
* @param app The Express instances | ||
* @param options {ExpressHandlerOptions} Configuration options for the handler | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const express = require("express"); | ||
* | ||
* const app = express(); | ||
* | ||
* // Add your routes, etc. | ||
* | ||
* // Add this after all routes, | ||
* // but before any and other error-handling middlewares are defined | ||
* Sentry.setupExpressErrorHandler(app); | ||
* | ||
* app.listen(3000); | ||
* ``` | ||
*/ | ||
@@ -120,0 +150,0 @@ function setupExpressErrorHandler( |
@@ -36,5 +36,16 @@ var { | ||
/** | ||
* Express integration | ||
* Adds Sentry tracing instrumentation for [Fastify](https://fastify.dev/). | ||
* | ||
* Capture tracing data for fastify. | ||
* If you also want to capture errors, you need to call `setupFastifyErrorHandler(app)` after you set up your Fastify server. | ||
* | ||
* For more information, see the [fastify documentation](https://docs.sentry.io/platforms/javascript/guides/fastify/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.fastifyIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
@@ -44,3 +55,19 @@ const fastifyIntegration = core.defineIntegration(_fastifyIntegration); | ||
/** | ||
* Setup an error handler for Fastify. | ||
* Add an Fastify error handler to capture errors to Sentry. | ||
* | ||
* @param fastify The Fastify instance to which to add the error handler | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const Fastify = require("fastify"); | ||
* | ||
* const app = Fastify(); | ||
* | ||
* Sentry.setupFastifyErrorHandler(app); | ||
* | ||
* // Add your routes, etc. | ||
* | ||
* app.listen({ port: 3000 }); | ||
* ``` | ||
*/ | ||
@@ -47,0 +74,0 @@ function setupFastifyErrorHandler(fastify) { |
@@ -37,5 +37,14 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
* GenericPool integration | ||
* Adds Sentry tracing instrumentation for the [generic-pool](https://www.npmjs.com/package/generic-pool) library. | ||
* | ||
* Capture tracing data for GenericPool. | ||
* For more information, see the [`genericPoolIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/genericpool/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.genericPoolIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -42,0 +51,0 @@ const genericPoolIntegration = core.defineIntegration(_genericPoolIntegration); |
@@ -67,5 +67,15 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
* GraphQL integration | ||
* Adds Sentry tracing instrumentation for the [graphql](https://www.npmjs.com/package/graphql) library. | ||
* | ||
* Capture tracing data for GraphQL. | ||
* For more information, see the [`graphqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/graphql/). | ||
* | ||
* @param {GraphqlOptions} options Configuration options for the GraphQL integration. | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.graphqlIntegration()], | ||
* }); | ||
*/ | ||
@@ -72,0 +82,0 @@ const graphqlIntegration = core.defineIntegration(_graphqlIntegration); |
@@ -28,6 +28,16 @@ var { | ||
/** | ||
* Hapi integration | ||
* Adds Sentry tracing instrumentation for [Hapi](https://hapi.dev/). | ||
* | ||
* Capture tracing data for Hapi. | ||
* If you also want to capture errors, you need to call `setupHapiErrorHandler(server)` after you set up your server. | ||
* | ||
* For more information, see the [hapi documentation](https://docs.sentry.io/platforms/javascript/guides/hapi/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.hapiIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
@@ -79,2 +89,20 @@ const hapiIntegration = core.defineIntegration(_hapiIntegration); | ||
* Add a Hapi plugin to capture errors to Sentry. | ||
* | ||
* @param server The Hapi server to attach the error handler to | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const Hapi = require('@hapi/hapi'); | ||
* | ||
* const init = async () => { | ||
* const server = Hapi.server(); | ||
* | ||
* // all your routes here | ||
* | ||
* await Sentry.setupHapiErrorHandler(server); | ||
* | ||
* await server.start(); | ||
* }; | ||
* ``` | ||
*/ | ||
@@ -81,0 +109,0 @@ async function setupHapiErrorHandler(server) { |
@@ -21,2 +21,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
const redis = require('./redis.js'); | ||
const tedious = require('./tedious.js'); | ||
@@ -45,2 +46,3 @@ /** | ||
connect.connectIntegration(), | ||
tedious.tediousIntegration(), | ||
genericPool.genericPoolIntegration(), | ||
@@ -76,2 +78,3 @@ kafka.kafkaIntegration(), | ||
redis.instrumentRedis, | ||
tedious.instrumentTedious, | ||
genericPool.instrumentGenericPool, | ||
@@ -78,0 +81,0 @@ amqplib.instrumentAmqplib, |
@@ -33,5 +33,13 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
* KafkaJs integration | ||
* Adds Sentry tracing instrumentation for the [kafkajs](https://www.npmjs.com/package/kafkajs) library. | ||
* | ||
* Capture tracing data for KafkaJs. | ||
* For more information, see the [`kafkaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/kafka/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.kafkaIntegration()], | ||
* }); | ||
*/ | ||
@@ -38,0 +46,0 @@ const kafkaIntegration = core.defineIntegration(_kafkaIntegration); |
@@ -48,4 +48,42 @@ var { | ||
/** | ||
* Adds Sentry tracing instrumentation for [Koa](https://koajs.com/). | ||
* | ||
* If you also want to capture errors, you need to call `setupKoaErrorHandler(app)` after you set up your Koa server. | ||
* | ||
* For more information, see the [koa documentation](https://docs.sentry.io/platforms/javascript/guides/koa/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.koaIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
const koaIntegration = core.defineIntegration(_koaIntegration); | ||
/** | ||
* Add an Koa error handler to capture errors to Sentry. | ||
* | ||
* The error handler must be before any other middleware and after all controllers. | ||
* | ||
* @param app The Express instances | ||
* @param options {ExpressHandlerOptions} Configuration options for the handler | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const Koa = require("koa"); | ||
* | ||
* const app = new Koa(); | ||
* | ||
* Sentry.setupKoaErrorHandler(app); | ||
* | ||
* // Add your routes, etc. | ||
* | ||
* app.listen(3000); | ||
* ``` | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
@@ -52,0 +90,0 @@ const setupKoaErrorHandler = (app) => { |
@@ -21,5 +21,13 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
* LruMemoizer integration | ||
* Adds Sentry tracing instrumentation for the [lru-memoizer](https://www.npmjs.com/package/lru-memoizer) library. | ||
* | ||
* Propagate traces through LruMemoizer. | ||
* For more information, see the [`lruMemoizerIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/lrumemoizer/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.lruMemoizerIntegration()], | ||
* }); | ||
*/ | ||
@@ -26,0 +34,0 @@ const lruMemoizerIntegration = core.defineIntegration(_lruMemoizerIntegration); |
@@ -30,5 +30,14 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
* MongoDB integration | ||
* Adds Sentry tracing instrumentation for the [mongodb](https://www.npmjs.com/package/mongodb) library. | ||
* | ||
* Capture tracing data for MongoDB. | ||
* For more information, see the [`mongoIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongo/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mongoIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -35,0 +44,0 @@ const mongoIntegration = core.defineIntegration(_mongoIntegration); |
@@ -30,5 +30,14 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
* Mongoose integration | ||
* Adds Sentry tracing instrumentation for the [mongoose](https://www.npmjs.com/package/mongoose) library. | ||
* | ||
* Capture tracing data for Mongoose. | ||
* For more information, see the [`mongooseIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongoose/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mongooseIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -35,0 +44,0 @@ const mongooseIntegration = core.defineIntegration(_mongooseIntegration); |
@@ -21,5 +21,14 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
* MySQL integration | ||
* Adds Sentry tracing instrumentation for the [mysql](https://www.npmjs.com/package/mysql) library. | ||
* | ||
* Capture tracing data for mysql. | ||
* For more information, see the [`mysqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mysqlIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -26,0 +35,0 @@ const mysqlIntegration = core.defineIntegration(_mysqlIntegration); |
@@ -30,5 +30,14 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
* MySQL2 integration | ||
* Adds Sentry tracing instrumentation for the [mysql2](https://www.npmjs.com/package/mysql2) library. | ||
* | ||
* Capture tracing data for mysql2 | ||
* For more information, see the [`mysql2Integration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql2/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mysqlIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -35,0 +44,0 @@ const mysql2Integration = core.defineIntegration(_mysql2Integration); |
@@ -31,5 +31,14 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
* Postgres integration | ||
* Adds Sentry tracing instrumentation for the [pg](https://www.npmjs.com/package/pg) library. | ||
* | ||
* Capture tracing data for pg. | ||
* For more information, see the [`postgresIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/postgres/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.postgresIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -36,0 +45,0 @@ const postgresIntegration = core.defineIntegration(_postgresIntegration); |
@@ -45,9 +45,27 @@ var { | ||
/** | ||
* Prisma integration | ||
* Adds Sentry tracing instrumentation for the [prisma](https://www.npmjs.com/package/prisma) library. | ||
* | ||
* Capture tracing data for prisma. | ||
* Note: This requires to set: | ||
* previewFeatures = ["tracing"] | ||
* For the prisma client. | ||
* See https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing for more details. | ||
* For more information, see the [`prismaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/). | ||
* | ||
* @example | ||
* | ||
* Make sure `previewFeatures = ["tracing"]` is set in the prisma client generator block. See the | ||
* [prisma docs](https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing) for more details. | ||
* | ||
* ```prisma | ||
* generator client { | ||
* provider = "prisma-client-js" | ||
* previewFeatures = ["tracing"] | ||
* } | ||
* ``` | ||
* | ||
* Then you can use the integration like this: | ||
* | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.prismaIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -54,0 +72,0 @@ const prismaIntegration = core.defineIntegration(_prismaIntegration); |
@@ -97,5 +97,15 @@ var { | ||
/** | ||
* Redis integration for "ioredis" | ||
* Adds Sentry tracing instrumentation for the [redis](https://www.npmjs.com/package/redis) and | ||
* [ioredis](https://www.npmjs.com/package/ioredis) libraries. | ||
* | ||
* Capture tracing data for redis and ioredis. | ||
* For more information, see the [`redisIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/redis/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.redisIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -102,0 +112,0 @@ const redisIntegration = core.defineIntegration(_redisIntegration); |
@@ -29,2 +29,4 @@ export { httpIntegration } from './integrations/http/index.js'; | ||
export { spotlightIntegration } from './integrations/spotlight.js'; | ||
export { knexIntegration } from './integrations/tracing/knex.js'; | ||
export { tediousIntegration } from './integrations/tracing/tedious.js'; | ||
export { genericPoolIntegration } from './integrations/tracing/genericPool.js'; | ||
@@ -31,0 +33,0 @@ export { dataloaderIntegration } from './integrations/tracing/dataloader.js'; |
import { _optionalChain, _optionalChainDelete } from '@sentry/utils'; | ||
import * as diagnosticsChannel from 'node:diagnostics_channel'; | ||
import { Worker } from 'node:worker_threads'; | ||
import { defineIntegration, getGlobalScope, mergeScopeData, getIsolationScope, getCurrentScope } from '@sentry/core'; | ||
import { logger, GLOBAL_OBJ } from '@sentry/utils'; | ||
import { logger, getFilenameToDebugIdMap, GLOBAL_OBJ } from '@sentry/utils'; | ||
import { NODE_VERSION } from '../../nodeVersion.js'; | ||
// This string is a placeholder that gets overwritten with the worker code. | ||
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjM3LjEgKGYyN2VlNGUpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyB0fWZyb20ibm9kZTppbnNwZWN0b3IiO2ltcG9ydHtwYXJlbnRQb3J0IGFzIG4sd29ya2VyRGF0YSBhcyBlfWZyb20ibm9kZTp3b3JrZXJfdGhyZWFkcyI7aW1wb3J0e3Bvc2l4IGFzIHIsc2VwIGFzIG99ZnJvbSJub2RlOnBhdGgiO2ltcG9ydCphcyBzIGZyb20ibm9kZTpodHRwIjtpbXBvcnQqYXMgaSBmcm9tIm5vZGU6aHR0cHMiO2ltcG9ydHtSZWFkYWJsZSBhcyBjfWZyb20ibm9kZTpzdHJlYW0iO2ltcG9ydHtjcmVhdGVHemlwIGFzIHV9ZnJvbSJub2RlOnpsaWIiO2ltcG9ydCphcyBhIGZyb20ibm9kZTpuZXQiO2ltcG9ydCphcyBmIGZyb20ibm9kZTp0bHMiO2NvbnN0IGg9T2JqZWN0LnByb3RvdHlwZS50b1N0cmluZztmdW5jdGlvbiBwKHQsbil7cmV0dXJuIGguY2FsbCh0KT09PWBbb2JqZWN0ICR7bn1dYH1mdW5jdGlvbiBsKHQpe3JldHVybiBwKHQsIlN0cmluZyIpfWZ1bmN0aW9uIGQodCl7cmV0dXJuIHAodCwiT2JqZWN0Iil9ZnVuY3Rpb24gbSh0KXtyZXR1cm4gQm9vbGVhbih0JiZ0LnRoZW4mJiJmdW5jdGlvbiI9PXR5cGVvZiB0LnRoZW4pfWZ1bmN0aW9uIHkodCxuKXt0cnl7cmV0dXJuIHQgaW5zdGFuY2VvZiBufWNhdGNoKHQpe3JldHVybiExfX1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cy5ocnRpbWUoKX19fSksZG4ucG9sbEludGVydmFsLGRuLmFuclRocmVzaG9sZCwoZnVuY3Rpb24oKXtibigiV2F0Y2hkb2cgdGltZW91dCIpLE5uPyhibigiUGF1c2luZyBkZWJ1Z2dlciB0byBjYXB0dXJlIHN0YWNrIHRyYWNlIiksTm4oKSk6KGJuKCJDYXB0dXJpbmcgZXZlbnQgd2l0aG91dCBhIHN0YWNrIHRyYWNlIikseG4oKS50aGVuKG51bGwsKCgpPT57Ym4oIlNlbmRpbmcgQU5SIGV2ZW50IGZhaWxlZCBvbiB3YXRjaGRvZyB0aW1lb3V0LiIpfSkpKX0pKTtuPy5vbigibWVzc2FnZSIsKHQ9Pnt0LnNlc3Npb24mJihtbj15dCh0LnNlc3Npb24pKSx0LmRlYnVnSW1hZ2VzJiYoZ249dC5kZWJ1Z0ltYWdlcyksQ24oKX0pKTs='; | ||
@@ -97,2 +98,9 @@ const DEFAULT_INTERVAL = 50; | ||
function onModuleLoad(callback) { | ||
// eslint-disable-next-line deprecation/deprecation | ||
diagnosticsChannel.channel('module.require.end').subscribe(() => callback()); | ||
// eslint-disable-next-line deprecation/deprecation | ||
diagnosticsChannel.channel('module.import.asyncEnd').subscribe(() => callback()); | ||
} | ||
/** | ||
@@ -151,2 +159,8 @@ * Starts the ANR worker thread | ||
let debugImages = getFilenameToDebugIdMap(initOptions.stackParser); | ||
onModuleLoad(() => { | ||
debugImages = getFilenameToDebugIdMap(initOptions.stackParser); | ||
}); | ||
const worker = new Worker(new URL(`data:application/javascript;base64,${base64WorkerScript}`), { | ||
@@ -170,3 +184,3 @@ workerData: options, | ||
// message the worker to tell it the main event loop is still running | ||
worker.postMessage({ session }); | ||
worker.postMessage({ session, debugImages }); | ||
} catch (_) { | ||
@@ -173,0 +187,0 @@ // |
@@ -1,2 +0,2 @@ | ||
/*! @sentry/node 8.37.1 (f27ee4e) | https://github.com/getsentry/sentry-javascript */ | ||
import{Session as t}from"node:inspector";import{parentPort as n,workerData as e}from"node:worker_threads";import{posix as r,sep as o}from"node:path";import*as s from"node:http";import*as i from"node:https";import{Readable as c}from"node:stream";import{createGzip as u}from"node:zlib";import*as a from"node:net";import*as f from"node:tls";const h=Object.prototype.toString;function p(t,n){return h.call(t)===`[object ${n}]`}function l(t){return p(t,"String")}function d(t){return p(t,"Object")}function m(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function y(t,n){try{return t instanceof n}catch(t){return!1}}const g="8.37.1",b=globalThis;function _(t,n,e){const r=b,o=r.__SENTRY__=r.__SENTRY__||{},s=o[g]=o[g]||{};return s[t]||(s[t]=n())}const v=b,w=80;function S(t,n){const e=t,r=[];if(!e||!e.tagName)return"";if(v.HTMLElement&&e instanceof HTMLElement&&e.dataset){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}r.push(e.tagName.toLowerCase());const o=n&&n.length?n.filter((t=>e.getAttribute(t))).map((t=>[t,e.getAttribute(t)])):null;if(o&&o.length)o.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else{e.id&&r.push(`#${e.id}`);const t=e.className;if(t&&l(t)){const n=t.split(/\s+/);for(const t of n)r.push(`.${t}`)}}const s=["aria-label","type","name","title","alt"];for(const t of s){const n=e.getAttribute(t);n&&r.push(`[${t}="${n}"]`)}return r.join("")}const $="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,E=["debug","info","warn","error","log","assert","trace"],x={};function N(t){if(!("console"in b))return t();const n=b.console,e={},r=Object.keys(x);r.forEach((t=>{const r=x[t];e[t]=n[t],n[t]=r}));try{return t()}finally{r.forEach((t=>{n[t]=e[t]}))}}const C=_("logger",(function(){let t=!1;const n={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return $?E.forEach((e=>{n[e]=(...n)=>{t&&N((()=>{b.console[e](`Sentry Logger [${e}]:`,...n)}))}})):E.forEach((t=>{n[t]=()=>{}})),n}));function T(t,n=!1){const{host:e,path:r,pass:o,port:s,projectId:i,protocol:c,publicKey:u}=t;return`${c}://${u}${n&&o?`:${o}`:""}@${e}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}class k extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function R(t){if(function(t){switch(h.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return y(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...j(t)};if(n=t,"undefined"!=typeof Event&&y(n,Event)){const n={type:t.type,target:D(t.target),currentTarget:D(t.currentTarget),...j(t)};return"undefined"!=typeof CustomEvent&&y(t,CustomEvent)&&(n.detail=t.detail),n}return t;var n}function D(t){try{return n=t,"undefined"!=typeof Element&&y(n,Element)?function(t,n={}){if(!t)return"<unknown>";try{let e=t;const r=5,o=[];let s=0,i=0;const c=" > ",u=c.length;let a;const f=Array.isArray(n)?n:n.keyAttrs,h=!Array.isArray(n)&&n.maxStringLength||w;for(;e&&s++<r&&(a=S(e,f),!("html"===a||s>1&&i+o.length*u+a.length>=h));)o.push(a),i+=a.length,e=e.parentNode;return o.reverse().join(c)}catch(t){return"<unknown>"}}(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}var n}function j(t){if("object"==typeof t&&null!==t){const n={};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}return{}}function O(t){return A(t,new Map)}function A(t,n){if(function(t){if(!d(t))return!1;try{const n=Object.getPrototypeOf(t).constructor.name;return!n||"Object"===n}catch(t){return!0}}(t)){const e=n.get(t);if(void 0!==e)return e;const r={};n.set(t,r);for(const e of Object.getOwnPropertyNames(t))void 0!==t[e]&&(r[e]=A(t[e],n));return r}if(Array.isArray(t)){const e=n.get(t);if(void 0!==e)return e;const r=[];return n.set(t,r),t.forEach((t=>{r.push(A(t,n))})),r}return t}const I=50,P="?",U=/captureMessage|captureException/;function M(t){return t[t.length-1]||{}}const L="<anonymous>";const B=1e3;function G(){return Date.now()/B}const J=function(){const{performance:t}=b;if(!t||!t.now)return G;const n=Date.now()-t.now(),e=null==t.timeOrigin?n:t.timeOrigin;return()=>(e+t.now())/B}();function Y(){const t=b,n=t.crypto||t.msCrypto;let e=()=>16*Math.random();try{if(n&&n.randomUUID)return n.randomUUID().replace(/-/g,"");n&&n.getRandomValues&&(e=()=>{const t=new Uint8Array(1);return n.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&e())>>t/4).toString(16)))}function z(t,n=100,e=1/0){try{return H("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function H(t,n,e=1/0,r=1/0,o=function(){const t="function"==typeof WeakSet,n=t?new WeakSet:[];return[function(e){if(t)return!!n.has(e)||(n.add(e),!1);for(let t=0;t<n.length;t++)if(n[t]===e)return!0;return n.push(e),!1},function(e){if(t)n.delete(e);else for(let t=0;t<n.length;t++)if(n[t]===e){n.splice(t,1);break}}]}()){const[s,i]=o;if(null==n||["boolean","string"].includes(typeof n)||"number"==typeof n&&Number.isFinite(n))return n;const c=function(t,n){try{if("domain"===t&&n&&"object"==typeof n&&n.t)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&n===global)return"[Global]";if("undefined"!=typeof window&&n===window)return"[Window]";if("undefined"!=typeof document&&n===document)return"[Document]";if("object"==typeof(e=n)&&null!==e&&(e.__isVue||e.o))return"[VueViewModel]";if(function(t){return d(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}(n))return"[SyntheticEvent]";if("number"==typeof n&&!Number.isFinite(n))return`[${n}]`;if("function"==typeof n)return`[Function: ${function(t){try{return t&&"function"==typeof t&&t.name||L}catch(t){return L}}(n)}]`;if("symbol"==typeof n)return`[${String(n)}]`;if("bigint"==typeof n)return`[BigInt: ${String(n)}]`;const r=function(t){const n=Object.getPrototypeOf(t);return n?n.constructor.name:"null prototype"}(n);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var e}(t,n);if(!c.startsWith("[object "))return c;if(n.__sentry_skip_normalization__)return n;const u="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:e;if(0===u)return c.replace("object ","");if(s(n))return"[Circular ~]";const a=n;if(a&&"function"==typeof a.toJSON)try{return H("",a.toJSON(),u-1,r,o)}catch(t){}const f=Array.isArray(n)?[]:{};let h=0;const p=R(n);for(const t in p){if(!Object.prototype.hasOwnProperty.call(p,t))continue;if(h>=r){f[t]="[MaxProperties ~]";break}const n=p[t];f[t]=H(t,n,u-1,r,o),h++}return i(n),f}function W(t,n){const e=n.replace(/\\/g,"/").replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");let r=t;try{r=decodeURI(t)}catch(t){}return r.replace(/\\/g,"/").replace(/webpack:\/?/g,"").replace(new RegExp(`(file://)?/*${e}/*`,"ig"),"app:///")}(()=>{const{performance:t}=b;if(!t||!t.now)return;const n=36e5,e=t.now(),r=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+e-r):n,s=o<n,i=t.timing&&t.timing.navigationStart,c="number"==typeof i?Math.abs(i+e-r):n;(s||c<n)&&(o<=c&&t.timeOrigin)})();const F=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function K(t){const n=function(t){const n=t.length>1024?`<truncated>${t.slice(-1024)}`:t,e=F.exec(n);return e?e.slice(1):[]}(t),e=n[0]||"";let r=n[1];return e||r?(r&&(r=r.slice(0,r.length-1)),e+r):"."}var V;function Z(t){return new q((n=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(V||(V={}));class q{constructor(t){q.prototype.__init.call(this),q.prototype.__init2.call(this),q.prototype.__init3.call(this),q.prototype.__init4.call(this),this.i=V.PENDING,this.u=[];try{t(this.h,this.p)}catch(t){this.p(t)}}then(t,n){return new q(((e,r)=>{this.u.push([!1,n=>{if(t)try{e(t(n))}catch(t){r(t)}else e(n)},t=>{if(n)try{e(n(t))}catch(t){r(t)}else r(t)}]),this.l()}))}catch(t){return this.then((t=>t),t)}finally(t){return new q(((n,e)=>{let r,o;return this.then((n=>{o=!1,r=n,t&&t()}),(n=>{o=!0,r=n,t&&t()})).then((()=>{o?e(r):n(r)}))}))}__init(){this.h=t=>{this.m(V.RESOLVED,t)}}__init2(){this.p=t=>{this.m(V.REJECTED,t)}}__init3(){this.m=(t,n)=>{this.i===V.PENDING&&(m(n)?n.then(this.h,this.p):(this.i=t,this._=n,this.l()))}}__init4(){this.l=()=>{if(this.i===V.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.i===V.RESOLVED&&t[1](this._),this.i===V.REJECTED&&t[2](this._),t[0]=!0)}))}}}function Q(t){const n=[];function e(t){return n.splice(n.indexOf(t),1)[0]||Promise.resolve(void 0)}return{$:n,add:function(r){if(!(void 0===t||n.length<t))return o=new k("Not adding Promise because buffer limit was reached."),new q(((t,n)=>{n(o)}));var o;const s=r();return-1===n.indexOf(s)&&n.push(s),s.then((()=>e(s))).then(null,(()=>e(s).then(null,(()=>{})))),s},drain:function(t){return new q(((e,r)=>{let o=n.length;if(!o)return e(!0);const s=setTimeout((()=>{t&&t>0&&e(!1)}),t);n.forEach((t=>{Z(t).then((()=>{--o||(clearTimeout(s),e(!0))}),r)}))}))}}}function X(t,n=!1){return!(n||t&&!t.startsWith("/")&&!t.match(/^[A-Z]:/)&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==t&&!t.includes("node_modules/")}const tt="sentry-",nt=/^sentry-/;function et(t){const n=function(t){if(!t||!l(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce(((t,n)=>{const e=rt(n);return Object.entries(e).forEach((([n,e])=>{t[n]=e})),t}),{});return rt(t)}(t);if(!n)return;const e=Object.entries(n).reduce(((t,[n,e])=>{if(n.match(nt)){t[n.slice(tt.length)]=e}return t}),{});return Object.keys(e).length>0?e:void 0}function rt(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[n,e])=>(n&&e&&(t[n]=e),t)),{})}function ot(t,n=[]){return[t,n]}function st(t,n){const e=t[1];for(const t of e){if(n(t,t[0].type))return!0}return!1}function it(t){return b.__SENTRY__&&b.__SENTRY__.encodePolyfill?b.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function ct(t){const[n,e]=t;let r=JSON.stringify(n);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[it(r),t]:r.push("string"==typeof t?it(t):t)}for(const t of e){const[n,e]=t;if(o(`\n${JSON.stringify(n)}\n`),"string"==typeof e||e instanceof Uint8Array)o(e);else{let t;try{t=JSON.stringify(e)}catch(n){t=JSON.stringify(z(e))}o(t)}}return"string"==typeof r?r:function(t){const n=t.reduce(((t,n)=>t+n.length),0),e=new Uint8Array(n);let r=0;for(const n of t)e.set(n,r),r+=n.length;return e}(r)}const ut={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function at(t){if(!t||!t.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}const ft=6e4;function ht(t,{statusCode:n,headers:e},r=Date.now()){const o={...t},s=e&&e["x-sentry-rate-limits"],i=e&&e["retry-after"];if(s)for(const t of s.trim().split(",")){const[n,e,,,s]=t.split(":",5),i=parseInt(n,10),c=1e3*(isNaN(i)?60:i);if(e)for(const t of e.split(";"))"metric_bucket"===t&&s&&!s.split(";").includes("custom")||(o[t]=r+c);else o.all=r+c}else i?o.all=r+function(t,n=Date.now()){const e=parseInt(`${t}`,10);if(!isNaN(e))return 1e3*e;const r=Date.parse(`${t}`);return isNaN(r)?ft:r-n}(i,r):429===n&&(o.all=r+6e4);return o}function pt(){return{traceId:Y(),spanId:Y().substring(16)}}const lt="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function dt(){return mt(b),b}function mt(t){const n=t.__SENTRY__=t.__SENTRY__||{};return n.version=n.version||g,n[g]=n[g]||{}}function yt(t){const n=J(),e={sid:Y(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return O({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(e)};return t&>(e,t),e}function gt(t,n={}){if(n.user&&(!t.ipAddress&&n.user.ip_address&&(t.ipAddress=n.user.ip_address),t.did||n.did||(t.did=n.user.id||n.user.email||n.user.username)),t.timestamp=n.timestamp||J(),n.abnormal_mechanism&&(t.abnormal_mechanism=n.abnormal_mechanism),n.ignoreDuration&&(t.ignoreDuration=n.ignoreDuration),n.sid&&(t.sid=32===n.sid.length?n.sid:Y()),void 0!==n.init&&(t.init=n.init),!t.did&&n.did&&(t.did=`${n.did}`),"number"==typeof n.started&&(t.started=n.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof n.duration)t.duration=n.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}n.release&&(t.release=n.release),n.environment&&(t.environment=n.environment),!t.ipAddress&&n.ipAddress&&(t.ipAddress=n.ipAddress),!t.userAgent&&n.userAgent&&(t.userAgent=n.userAgent),"number"==typeof n.errors&&(t.errors=n.errors),n.status&&(t.status=n.status)}const bt="_sentrySpan";function _t(t,n){n?function(t,n,e){try{Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}catch(e){$&&C.log(`Failed to add non-enumerable property "${n}" to object`,t)}}(t,bt,n):delete t[bt]}function vt(t){return t[bt]}class wt{constructor(){this.v=!1,this.S=[],this.N=[],this.C=[],this.T=[],this.k={},this.R={},this.D={},this.j={},this.O={},this.A=pt()}clone(){const t=new wt;return t.C=[...this.C],t.R={...this.R},t.D={...this.D},t.j={...this.j},t.k=this.k,t.I=this.I,t.P=this.P,t.U=this.U,t.M=this.M,t.N=[...this.N],t.L=this.L,t.T=[...this.T],t.O={...this.O},t.A={...this.A},t.B=this.B,t.G=this.G,_t(t,vt(this)),t}setClient(t){this.B=t}setLastEventId(t){this.G=t}getClient(){return this.B}lastEventId(){return this.G}addScopeListener(t){this.S.push(t)}addEventProcessor(t){return this.N.push(t),this}setUser(t){return this.k=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.P&>(this.P,{user:t}),this.J(),this}getUser(){return this.k}getRequestSession(){return this.L}setRequestSession(t){return this.L=t,this}setTags(t){return this.R={...this.R,...t},this.J(),this}setTag(t,n){return this.R={...this.R,[t]:n},this.J(),this}setExtras(t){return this.D={...this.D,...t},this.J(),this}setExtra(t,n){return this.D={...this.D,[t]:n},this.J(),this}setFingerprint(t){return this.M=t,this.J(),this}setLevel(t){return this.I=t,this.J(),this}setTransactionName(t){return this.U=t,this.J(),this}setContext(t,n){return null===n?delete this.j[t]:this.j[t]=n,this.J(),this}setSession(t){return t?this.P=t:delete this.P,this.J(),this}getSession(){return this.P}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,[e,r]=n instanceof St?[n.getScopeData(),n.getRequestSession()]:d(n)?[t,t.requestSession]:[],{tags:o,extra:s,user:i,contexts:c,level:u,fingerprint:a=[],propagationContext:f}=e||{};return this.R={...this.R,...o},this.D={...this.D,...s},this.j={...this.j,...c},i&&Object.keys(i).length&&(this.k=i),u&&(this.I=u),a.length&&(this.M=a),f&&(this.A=f),r&&(this.L=r),this}clear(){return this.C=[],this.R={},this.D={},this.k={},this.j={},this.I=void 0,this.U=void 0,this.M=void 0,this.L=void 0,this.P=void 0,_t(this,void 0),this.T=[],this.A=pt(),this.J(),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:G(),...t},o=this.C;return o.push(r),this.C=o.length>e?o.slice(-e):o,this.J(),this}getLastBreadcrumb(){return this.C[this.C.length-1]}clearBreadcrumbs(){return this.C=[],this.J(),this}addAttachment(t){return this.T.push(t),this}clearAttachments(){return this.T=[],this}getScopeData(){return{breadcrumbs:this.C,attachments:this.T,contexts:this.j,tags:this.R,extra:this.D,user:this.k,level:this.I,fingerprint:this.M||[],eventProcessors:this.N,propagationContext:this.A,sdkProcessingMetadata:this.O,transactionName:this.U,span:vt(this)}}setSDKProcessingMetadata(t){return this.O={...this.O,...t},this}setPropagationContext(t){return this.A=t,this}getPropagationContext(){return this.A}captureException(t,n){const e=n&&n.event_id?n.event_id:Y();if(!this.B)return C.warn("No client configured on scope - will not capture exception!"),e;const r=new Error("Sentry syntheticException");return this.B.captureException(t,{originalException:t,syntheticException:r,...n,event_id:e},this),e}captureMessage(t,n,e){const r=e&&e.event_id?e.event_id:Y();if(!this.B)return C.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this.B.captureMessage(t,n,{originalException:t,syntheticException:o,...e,event_id:r},this),r}captureEvent(t,n){const e=n&&n.event_id?n.event_id:Y();return this.B?(this.B.captureEvent(t,{...n,event_id:e},this),e):(C.warn("No client configured on scope - will not capture event!"),e)}J(){this.v||(this.v=!0,this.S.forEach((t=>{t(this)})),this.v=!1)}}const St=wt;class $t{constructor(t,n){let e,r;e=t||new St,r=n||new St,this.Y=[{scope:e}],this.H=r}withScope(t){const n=this.W();let e;try{e=t(n)}catch(t){throw this.F(),t}return m(e)?e.then((t=>(this.F(),t)),(t=>{throw this.F(),t})):(this.F(),e)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.H}getStackTop(){return this.Y[this.Y.length-1]}W(){const t=this.getScope().clone();return this.Y.push({client:this.getClient(),scope:t}),t}F(){return!(this.Y.length<=1)&&!!this.Y.pop()}}function Et(){const t=mt(dt());return t.stack=t.stack||new $t(_("defaultCurrentScope",(()=>new St)),_("defaultIsolationScope",(()=>new St)))}function xt(t){return Et().withScope(t)}function Nt(t,n){const e=Et();return e.withScope((()=>(e.getStackTop().scope=t,n(t))))}function Ct(t){return Et().withScope((()=>t(Et().getIsolationScope())))}function Tt(t){const n=mt(t);return n.acs?n.acs:{withIsolationScope:Ct,withScope:xt,withSetScope:Nt,withSetIsolationScope:(t,n)=>Ct(n),getCurrentScope:()=>Et().getScope(),getIsolationScope:()=>Et().getIsolationScope()}}function kt(){return Tt(dt()).getCurrentScope().getClient()}const Rt="_sentryMetrics";function Dt(t){const n=t[Rt];if(!n)return;const e={};for(const[,[t,r]]of n){(e[t]||(e[t]=[])).push(O(r))}return e}const jt="sentry.source",Ot="sentry.sample_rate",At="sentry.op",It="sentry.origin",Pt=0,Ut=1,Mt=1;function Lt(t){const{spanId:n,traceId:e}=t.spanContext(),{parent_span_id:r}=Jt(t);return O({parent_span_id:r,span_id:n,trace_id:e})}function Bt(t){return"number"==typeof t?Gt(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Gt(t.getTime()):J()}function Gt(t){return t>9999999999?t/1e3:t}function Jt(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();try{const{spanId:n,traceId:e}=t.spanContext();if(function(t){const n=t;return!!(n.attributes&&n.startTime&&n.name&&n.endTime&&n.status)}(t)){const{attributes:r,startTime:o,name:s,endTime:i,parentSpanId:c,status:u}=t;return O({span_id:n,trace_id:e,data:r,description:s,parent_span_id:c,start_timestamp:Bt(o),timestamp:Bt(i)||void 0,status:Yt(u),op:r[At],origin:r[It],_metrics_summary:Dt(t)})}return{span_id:n,trace_id:e}}catch(t){return{}}}function Yt(t){if(t&&t.code!==Pt)return t.code===Ut?"ok":t.message||"unknown_error"}const zt="_sentryRootSpan";function Ht(t){return t[zt]||t}const Wt="production",Ft="_frozenDsc";function Kt(t){const n=kt();if(!n)return{};const e=function(t,n){const e=n.getOptions(),{publicKey:r}=n.getDsn()||{},o=O({environment:e.environment||Wt,release:e.release,public_key:r,trace_id:t});return n.emit("createDsc",o),o}(Jt(t).trace_id||"",n),r=Ht(t),o=r[Ft];if(o)return o;const s=r.spanContext().traceState,i=s&&s.get("sentry.dsc"),c=i&&et(i);if(c)return c;const u=Jt(r),a=u.data||{},f=a[Ot];null!=f&&(e.sample_rate=`${f}`);const h=a[jt],p=u.description;return"url"!==h&&p&&(e.transaction=p),function(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=kt(),e=n&&n.getOptions();return!!e&&(e.enableTracing||"tracesSampleRate"in e||"tracesSampler"in e)}()&&(e.sampled=String(function(t){const{traceFlags:n}=t.spanContext();return n===Mt}(r))),n.emit("createDsc",e,r),e}function Vt(t,n,e,r){const o=at(e),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,n){n&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||n.name,t.sdk.version=t.sdk.version||n.version,t.sdk.integrations=[...t.sdk.integrations||[],...n.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...n.packages||[]])}(t,e&&e.sdk);const i=function(t,n,e,r){const o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...n&&{sdk:n},...!!e&&r&&{dsn:T(r)},...o&&{trace:O({...o})}}}(t,o,r,n);delete t.sdkProcessingMetadata;return ot(i,[[{type:s},t]])}const Zt="__SENTRY_SUPPRESS_TRACING__";function qt(t){const n=Tt(dt());return n.suppressTracing?n.suppressTracing(t):function(...t){const n=Tt(dt());if(2===t.length){const[e,r]=t;return e?n.withSetScope(e,r):n.withScope(r)}return n.withScope(t[0])}((n=>(n.setSDKProcessingMetadata({[Zt]:!0}),t())))}function Qt(t,n){const{fingerprint:e,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=n;!function(t,n){const{extra:e,tags:r,user:o,contexts:s,level:i,transactionName:c}=n,u=O(e);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=O(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const f=O(o);f&&Object.keys(f).length&&(t.user={...f,...t.user});const h=O(s);h&&Object.keys(h).length&&(t.contexts={...h,...t.contexts});i&&(t.level=i);c&&"transaction"!==t.type&&(t.transaction=c)}(t,n),r&&function(t,n){t.contexts={trace:Lt(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Kt(n),...t.sdkProcessingMetadata};const e=Ht(n),r=Jt(e).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,n){t.fingerprint=t.fingerprint?function(t){return Array.isArray(t)?t:[t]}(t.fingerprint):[],n&&(t.fingerprint=t.fingerprint.concat(n));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,e),function(t,n){const e=[...t.breadcrumbs||[],...n];t.breadcrumbs=e.length?e:void 0}(t,o),function(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}(t,s)}const Xt="7";function tn(t,n){return e={sentry_key:t.publicKey,sentry_version:Xt,...n&&{sentry_client:`${n.name}/${n.version}`}},Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}const nn=64;function en(t,n,e=Q(t.bufferSize||nn)){let r={};return{send:function(t){const o=[];if(st(t,((t,n)=>{const e=function(t){return ut[t]}(n);(function(t,n,e=Date.now()){return function(t,n){return t[n]||t.all||0}(t,n)>e})(r,e)||o.push(t)})),0===o.length)return Z({});const s=ot(t[0],o),i=t=>{st(s,((t,n)=>{}))};return e.add((()=>n({body:ct(s)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&<&&C.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=ht(r,t),t)),(t=>{throw i(),t})))).then((t=>t),(t=>{if(t instanceof k)return lt&&C.error("Skipped sending event because buffer is full."),i(),Z({});throw t}))},flush:t=>e.drain(t)}}const rn=Symbol("AgentBaseInternalState");class on extends s.Agent{[rn];options;keepAlive;constructor(t){super(t),this[rn]={}}isSecureEndpoint(t){if(t){if("boolean"==typeof t.secureEndpoint)return t.secureEndpoint;if("string"==typeof t.protocol)return"https:"===t.protocol}const{stack:n}=new Error;return"string"==typeof n&&n.split("\n").some((t=>-1!==t.indexOf("(https.js:")||-1!==t.indexOf("node:https:")))}createSocket(t,n,e){const r={...n,secureEndpoint:this.isSecureEndpoint(n)};Promise.resolve().then((()=>this.connect(t,r))).then((o=>{if(o instanceof s.Agent)return o.addRequest(t,r);this[rn].currentSocket=o,super.createSocket(t,n,e)}),e)}createConnection(){const t=this[rn].currentSocket;if(this[rn].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[rn].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(t){this[rn]&&(this[rn].defaultPort=t)}get protocol(){return this[rn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[rn]&&(this[rn].protocol=t)}}function sn(...t){C.log("[https-proxy-agent:parse-proxy-response]",...t)}function cn(t){return new Promise(((n,e)=>{let r=0;const o=[];function s(){const c=t.read();c?function(c){o.push(c),r+=c.length;const u=Buffer.concat(o,r),a=u.indexOf("\r\n\r\n");if(-1===a)return sn("have not received end of HTTP headers yet..."),void s();const f=u.slice(0,a).toString("ascii").split("\r\n"),h=f.shift();if(!h)return t.destroy(),e(new Error("No header received from proxy CONNECT response"));const p=h.split(" "),l=+(p[1]||0),d=p.slice(2).join(" "),m={};for(const n of f){if(!n)continue;const r=n.indexOf(":");if(-1===r)return t.destroy(),e(new Error(`Invalid header from proxy CONNECT response: "${n}"`));const o=n.slice(0,r).toLowerCase(),s=n.slice(r+1).trimStart(),i=m[o];"string"==typeof i?m[o]=[i,s]:Array.isArray(i)?i.push(s):m[o]=s}sn("got proxy server response: %o %o",h,m),i(),n({connect:{statusCode:l,statusText:d,headers:m},buffered:u})}(c):t.once("readable",s)}function i(){t.removeListener("end",c),t.removeListener("error",u),t.removeListener("readable",s)}function c(){i(),sn("onend"),e(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),sn("onerror %o",t),e(t)}t.on("error",u),t.on("end",c),s()}))}function un(...t){C.log("[https-proxy-agent]",...t)}class an extends on{static protocols=["http","https"];proxy;proxyHeaders;connectOpts;constructor(t,n){super(n),this.options={},this.proxy="string"==typeof t?new URL(t):t,this.proxyHeaders=n?.headers??{},un("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const e=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),r=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?hn(n,"headers"):null,host:e,port:r}}async connect(t,n){const{proxy:e}=this;if(!n.host)throw new TypeError('No "host" provided');let r;if("https:"===e.protocol){un("Creating `tls.Socket`: %o",this.connectOpts);const t=this.connectOpts.servername||this.connectOpts.host;r=f.connect({...this.connectOpts,servername:t&&a.isIP(t)?void 0:t})}else un("Creating `net.Socket`: %o",this.connectOpts),r=a.connect(this.connectOpts);const o="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},s=a.isIPv6(n.host)?`[${n.host}]`:n.host;let i=`CONNECT ${s}:${n.port} HTTP/1.1\r\n`;if(e.username||e.password){const t=`${decodeURIComponent(e.username)}:${decodeURIComponent(e.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(t).toString("base64")}`}o.Host=`${s}:${n.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const t of Object.keys(o))i+=`${t}: ${o[t]}\r\n`;const c=cn(r);r.write(`${i}\r\n`);const{connect:u,buffered:h}=await c;if(t.emit("proxyConnect",u),this.emit("proxyConnect",u,t),200===u.statusCode){if(t.once("socket",fn),n.secureEndpoint){un("Upgrading socket connection to TLS");const t=n.servername||n.host;return f.connect({...hn(n,"host","path","port"),socket:r,servername:a.isIP(t)?void 0:t})}return r}r.destroy();const p=new a.Socket({writable:!1});return p.readable=!0,t.once("socket",(t=>{un("Replaying proxy buffer for failed request"),t.push(h),t.push(null)})),p}}function fn(t){t.resume()}function hn(t,...n){const e={};let r;for(r in t)n.includes(r)||(e[r]=t[r]);return e}const pn=32768;function ln(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const dn=e;let mn,yn=!1;function gn(t){dn.debug&&console.log(`[ANR Worker] ${t}`)}var bn,_n,vn;const wn=function(t){let n;try{n=new URL(t.url)}catch(n){return N((()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")})),en(t,(()=>Promise.resolve({})))}const e="https:"===n.protocol,r=function(t,n){const{no_proxy:e}=process.env;return e&&e.split(",").some((n=>t.host.endsWith(n)||t.hostname.endsWith(n)))?void 0:n}(n,t.proxy||(e?process.env.https_proxy:void 0)||process.env.http_proxy),o=e?i:s,a=void 0!==t.keepAlive&&t.keepAlive,f=r?new an(r):new o.Agent({keepAlive:a,maxSockets:30,timeout:2e3}),h=function(t,n,e){const{hostname:r,pathname:o,port:s,protocol:i,search:a}=new URL(t.url);return function(f){return new Promise(((h,p)=>{qt((()=>{let l=function(t){return new c({read(){this.push(t),this.push(null)}})}(f.body);const d={...t.headers};f.body.length>pn&&(d["content-encoding"]="gzip",l=l.pipe(u()));const m=n.request({method:"POST",agent:e,headers:d,hostname:r,path:`${o}${a}`,port:s,protocol:i,ca:t.caCerts},(t=>{t.on("data",(()=>{})),t.on("end",(()=>{})),t.setEncoding("utf8");const n=t.headers["retry-after"]??null,e=t.headers["x-sentry-rate-limits"]??null;h({statusCode:t.statusCode,headers:{"retry-after":n,"x-sentry-rate-limits":Array.isArray(e)?e[0]||null:e}})}));m.on("error",p),l.pipe(m)}))}))}}(t,t.httpModule??o,f);return en(t,h)}({url:(bn=dn.dsn,_n=dn.tunnel,vn=dn.sdkMetadata.sdk,_n||`${function(t){return`${function(t){const n=t.protocol?`${t.protocol}:`:"",e=t.port?`:${t.port}`:"";return`${n}//${t.host}${e}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/`}(bn)}?${tn(bn,vn)}`),recordDroppedEvent:()=>{}});async function Sn(){if(mn){gn("Sending abnormal session"),gt(mn,{status:"abnormal",abnormal_mechanism:"anr_foreground"});const t=function(t,n,e,r){const o=at(e);return ot({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&n&&{dsn:T(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(mn,dn.dsn,dn.sdkMetadata,dn.tunnel);gn(JSON.stringify(t)),await wn.send(t);try{n?.postMessage("session-ended")}catch(t){}}}function $n(t){if(!t)return;const n=function(t){if(!t.length)return[];const n=Array.from(t);return/sentryWrapped/.test(M(n).function||"")&&n.pop(),n.reverse(),U.test(M(n).function||"")&&(n.pop(),U.test(M(n).function||"")&&n.pop()),n.slice(0,I).map((t=>({...t,filename:t.filename||M(n).filename,function:t.function||P})))}(t);if(dn.appRootPath)for(const t of n)t.filename&&(t.filename=W(t.filename,dn.appRootPath));return n}async function En(t,n){if(yn)return;yn=!0,await Sn(),gn("Sending event");const e={event_id:Y(),contexts:dn.contexts,release:dn.release,environment:dn.environment,dist:dn.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${dn.anrThreshold} ms`,stacktrace:{frames:$n(t)},mechanism:{type:"ANR"}}]},tags:dn.staticTags};n&&function(t,n){if(Qt(t,n),!t.contexts?.trace){const{traceId:e,spanId:r,parentSpanId:o}=n.propagationContext;t.contexts={trace:{trace_id:e,span_id:r,parent_span_id:o},...t.contexts}}}(e,n);const r=Vt(e,dn.dsn,dn.sdkMetadata,dn.tunnel);gn(JSON.stringify(r)),await wn.send(r),await wn.flush(2e3),setTimeout((()=>{process.exit(0)}),5e3)}let xn;if(gn("Started"),dn.captureStackTrace){gn("Connecting to debugger");const n=new t;n.connectToMainThread(),gn("Connected to debugger");const e=new Map;n.on("Debugger.scriptParsed",(t=>{e.set(t.params.scriptId,t.params.url)})),n.on("Debugger.paused",(t=>{if("other"===t.params.reason)try{gn("Debugger paused");const s=[...t.params.callFrames],i=dn.appRootPath?function(t=(process.argv[1]?K(process.argv[1]):process.cwd()),n="\\"===o){const e=n?ln(t):t;return t=>{if(!t)return;const o=n?ln(t):t;let{dir:s,base:i,ext:c}=r.parse(o);".js"!==c&&".mjs"!==c&&".cjs"!==c||(i=i.slice(0,-1*c.length)),s||(s=".");const u=s.lastIndexOf("/node_modules");if(u>-1)return`${s.slice(u+14).replace(/\//g,".")}:${i}`;if(s.startsWith(e)){let t=s.slice(e.length+1).replace(/\//g,".");return t&&(t+=":"),t+=i,t}return i}}(dn.appRootPath):()=>{},c=s.map((t=>function(t,n,e){const r=n?n.replace(/^file:\/\//,""):void 0,o=t.location.columnNumber?t.location.columnNumber+1:void 0,s=t.location.lineNumber?t.location.lineNumber+1:void 0;return O({filename:r,module:e(r),function:t.functionName||P,colno:o,lineno:s,in_app:r?X(r):void 0})}(t,e.get(t.location.scriptId),i))),u=setTimeout((()=>{En(c).then(null,(()=>{gn("Sending ANR event failed.")}))}),5e3);n.post("Runtime.evaluate",{expression:"global.__SENTRY_GET_SCOPES__();",silent:!0,returnByValue:!0},((t,e)=>{t&&gn(`Error executing script: '${t.message}'`),clearTimeout(u);const r=e&&e.result?e.result.value:void 0;n.post("Debugger.resume"),n.post("Debugger.disable"),En(c,r).then(null,(()=>{gn("Sending ANR event failed.")}))}))}catch(t){throw n.post("Debugger.resume"),n.post("Debugger.disable"),t}})),xn=()=>{try{n.post("Debugger.enable",(()=>{n.post("Debugger.pause")}))}catch(t){}}}const{poll:Nn}=function(t,n,e,r){const o=t();let s=!1,i=!0;return setInterval((()=>{const t=o.getTimeMs();!1===s&&t>n+e&&(s=!0,i&&r()),t<n+e&&(s=!1)}),20),{poll:()=>{o.reset()},enabled:t=>{i=t}}}((function(){let t=process.hrtime();return{getTimeMs:()=>{const[n,e]=process.hrtime(t);return Math.floor(1e3*n+e/1e6)},reset:()=>{t=process.hrtime()}}}),dn.pollInterval,dn.anrThreshold,(function(){gn("Watchdog timeout"),xn?(gn("Pausing debugger to capture stack trace"),xn()):(gn("Capturing event without a stack trace"),En().then(null,(()=>{gn("Sending ANR event failed on watchdog timeout.")})))}));n?.on("message",(t=>{t.session&&(mn=yt(t.session)),Nn()})); | ||
/*! @sentry/node 8.38.0 (396e2f9) | https://github.com/getsentry/sentry-javascript */ | ||
import{Session as t}from"node:inspector";import{parentPort as n,workerData as e}from"node:worker_threads";import{posix as r,sep as o}from"node:path";import*as s from"node:http";import*as i from"node:https";import{Readable as c}from"node:stream";import{createGzip as u}from"node:zlib";import*as a from"node:net";import*as f from"node:tls";const h=Object.prototype.toString;function p(t,n){return h.call(t)===`[object ${n}]`}function l(t){return p(t,"String")}function d(t){return p(t,"Object")}function m(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function y(t,n){try{return t instanceof n}catch(t){return!1}}const g="8.38.0",b=globalThis;function _(t,n,e){const r=b,o=r.__SENTRY__=r.__SENTRY__||{},s=o[g]=o[g]||{};return s[t]||(s[t]=n())}const v=b,w=80;function S(t,n){const e=t,r=[];if(!e||!e.tagName)return"";if(v.HTMLElement&&e instanceof HTMLElement&&e.dataset){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}r.push(e.tagName.toLowerCase());const o=n&&n.length?n.filter((t=>e.getAttribute(t))).map((t=>[t,e.getAttribute(t)])):null;if(o&&o.length)o.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else{e.id&&r.push(`#${e.id}`);const t=e.className;if(t&&l(t)){const n=t.split(/\s+/);for(const t of n)r.push(`.${t}`)}}const s=["aria-label","type","name","title","alt"];for(const t of s){const n=e.getAttribute(t);n&&r.push(`[${t}="${n}"]`)}return r.join("")}const $="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,E=["debug","info","warn","error","log","assert","trace"],x={};function N(t){if(!("console"in b))return t();const n=b.console,e={},r=Object.keys(x);r.forEach((t=>{const r=x[t];e[t]=n[t],n[t]=r}));try{return t()}finally{r.forEach((t=>{n[t]=e[t]}))}}const C=_("logger",(function(){let t=!1;const n={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return $?E.forEach((e=>{n[e]=(...n)=>{t&&N((()=>{b.console[e](`Sentry Logger [${e}]:`,...n)}))}})):E.forEach((t=>{n[t]=()=>{}})),n}));function T(t,n=!1){const{host:e,path:r,pass:o,port:s,projectId:i,protocol:c,publicKey:u}=t;return`${c}://${u}${n&&o?`:${o}`:""}@${e}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}class k extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function R(t){if(function(t){switch(h.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return y(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...D(t)};if(n=t,"undefined"!=typeof Event&&y(n,Event)){const n={type:t.type,target:j(t.target),currentTarget:j(t.currentTarget),...D(t)};return"undefined"!=typeof CustomEvent&&y(t,CustomEvent)&&(n.detail=t.detail),n}return t;var n}function j(t){try{return n=t,"undefined"!=typeof Element&&y(n,Element)?function(t,n={}){if(!t)return"<unknown>";try{let e=t;const r=5,o=[];let s=0,i=0;const c=" > ",u=c.length;let a;const f=Array.isArray(n)?n:n.keyAttrs,h=!Array.isArray(n)&&n.maxStringLength||w;for(;e&&s++<r&&(a=S(e,f),!("html"===a||s>1&&i+o.length*u+a.length>=h));)o.push(a),i+=a.length,e=e.parentNode;return o.reverse().join(c)}catch(t){return"<unknown>"}}(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}var n}function D(t){if("object"==typeof t&&null!==t){const n={};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}return{}}function O(t){return A(t,new Map)}function A(t,n){if(function(t){if(!d(t))return!1;try{const n=Object.getPrototypeOf(t).constructor.name;return!n||"Object"===n}catch(t){return!0}}(t)){const e=n.get(t);if(void 0!==e)return e;const r={};n.set(t,r);for(const e of Object.getOwnPropertyNames(t))void 0!==t[e]&&(r[e]=A(t[e],n));return r}if(Array.isArray(t)){const e=n.get(t);if(void 0!==e)return e;const r=[];return n.set(t,r),t.forEach((t=>{r.push(A(t,n))})),r}return t}const I=50,P="?",U=/captureMessage|captureException/;function M(t){return t[t.length-1]||{}}const L="<anonymous>";const B=1e3;function G(){return Date.now()/B}const J=function(){const{performance:t}=b;if(!t||!t.now)return G;const n=Date.now()-t.now(),e=null==t.timeOrigin?n:t.timeOrigin;return()=>(e+t.now())/B}();function Y(){const t=b,n=t.crypto||t.msCrypto;let e=()=>16*Math.random();try{if(n&&n.randomUUID)return n.randomUUID().replace(/-/g,"");n&&n.getRandomValues&&(e=()=>{const t=new Uint8Array(1);return n.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&e())>>t/4).toString(16)))}function z(t,n=100,e=1/0){try{return H("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function H(t,n,e=1/0,r=1/0,o=function(){const t="function"==typeof WeakSet,n=t?new WeakSet:[];return[function(e){if(t)return!!n.has(e)||(n.add(e),!1);for(let t=0;t<n.length;t++)if(n[t]===e)return!0;return n.push(e),!1},function(e){if(t)n.delete(e);else for(let t=0;t<n.length;t++)if(n[t]===e){n.splice(t,1);break}}]}()){const[s,i]=o;if(null==n||["boolean","string"].includes(typeof n)||"number"==typeof n&&Number.isFinite(n))return n;const c=function(t,n){try{if("domain"===t&&n&&"object"==typeof n&&n.t)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&n===global)return"[Global]";if("undefined"!=typeof window&&n===window)return"[Window]";if("undefined"!=typeof document&&n===document)return"[Document]";if("object"==typeof(e=n)&&null!==e&&(e.__isVue||e.o))return"[VueViewModel]";if(function(t){return d(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}(n))return"[SyntheticEvent]";if("number"==typeof n&&!Number.isFinite(n))return`[${n}]`;if("function"==typeof n)return`[Function: ${function(t){try{return t&&"function"==typeof t&&t.name||L}catch(t){return L}}(n)}]`;if("symbol"==typeof n)return`[${String(n)}]`;if("bigint"==typeof n)return`[BigInt: ${String(n)}]`;const r=function(t){const n=Object.getPrototypeOf(t);return n?n.constructor.name:"null prototype"}(n);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var e}(t,n);if(!c.startsWith("[object "))return c;if(n.__sentry_skip_normalization__)return n;const u="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:e;if(0===u)return c.replace("object ","");if(s(n))return"[Circular ~]";const a=n;if(a&&"function"==typeof a.toJSON)try{return H("",a.toJSON(),u-1,r,o)}catch(t){}const f=Array.isArray(n)?[]:{};let h=0;const p=R(n);for(const t in p){if(!Object.prototype.hasOwnProperty.call(p,t))continue;if(h>=r){f[t]="[MaxProperties ~]";break}const n=p[t];f[t]=H(t,n,u-1,r,o),h++}return i(n),f}function W(t,n){const e=n.replace(/\\/g,"/").replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");let r=t;try{r=decodeURI(t)}catch(t){}return r.replace(/\\/g,"/").replace(/webpack:\/?/g,"").replace(new RegExp(`(file://)?/*${e}/*`,"ig"),"app:///")}(()=>{const{performance:t}=b;if(!t||!t.now)return;const n=36e5,e=t.now(),r=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+e-r):n,s=o<n,i=t.timing&&t.timing.navigationStart,c="number"==typeof i?Math.abs(i+e-r):n;(s||c<n)&&(o<=c&&t.timeOrigin)})();const F=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function K(t){const n=function(t){const n=t.length>1024?`<truncated>${t.slice(-1024)}`:t,e=F.exec(n);return e?e.slice(1):[]}(t),e=n[0]||"";let r=n[1];return e||r?(r&&(r=r.slice(0,r.length-1)),e+r):"."}var V;function Z(t){return new q((n=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(V||(V={}));class q{constructor(t){q.prototype.__init.call(this),q.prototype.__init2.call(this),q.prototype.__init3.call(this),q.prototype.__init4.call(this),this.i=V.PENDING,this.u=[];try{t(this.h,this.p)}catch(t){this.p(t)}}then(t,n){return new q(((e,r)=>{this.u.push([!1,n=>{if(t)try{e(t(n))}catch(t){r(t)}else e(n)},t=>{if(n)try{e(n(t))}catch(t){r(t)}else r(t)}]),this.l()}))}catch(t){return this.then((t=>t),t)}finally(t){return new q(((n,e)=>{let r,o;return this.then((n=>{o=!1,r=n,t&&t()}),(n=>{o=!0,r=n,t&&t()})).then((()=>{o?e(r):n(r)}))}))}__init(){this.h=t=>{this.m(V.RESOLVED,t)}}__init2(){this.p=t=>{this.m(V.REJECTED,t)}}__init3(){this.m=(t,n)=>{this.i===V.PENDING&&(m(n)?n.then(this.h,this.p):(this.i=t,this._=n,this.l()))}}__init4(){this.l=()=>{if(this.i===V.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.i===V.RESOLVED&&t[1](this._),this.i===V.REJECTED&&t[2](this._),t[0]=!0)}))}}}function Q(t){const n=[];function e(t){return n.splice(n.indexOf(t),1)[0]||Promise.resolve(void 0)}return{$:n,add:function(r){if(!(void 0===t||n.length<t))return o=new k("Not adding Promise because buffer limit was reached."),new q(((t,n)=>{n(o)}));var o;const s=r();return-1===n.indexOf(s)&&n.push(s),s.then((()=>e(s))).then(null,(()=>e(s).then(null,(()=>{})))),s},drain:function(t){return new q(((e,r)=>{let o=n.length;if(!o)return e(!0);const s=setTimeout((()=>{t&&t>0&&e(!1)}),t);n.forEach((t=>{Z(t).then((()=>{--o||(clearTimeout(s),e(!0))}),r)}))}))}}}function X(t,n=!1){return!(n||t&&!t.startsWith("/")&&!t.match(/^[A-Z]:/)&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==t&&!t.includes("node_modules/")}const tt="sentry-",nt=/^sentry-/;function et(t){const n=function(t){if(!t||!l(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce(((t,n)=>{const e=rt(n);return Object.entries(e).forEach((([n,e])=>{t[n]=e})),t}),{});return rt(t)}(t);if(!n)return;const e=Object.entries(n).reduce(((t,[n,e])=>{if(n.match(nt)){t[n.slice(tt.length)]=e}return t}),{});return Object.keys(e).length>0?e:void 0}function rt(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[n,e])=>(n&&e&&(t[n]=e),t)),{})}function ot(t,n=[]){return[t,n]}function st(t,n){const e=t[1];for(const t of e){if(n(t,t[0].type))return!0}return!1}function it(t){return b.__SENTRY__&&b.__SENTRY__.encodePolyfill?b.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function ct(t){const[n,e]=t;let r=JSON.stringify(n);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[it(r),t]:r.push("string"==typeof t?it(t):t)}for(const t of e){const[n,e]=t;if(o(`\n${JSON.stringify(n)}\n`),"string"==typeof e||e instanceof Uint8Array)o(e);else{let t;try{t=JSON.stringify(e)}catch(n){t=JSON.stringify(z(e))}o(t)}}return"string"==typeof r?r:function(t){const n=t.reduce(((t,n)=>t+n.length),0),e=new Uint8Array(n);let r=0;for(const n of t)e.set(n,r),r+=n.length;return e}(r)}const ut={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function at(t){if(!t||!t.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}const ft=6e4;function ht(t,{statusCode:n,headers:e},r=Date.now()){const o={...t},s=e&&e["x-sentry-rate-limits"],i=e&&e["retry-after"];if(s)for(const t of s.trim().split(",")){const[n,e,,,s]=t.split(":",5),i=parseInt(n,10),c=1e3*(isNaN(i)?60:i);if(e)for(const t of e.split(";"))"metric_bucket"===t&&s&&!s.split(";").includes("custom")||(o[t]=r+c);else o.all=r+c}else i?o.all=r+function(t,n=Date.now()){const e=parseInt(`${t}`,10);if(!isNaN(e))return 1e3*e;const r=Date.parse(`${t}`);return isNaN(r)?ft:r-n}(i,r):429===n&&(o.all=r+6e4);return o}function pt(){return{traceId:Y(),spanId:Y().substring(16)}}const lt="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function dt(){return mt(b),b}function mt(t){const n=t.__SENTRY__=t.__SENTRY__||{};return n.version=n.version||g,n[g]=n[g]||{}}function yt(t){const n=J(),e={sid:Y(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return O({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(e)};return t&>(e,t),e}function gt(t,n={}){if(n.user&&(!t.ipAddress&&n.user.ip_address&&(t.ipAddress=n.user.ip_address),t.did||n.did||(t.did=n.user.id||n.user.email||n.user.username)),t.timestamp=n.timestamp||J(),n.abnormal_mechanism&&(t.abnormal_mechanism=n.abnormal_mechanism),n.ignoreDuration&&(t.ignoreDuration=n.ignoreDuration),n.sid&&(t.sid=32===n.sid.length?n.sid:Y()),void 0!==n.init&&(t.init=n.init),!t.did&&n.did&&(t.did=`${n.did}`),"number"==typeof n.started&&(t.started=n.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof n.duration)t.duration=n.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}n.release&&(t.release=n.release),n.environment&&(t.environment=n.environment),!t.ipAddress&&n.ipAddress&&(t.ipAddress=n.ipAddress),!t.userAgent&&n.userAgent&&(t.userAgent=n.userAgent),"number"==typeof n.errors&&(t.errors=n.errors),n.status&&(t.status=n.status)}const bt="_sentrySpan";function _t(t,n){n?function(t,n,e){try{Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}catch(e){$&&C.log(`Failed to add non-enumerable property "${n}" to object`,t)}}(t,bt,n):delete t[bt]}function vt(t){return t[bt]}class wt{constructor(){this.v=!1,this.S=[],this.N=[],this.C=[],this.T=[],this.k={},this.R={},this.j={},this.D={},this.O={},this.A=pt()}clone(){const t=new wt;return t.C=[...this.C],t.R={...this.R},t.j={...this.j},t.D={...this.D},t.k=this.k,t.I=this.I,t.P=this.P,t.U=this.U,t.M=this.M,t.N=[...this.N],t.L=this.L,t.T=[...this.T],t.O={...this.O},t.A={...this.A},t.B=this.B,t.G=this.G,_t(t,vt(this)),t}setClient(t){this.B=t}setLastEventId(t){this.G=t}getClient(){return this.B}lastEventId(){return this.G}addScopeListener(t){this.S.push(t)}addEventProcessor(t){return this.N.push(t),this}setUser(t){return this.k=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.P&>(this.P,{user:t}),this.J(),this}getUser(){return this.k}getRequestSession(){return this.L}setRequestSession(t){return this.L=t,this}setTags(t){return this.R={...this.R,...t},this.J(),this}setTag(t,n){return this.R={...this.R,[t]:n},this.J(),this}setExtras(t){return this.j={...this.j,...t},this.J(),this}setExtra(t,n){return this.j={...this.j,[t]:n},this.J(),this}setFingerprint(t){return this.M=t,this.J(),this}setLevel(t){return this.I=t,this.J(),this}setTransactionName(t){return this.U=t,this.J(),this}setContext(t,n){return null===n?delete this.D[t]:this.D[t]=n,this.J(),this}setSession(t){return t?this.P=t:delete this.P,this.J(),this}getSession(){return this.P}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,[e,r]=n instanceof St?[n.getScopeData(),n.getRequestSession()]:d(n)?[t,t.requestSession]:[],{tags:o,extra:s,user:i,contexts:c,level:u,fingerprint:a=[],propagationContext:f}=e||{};return this.R={...this.R,...o},this.j={...this.j,...s},this.D={...this.D,...c},i&&Object.keys(i).length&&(this.k=i),u&&(this.I=u),a.length&&(this.M=a),f&&(this.A=f),r&&(this.L=r),this}clear(){return this.C=[],this.R={},this.j={},this.k={},this.D={},this.I=void 0,this.U=void 0,this.M=void 0,this.L=void 0,this.P=void 0,_t(this,void 0),this.T=[],this.A=pt(),this.J(),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:G(),...t},o=this.C;return o.push(r),this.C=o.length>e?o.slice(-e):o,this.J(),this}getLastBreadcrumb(){return this.C[this.C.length-1]}clearBreadcrumbs(){return this.C=[],this.J(),this}addAttachment(t){return this.T.push(t),this}clearAttachments(){return this.T=[],this}getScopeData(){return{breadcrumbs:this.C,attachments:this.T,contexts:this.D,tags:this.R,extra:this.j,user:this.k,level:this.I,fingerprint:this.M||[],eventProcessors:this.N,propagationContext:this.A,sdkProcessingMetadata:this.O,transactionName:this.U,span:vt(this)}}setSDKProcessingMetadata(t){return this.O={...this.O,...t},this}setPropagationContext(t){return this.A=t,this}getPropagationContext(){return this.A}captureException(t,n){const e=n&&n.event_id?n.event_id:Y();if(!this.B)return C.warn("No client configured on scope - will not capture exception!"),e;const r=new Error("Sentry syntheticException");return this.B.captureException(t,{originalException:t,syntheticException:r,...n,event_id:e},this),e}captureMessage(t,n,e){const r=e&&e.event_id?e.event_id:Y();if(!this.B)return C.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this.B.captureMessage(t,n,{originalException:t,syntheticException:o,...e,event_id:r},this),r}captureEvent(t,n){const e=n&&n.event_id?n.event_id:Y();return this.B?(this.B.captureEvent(t,{...n,event_id:e},this),e):(C.warn("No client configured on scope - will not capture event!"),e)}J(){this.v||(this.v=!0,this.S.forEach((t=>{t(this)})),this.v=!1)}}const St=wt;class $t{constructor(t,n){let e,r;e=t||new St,r=n||new St,this.Y=[{scope:e}],this.H=r}withScope(t){const n=this.W();let e;try{e=t(n)}catch(t){throw this.F(),t}return m(e)?e.then((t=>(this.F(),t)),(t=>{throw this.F(),t})):(this.F(),e)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.H}getStackTop(){return this.Y[this.Y.length-1]}W(){const t=this.getScope().clone();return this.Y.push({client:this.getClient(),scope:t}),t}F(){return!(this.Y.length<=1)&&!!this.Y.pop()}}function Et(){const t=mt(dt());return t.stack=t.stack||new $t(_("defaultCurrentScope",(()=>new St)),_("defaultIsolationScope",(()=>new St)))}function xt(t){return Et().withScope(t)}function Nt(t,n){const e=Et();return e.withScope((()=>(e.getStackTop().scope=t,n(t))))}function Ct(t){return Et().withScope((()=>t(Et().getIsolationScope())))}function Tt(t){const n=mt(t);return n.acs?n.acs:{withIsolationScope:Ct,withScope:xt,withSetScope:Nt,withSetIsolationScope:(t,n)=>Ct(n),getCurrentScope:()=>Et().getScope(),getIsolationScope:()=>Et().getIsolationScope()}}function kt(){return Tt(dt()).getCurrentScope().getClient()}const Rt="_sentryMetrics";function jt(t){const n=t[Rt];if(!n)return;const e={};for(const[,[t,r]]of n){(e[t]||(e[t]=[])).push(O(r))}return e}const Dt="sentry.source",Ot="sentry.sample_rate",At="sentry.op",It="sentry.origin",Pt=0,Ut=1,Mt=1;function Lt(t){const{spanId:n,traceId:e}=t.spanContext(),{parent_span_id:r}=Jt(t);return O({parent_span_id:r,span_id:n,trace_id:e})}function Bt(t){return"number"==typeof t?Gt(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Gt(t.getTime()):J()}function Gt(t){return t>9999999999?t/1e3:t}function Jt(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();try{const{spanId:n,traceId:e}=t.spanContext();if(function(t){const n=t;return!!(n.attributes&&n.startTime&&n.name&&n.endTime&&n.status)}(t)){const{attributes:r,startTime:o,name:s,endTime:i,parentSpanId:c,status:u}=t;return O({span_id:n,trace_id:e,data:r,description:s,parent_span_id:c,start_timestamp:Bt(o),timestamp:Bt(i)||void 0,status:Yt(u),op:r[At],origin:r[It],_metrics_summary:jt(t)})}return{span_id:n,trace_id:e}}catch(t){return{}}}function Yt(t){if(t&&t.code!==Pt)return t.code===Ut?"ok":t.message||"unknown_error"}const zt="_sentryRootSpan";function Ht(t){return t[zt]||t}const Wt="production",Ft="_frozenDsc";function Kt(t){const n=kt();if(!n)return{};const e=function(t,n){const e=n.getOptions(),{publicKey:r}=n.getDsn()||{},o=O({environment:e.environment||Wt,release:e.release,public_key:r,trace_id:t});return n.emit("createDsc",o),o}(Jt(t).trace_id||"",n),r=Ht(t),o=r[Ft];if(o)return o;const s=r.spanContext().traceState,i=s&&s.get("sentry.dsc"),c=i&&et(i);if(c)return c;const u=Jt(r),a=u.data||{},f=a[Ot];null!=f&&(e.sample_rate=`${f}`);const h=a[Dt],p=u.description;return"url"!==h&&p&&(e.transaction=p),function(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=kt(),e=n&&n.getOptions();return!!e&&(e.enableTracing||"tracesSampleRate"in e||"tracesSampler"in e)}()&&(e.sampled=String(function(t){const{traceFlags:n}=t.spanContext();return n===Mt}(r))),n.emit("createDsc",e,r),e}function Vt(t,n,e,r){const o=at(e),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,n){n&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||n.name,t.sdk.version=t.sdk.version||n.version,t.sdk.integrations=[...t.sdk.integrations||[],...n.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...n.packages||[]])}(t,e&&e.sdk);const i=function(t,n,e,r){const o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...n&&{sdk:n},...!!e&&r&&{dsn:T(r)},...o&&{trace:O({...o})}}}(t,o,r,n);delete t.sdkProcessingMetadata;return ot(i,[[{type:s},t]])}const Zt="__SENTRY_SUPPRESS_TRACING__";function qt(t){const n=Tt(dt());return n.suppressTracing?n.suppressTracing(t):function(...t){const n=Tt(dt());if(2===t.length){const[e,r]=t;return e?n.withSetScope(e,r):n.withScope(r)}return n.withScope(t[0])}((n=>(n.setSDKProcessingMetadata({[Zt]:!0}),t())))}function Qt(t,n){const{fingerprint:e,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=n;!function(t,n){const{extra:e,tags:r,user:o,contexts:s,level:i,transactionName:c}=n,u=O(e);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=O(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const f=O(o);f&&Object.keys(f).length&&(t.user={...f,...t.user});const h=O(s);h&&Object.keys(h).length&&(t.contexts={...h,...t.contexts});i&&(t.level=i);c&&"transaction"!==t.type&&(t.transaction=c)}(t,n),r&&function(t,n){t.contexts={trace:Lt(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Kt(n),...t.sdkProcessingMetadata};const e=Ht(n),r=Jt(e).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,n){t.fingerprint=t.fingerprint?function(t){return Array.isArray(t)?t:[t]}(t.fingerprint):[],n&&(t.fingerprint=t.fingerprint.concat(n));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,e),function(t,n){const e=[...t.breadcrumbs||[],...n];t.breadcrumbs=e.length?e:void 0}(t,o),function(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}(t,s)}const Xt="7";function tn(t,n){return e={sentry_key:t.publicKey,sentry_version:Xt,...n&&{sentry_client:`${n.name}/${n.version}`}},Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}const nn=64;function en(t,n,e=Q(t.bufferSize||nn)){let r={};return{send:function(t){const o=[];if(st(t,((t,n)=>{const e=function(t){return ut[t]}(n);(function(t,n,e=Date.now()){return function(t,n){return t[n]||t.all||0}(t,n)>e})(r,e)||o.push(t)})),0===o.length)return Z({});const s=ot(t[0],o),i=t=>{st(s,((t,n)=>{}))};return e.add((()=>n({body:ct(s)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&<&&C.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=ht(r,t),t)),(t=>{throw i(),t})))).then((t=>t),(t=>{if(t instanceof k)return lt&&C.error("Skipped sending event because buffer is full."),i(),Z({});throw t}))},flush:t=>e.drain(t)}}const rn=Symbol("AgentBaseInternalState");class on extends s.Agent{[rn];options;keepAlive;constructor(t){super(t),this[rn]={}}isSecureEndpoint(t){if(t){if("boolean"==typeof t.secureEndpoint)return t.secureEndpoint;if("string"==typeof t.protocol)return"https:"===t.protocol}const{stack:n}=new Error;return"string"==typeof n&&n.split("\n").some((t=>-1!==t.indexOf("(https.js:")||-1!==t.indexOf("node:https:")))}createSocket(t,n,e){const r={...n,secureEndpoint:this.isSecureEndpoint(n)};Promise.resolve().then((()=>this.connect(t,r))).then((o=>{if(o instanceof s.Agent)return o.addRequest(t,r);this[rn].currentSocket=o,super.createSocket(t,n,e)}),e)}createConnection(){const t=this[rn].currentSocket;if(this[rn].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[rn].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(t){this[rn]&&(this[rn].defaultPort=t)}get protocol(){return this[rn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[rn]&&(this[rn].protocol=t)}}function sn(...t){C.log("[https-proxy-agent:parse-proxy-response]",...t)}function cn(t){return new Promise(((n,e)=>{let r=0;const o=[];function s(){const c=t.read();c?function(c){o.push(c),r+=c.length;const u=Buffer.concat(o,r),a=u.indexOf("\r\n\r\n");if(-1===a)return sn("have not received end of HTTP headers yet..."),void s();const f=u.slice(0,a).toString("ascii").split("\r\n"),h=f.shift();if(!h)return t.destroy(),e(new Error("No header received from proxy CONNECT response"));const p=h.split(" "),l=+(p[1]||0),d=p.slice(2).join(" "),m={};for(const n of f){if(!n)continue;const r=n.indexOf(":");if(-1===r)return t.destroy(),e(new Error(`Invalid header from proxy CONNECT response: "${n}"`));const o=n.slice(0,r).toLowerCase(),s=n.slice(r+1).trimStart(),i=m[o];"string"==typeof i?m[o]=[i,s]:Array.isArray(i)?i.push(s):m[o]=s}sn("got proxy server response: %o %o",h,m),i(),n({connect:{statusCode:l,statusText:d,headers:m},buffered:u})}(c):t.once("readable",s)}function i(){t.removeListener("end",c),t.removeListener("error",u),t.removeListener("readable",s)}function c(){i(),sn("onend"),e(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),sn("onerror %o",t),e(t)}t.on("error",u),t.on("end",c),s()}))}function un(...t){C.log("[https-proxy-agent]",...t)}class an extends on{static protocols=["http","https"];proxy;proxyHeaders;connectOpts;constructor(t,n){super(n),this.options={},this.proxy="string"==typeof t?new URL(t):t,this.proxyHeaders=n?.headers??{},un("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const e=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),r=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?hn(n,"headers"):null,host:e,port:r}}async connect(t,n){const{proxy:e}=this;if(!n.host)throw new TypeError('No "host" provided');let r;if("https:"===e.protocol){un("Creating `tls.Socket`: %o",this.connectOpts);const t=this.connectOpts.servername||this.connectOpts.host;r=f.connect({...this.connectOpts,servername:t&&a.isIP(t)?void 0:t})}else un("Creating `net.Socket`: %o",this.connectOpts),r=a.connect(this.connectOpts);const o="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},s=a.isIPv6(n.host)?`[${n.host}]`:n.host;let i=`CONNECT ${s}:${n.port} HTTP/1.1\r\n`;if(e.username||e.password){const t=`${decodeURIComponent(e.username)}:${decodeURIComponent(e.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(t).toString("base64")}`}o.Host=`${s}:${n.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const t of Object.keys(o))i+=`${t}: ${o[t]}\r\n`;const c=cn(r);r.write(`${i}\r\n`);const{connect:u,buffered:h}=await c;if(t.emit("proxyConnect",u),this.emit("proxyConnect",u,t),200===u.statusCode){if(t.once("socket",fn),n.secureEndpoint){un("Upgrading socket connection to TLS");const t=n.servername||n.host;return f.connect({...hn(n,"host","path","port"),socket:r,servername:a.isIP(t)?void 0:t})}return r}r.destroy();const p=new a.Socket({writable:!1});return p.readable=!0,t.once("socket",(t=>{un("Replaying proxy buffer for failed request"),t.push(h),t.push(null)})),p}}function fn(t){t.resume()}function hn(t,...n){const e={};let r;for(r in t)n.includes(r)||(e[r]=t[r]);return e}const pn=32768;function ln(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const dn=e;let mn,yn=!1,gn={};function bn(t){dn.debug&&console.log(`[ANR Worker] ${t}`)}var _n,vn,wn;const Sn=function(t){let n;try{n=new URL(t.url)}catch(n){return N((()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")})),en(t,(()=>Promise.resolve({})))}const e="https:"===n.protocol,r=function(t,n){const{no_proxy:e}=process.env;return e&&e.split(",").some((n=>t.host.endsWith(n)||t.hostname.endsWith(n)))?void 0:n}(n,t.proxy||(e?process.env.https_proxy:void 0)||process.env.http_proxy),o=e?i:s,a=void 0!==t.keepAlive&&t.keepAlive,f=r?new an(r):new o.Agent({keepAlive:a,maxSockets:30,timeout:2e3}),h=function(t,n,e){const{hostname:r,pathname:o,port:s,protocol:i,search:a}=new URL(t.url);return function(f){return new Promise(((h,p)=>{qt((()=>{let l=function(t){return new c({read(){this.push(t),this.push(null)}})}(f.body);const d={...t.headers};f.body.length>pn&&(d["content-encoding"]="gzip",l=l.pipe(u()));const m=n.request({method:"POST",agent:e,headers:d,hostname:r,path:`${o}${a}`,port:s,protocol:i,ca:t.caCerts},(t=>{t.on("data",(()=>{})),t.on("end",(()=>{})),t.setEncoding("utf8");const n=t.headers["retry-after"]??null,e=t.headers["x-sentry-rate-limits"]??null;h({statusCode:t.statusCode,headers:{"retry-after":n,"x-sentry-rate-limits":Array.isArray(e)?e[0]||null:e}})}));m.on("error",p),l.pipe(m)}))}))}}(t,t.httpModule??o,f);return en(t,h)}({url:(_n=dn.dsn,vn=dn.tunnel,wn=dn.sdkMetadata.sdk,vn||`${function(t){return`${function(t){const n=t.protocol?`${t.protocol}:`:"",e=t.port?`:${t.port}`:"";return`${n}//${t.host}${e}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/`}(_n)}?${tn(_n,wn)}`),recordDroppedEvent:()=>{}});async function $n(){if(mn){bn("Sending abnormal session"),gt(mn,{status:"abnormal",abnormal_mechanism:"anr_foreground"});const t=function(t,n,e,r){const o=at(e);return ot({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&n&&{dsn:T(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(mn,dn.dsn,dn.sdkMetadata,dn.tunnel);bn(JSON.stringify(t)),await Sn.send(t);try{n?.postMessage("session-ended")}catch(t){}}}function En(t){if(!t)return;const n=function(t){if(!t.length)return[];const n=Array.from(t);return/sentryWrapped/.test(M(n).function||"")&&n.pop(),n.reverse(),U.test(M(n).function||"")&&(n.pop(),U.test(M(n).function||"")&&n.pop()),n.slice(0,I).map((t=>({...t,filename:t.filename||M(n).filename,function:t.function||P})))}(t);if(dn.appRootPath)for(const t of n)t.filename&&(t.filename=W(t.filename,dn.appRootPath));return n}async function xn(t,n){if(yn)return;yn=!0,await $n(),bn("Sending event");const e={event_id:Y(),contexts:dn.contexts,release:dn.release,environment:dn.environment,dist:dn.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${dn.anrThreshold} ms`,stacktrace:{frames:En(t)},mechanism:{type:"ANR"}}]},tags:dn.staticTags};n&&function(t,n){if(Qt(t,n),!t.contexts?.trace){const{traceId:e,spanId:r,parentSpanId:o}=n.propagationContext;t.contexts={trace:{trace_id:e,span_id:r,parent_span_id:o},...t.contexts}}}(e,n),function(t){if(0===Object.keys(gn).length)return;const n=new Map;for(const e of t.exception?.values||[])for(const t of e.stacktrace?.frames||[]){const e=t.abs_path||t.filename;e&&gn[e]&&n.set(e,gn[e])}if(n.size>0){const e=[];for(const[t,r]of n.entries())e.push({type:"sourcemap",code_file:t,debug_id:r});t.debug_meta={images:e}}}(e);const r=Vt(e,dn.dsn,dn.sdkMetadata,dn.tunnel);bn(JSON.stringify(r)),await Sn.send(r),await Sn.flush(2e3),setTimeout((()=>{process.exit(0)}),5e3)}let Nn;if(bn("Started"),dn.captureStackTrace){bn("Connecting to debugger");const n=new t;n.connectToMainThread(),bn("Connected to debugger");const e=new Map;n.on("Debugger.scriptParsed",(t=>{e.set(t.params.scriptId,t.params.url)})),n.on("Debugger.paused",(t=>{if("other"===t.params.reason)try{bn("Debugger paused");const s=[...t.params.callFrames],i=dn.appRootPath?function(t=(process.argv[1]?K(process.argv[1]):process.cwd()),n="\\"===o){const e=n?ln(t):t;return t=>{if(!t)return;const o=n?ln(t):t;let{dir:s,base:i,ext:c}=r.parse(o);".js"!==c&&".mjs"!==c&&".cjs"!==c||(i=i.slice(0,-1*c.length)),s||(s=".");const u=s.lastIndexOf("/node_modules");if(u>-1)return`${s.slice(u+14).replace(/\//g,".")}:${i}`;if(s.startsWith(e)){let t=s.slice(e.length+1).replace(/\//g,".");return t&&(t+=":"),t+=i,t}return i}}(dn.appRootPath):()=>{},c=s.map((t=>function(t,n,e){const r=n?n.replace(/^file:\/\//,""):void 0,o=t.location.columnNumber?t.location.columnNumber+1:void 0,s=t.location.lineNumber?t.location.lineNumber+1:void 0;return O({filename:r,module:e(r),function:t.functionName||P,colno:o,lineno:s,in_app:r?X(r):void 0})}(t,e.get(t.location.scriptId),i))),u=setTimeout((()=>{xn(c).then(null,(()=>{bn("Sending ANR event failed.")}))}),5e3);n.post("Runtime.evaluate",{expression:"global.__SENTRY_GET_SCOPES__();",silent:!0,returnByValue:!0},((t,e)=>{t&&bn(`Error executing script: '${t.message}'`),clearTimeout(u);const r=e&&e.result?e.result.value:void 0;n.post("Debugger.resume"),n.post("Debugger.disable"),xn(c,r).then(null,(()=>{bn("Sending ANR event failed.")}))}))}catch(t){throw n.post("Debugger.resume"),n.post("Debugger.disable"),t}})),Nn=()=>{try{n.post("Debugger.enable",(()=>{n.post("Debugger.pause")}))}catch(t){}}}const{poll:Cn}=function(t,n,e,r){const o=t();let s=!1,i=!0;return setInterval((()=>{const t=o.getTimeMs();!1===s&&t>n+e&&(s=!0,i&&r()),t<n+e&&(s=!1)}),20),{poll:()=>{o.reset()},enabled:t=>{i=t}}}((function(){let t=process.hrtime();return{getTimeMs:()=>{const[n,e]=process.hrtime(t);return Math.floor(1e3*n+e/1e6)},reset:()=>{t=process.hrtime()}}}),dn.pollInterval,dn.anrThreshold,(function(){bn("Watchdog timeout"),Nn?(bn("Pausing debugger to capture stack trace"),Nn()):(bn("Capturing event without a stack trace"),xn().then(null,(()=>{bn("Sending ANR event failed on watchdog timeout.")})))}));n?.on("message",(t=>{t.session&&(mn=yt(t.session)),t.debugImages&&(gn=t.debugImages),Cn()})); |
@@ -8,3 +8,3 @@ import { _optionalChain } from '@sentry/utils'; | ||
// This string is a placeholder that gets overwritten with the worker code. | ||
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjM3LjEgKGYyN2VlNGUpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppb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0 +11,0 @@ function log(...args) { |
@@ -1,2 +0,2 @@ | ||
/*! @sentry/node 8.37.1 (f27ee4e) | https://github.com/getsentry/sentry-javascript */ | ||
import{Session as e}from"node:inspector/promises";import{workerData as t}from"node:worker_threads";const n="8.37.1",o=globalThis;const i="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,a=["debug","info","warn","error","log","assert","trace"],s={};function c(e){if(!("console"in o))return e();const t=o.console,n={},i=Object.keys(s);i.forEach((e=>{const o=s[e];n[e]=t[e],t[e]=o}));try{return e()}finally{i.forEach((e=>{t[e]=n[e]}))}}!function(e,t,i){const a=o,s=a.__SENTRY__=a.__SENTRY__||{},c=s[n]=s[n]||{};c[e]||(c[e]=t())}("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return i?a.forEach((n=>{t[n]=(...t)=>{e&&c((()=>{o.console[n](`Sentry Logger [${n}]:`,...t)}))}})):a.forEach((e=>{t[e]=()=>{}})),t}));const r="__SENTRY_ERROR_LOCAL_VARIABLES__";const u=t;function l(...e){u.debug&&c((()=>console.log("[LocalVariables Worker]",...e)))}async function f(e,t,n,o){const i=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0});o[n]=i.result.filter((e=>"length"!==e.name&&!isNaN(parseInt(e.name,10)))).sort(((e,t)=>parseInt(e.name,10)-parseInt(t.name,10))).map((e=>e.value?.value))}async function g(e,t,n,o){const i=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0});o[n]=i.result.map((e=>[e.name,e.value?.value])).reduce(((e,[t,n])=>(e[t]=n,e)),{})}function d(e,t){e.value&&("value"in e.value?void 0===e.value.value||null===e.value.value?t[e.name]=`<${e.value.value}>`:t[e.name]=e.value.value:"description"in e.value&&"function"!==e.value.type?t[e.name]=`<${e.value.description}>`:"undefined"===e.value.type&&(t[e.name]="<undefined>"))}async function b(e,t){const n=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0}),o={};for(const t of n.result)if(t?.value?.objectId&&"Array"===t?.value.className){const n=t.value.objectId;await f(e,n,t.name,o)}else if(t?.value?.objectId&&"Object"===t?.value?.className){const n=t.value.objectId;await g(e,n,t.name,o)}else t?.value&&d(t,o);return o}let p;(async function(){const t=new e;t.connectToMainThread(),l("Connected to main thread");let n=!1;t.on("Debugger.resumed",(()=>{n=!1})),t.on("Debugger.paused",(e=>{n=!0,async function(e,{reason:t,data:{objectId:n},callFrames:o}){if("exception"!==t&&"promiseRejection"!==t)return;if(p?.(),null==n)return;const i=[];for(let t=0;t<o.length;t++){const{scopeChain:n,functionName:a,this:s}=o[t],c=n.find((e=>"local"===e.type)),r="global"!==s.className&&s.className?`${s.className}.${a}`:a;if(void 0===c?.object.objectId)i[t]={function:r};else{const n=await b(e,c.object.objectId);i[t]={function:r,vars:n}}}await e.post("Runtime.callFunctionOn",{functionDeclaration:`function() { this.${r} = this.${r} || ${JSON.stringify(i)}; }`,silent:!0,objectId:n}),await e.post("Runtime.releaseObject",{objectId:n})}(t,e.params).then((async()=>{n&&await t.post("Debugger.resume")}),(async e=>{n&&await t.post("Debugger.resume")}))})),await t.post("Debugger.enable");const o=!1!==u.captureAllExceptions;if(await t.post("Debugger.setPauseOnExceptions",{state:o?"all":"uncaught"}),o){const e=u.maxExceptionsPerSecond||50;p=function(e,t,n){let o=0,i=5,a=0;return setInterval((()=>{0===a?o>e&&(i*=2,n(i),i>86400&&(i=86400),a=i):(a-=1,0===a&&t()),o=0}),1e3).unref(),()=>{o+=1}}(e,(async()=>{l("Rate-limit lifted."),await t.post("Debugger.setPauseOnExceptions",{state:"all"})}),(async e=>{l(`Rate-limit exceeded. Disabling capturing of caught exceptions for ${e} seconds.`),await t.post("Debugger.setPauseOnExceptions",{state:"uncaught"})}))}})().catch((e=>{l("Failed to start debugger",e)})),setInterval((()=>{}),1e4); | ||
/*! @sentry/node 8.38.0 (396e2f9) | https://github.com/getsentry/sentry-javascript */ | ||
import{Session as e}from"node:inspector/promises";import{workerData as t}from"node:worker_threads";const n="8.38.0",o=globalThis;const i="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,a=["debug","info","warn","error","log","assert","trace"],s={};function c(e){if(!("console"in o))return e();const t=o.console,n={},i=Object.keys(s);i.forEach((e=>{const o=s[e];n[e]=t[e],t[e]=o}));try{return e()}finally{i.forEach((e=>{t[e]=n[e]}))}}!function(e,t,i){const a=o,s=a.__SENTRY__=a.__SENTRY__||{},c=s[n]=s[n]||{};c[e]||(c[e]=t())}("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return i?a.forEach((n=>{t[n]=(...t)=>{e&&c((()=>{o.console[n](`Sentry Logger [${n}]:`,...t)}))}})):a.forEach((e=>{t[e]=()=>{}})),t}));const r="__SENTRY_ERROR_LOCAL_VARIABLES__";const u=t;function l(...e){u.debug&&c((()=>console.log("[LocalVariables Worker]",...e)))}async function f(e,t,n,o){const i=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0});o[n]=i.result.filter((e=>"length"!==e.name&&!isNaN(parseInt(e.name,10)))).sort(((e,t)=>parseInt(e.name,10)-parseInt(t.name,10))).map((e=>e.value?.value))}async function g(e,t,n,o){const i=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0});o[n]=i.result.map((e=>[e.name,e.value?.value])).reduce(((e,[t,n])=>(e[t]=n,e)),{})}function d(e,t){e.value&&("value"in e.value?void 0===e.value.value||null===e.value.value?t[e.name]=`<${e.value.value}>`:t[e.name]=e.value.value:"description"in e.value&&"function"!==e.value.type?t[e.name]=`<${e.value.description}>`:"undefined"===e.value.type&&(t[e.name]="<undefined>"))}async function b(e,t){const n=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0}),o={};for(const t of n.result)if(t?.value?.objectId&&"Array"===t?.value.className){const n=t.value.objectId;await f(e,n,t.name,o)}else if(t?.value?.objectId&&"Object"===t?.value?.className){const n=t.value.objectId;await g(e,n,t.name,o)}else t?.value&&d(t,o);return o}let p;(async function(){const t=new e;t.connectToMainThread(),l("Connected to main thread");let n=!1;t.on("Debugger.resumed",(()=>{n=!1})),t.on("Debugger.paused",(e=>{n=!0,async function(e,{reason:t,data:{objectId:n},callFrames:o}){if("exception"!==t&&"promiseRejection"!==t)return;if(p?.(),null==n)return;const i=[];for(let t=0;t<o.length;t++){const{scopeChain:n,functionName:a,this:s}=o[t],c=n.find((e=>"local"===e.type)),r="global"!==s.className&&s.className?`${s.className}.${a}`:a;if(void 0===c?.object.objectId)i[t]={function:r};else{const n=await b(e,c.object.objectId);i[t]={function:r,vars:n}}}await e.post("Runtime.callFunctionOn",{functionDeclaration:`function() { this.${r} = this.${r} || ${JSON.stringify(i)}; }`,silent:!0,objectId:n}),await e.post("Runtime.releaseObject",{objectId:n})}(t,e.params).then((async()=>{n&&await t.post("Debugger.resume")}),(async e=>{n&&await t.post("Debugger.resume")}))})),await t.post("Debugger.enable");const o=!1!==u.captureAllExceptions;if(await t.post("Debugger.setPauseOnExceptions",{state:o?"all":"uncaught"}),o){const e=u.maxExceptionsPerSecond||50;p=function(e,t,n){let o=0,i=5,a=0;return setInterval((()=>{0===a?o>e&&(i*=2,n(i),i>86400&&(i=86400),a=i):(a-=1,0===a&&t()),o=0}),1e3).unref(),()=>{o+=1}}(e,(async()=>{l("Rate-limit lifted."),await t.post("Debugger.setPauseOnExceptions",{state:"all"})}),(async e=>{l(`Rate-limit exceeded. Disabling capturing of caught exceptions for ${e} seconds.`),await t.post("Debugger.setPauseOnExceptions",{state:"uncaught"})}))}})().catch((e=>{l("Failed to start debugger",e)})),setInterval((()=>{}),1e4); |
@@ -28,2 +28,16 @@ import { AmqplibInstrumentation } from '@opentelemetry/instrumentation-amqplib'; | ||
/** | ||
* Adds Sentry tracing instrumentation for the [amqplib](https://www.npmjs.com/package/amqplib) library. | ||
* | ||
* For more information, see the [`amqplibIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/amqplib/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.amqplibIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
const amqplibIntegration = defineIntegration(_amqplibIntegration); | ||
@@ -30,0 +44,0 @@ |
@@ -19,2 +19,18 @@ import { ConnectInstrumentation } from '@opentelemetry/instrumentation-connect'; | ||
/** | ||
* Adds Sentry tracing instrumentation for [Connect](https://github.com/senchalabs/connect/). | ||
* | ||
* If you also want to capture errors, you need to call `setupConnectErrorHandler(app)` after you initialize your connect app. | ||
* | ||
* For more information, see the [connect documentation](https://docs.sentry.io/platforms/javascript/guides/connect/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.connectIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
const connectIntegration = defineIntegration(_connectIntegration); | ||
@@ -28,2 +44,21 @@ | ||
/** | ||
* Add a Connect middleware to capture errors to Sentry. | ||
* | ||
* @param app The Connect app to attach the error handler to | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const connect = require("connect"); | ||
* | ||
* const app = connect(); | ||
* | ||
* Sentry.setupConnectErrorHandler(app); | ||
* | ||
* // Add you connect routes here | ||
* | ||
* app.listen(3000); | ||
* ``` | ||
*/ | ||
const setupConnectErrorHandler = (app) => { | ||
@@ -30,0 +65,0 @@ app.use(connectErrorMiddleware); |
@@ -48,5 +48,14 @@ import { _optionalChain } from '@sentry/utils'; | ||
/** | ||
* Dataloader integration | ||
* Adds Sentry tracing instrumentation for the [dataloader](https://www.npmjs.com/package/dataloader) library. | ||
* | ||
* Capture tracing data for Dataloader. | ||
* For more information, see the [`dataloaderIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/dataloader/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.dataloaderIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -53,0 +62,0 @@ const dataloaderIntegration = defineIntegration(_dataloaderIntegration); |
@@ -60,6 +60,16 @@ import { _optionalChain } from '@sentry/utils'; | ||
/** | ||
* Express integration | ||
* Adds Sentry tracing instrumentation for [Express](https://expressjs.com/). | ||
* | ||
* Capture tracing data for express. | ||
* In order to capture exceptions, you have to call `setupExpressErrorHandler(app)` before any other middleware and after all controllers. | ||
* If you also want to capture errors, you need to call `setupExpressErrorHandler(app)` after you set up your Express server. | ||
* | ||
* For more information, see the [express documentation](https://docs.sentry.io/platforms/javascript/guides/express/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.expressIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
@@ -111,4 +121,24 @@ const expressIntegration = defineIntegration(_expressIntegration); | ||
/** | ||
* Setup an error handler for Express. | ||
* Add an Express error handler to capture errors to Sentry. | ||
* | ||
* The error handler must be before any other middleware and after all controllers. | ||
* | ||
* @param app The Express instances | ||
* @param options {ExpressHandlerOptions} Configuration options for the handler | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const express = require("express"); | ||
* | ||
* const app = express(); | ||
* | ||
* // Add your routes, etc. | ||
* | ||
* // Add this after all routes, | ||
* // but before any and other error-handling middlewares are defined | ||
* Sentry.setupExpressErrorHandler(app); | ||
* | ||
* app.listen(3000); | ||
* ``` | ||
*/ | ||
@@ -115,0 +145,0 @@ function setupExpressErrorHandler( |
@@ -31,5 +31,16 @@ import { _optionalChain } from '@sentry/utils'; | ||
/** | ||
* Express integration | ||
* Adds Sentry tracing instrumentation for [Fastify](https://fastify.dev/). | ||
* | ||
* Capture tracing data for fastify. | ||
* If you also want to capture errors, you need to call `setupFastifyErrorHandler(app)` after you set up your Fastify server. | ||
* | ||
* For more information, see the [fastify documentation](https://docs.sentry.io/platforms/javascript/guides/fastify/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.fastifyIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
@@ -39,3 +50,19 @@ const fastifyIntegration = defineIntegration(_fastifyIntegration); | ||
/** | ||
* Setup an error handler for Fastify. | ||
* Add an Fastify error handler to capture errors to Sentry. | ||
* | ||
* @param fastify The Fastify instance to which to add the error handler | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const Fastify = require("fastify"); | ||
* | ||
* const app = Fastify(); | ||
* | ||
* Sentry.setupFastifyErrorHandler(app); | ||
* | ||
* // Add your routes, etc. | ||
* | ||
* app.listen({ port: 3000 }); | ||
* ``` | ||
*/ | ||
@@ -42,0 +69,0 @@ function setupFastifyErrorHandler(fastify) { |
@@ -35,5 +35,14 @@ import { GenericPoolInstrumentation } from '@opentelemetry/instrumentation-generic-pool'; | ||
/** | ||
* GenericPool integration | ||
* Adds Sentry tracing instrumentation for the [generic-pool](https://www.npmjs.com/package/generic-pool) library. | ||
* | ||
* Capture tracing data for GenericPool. | ||
* For more information, see the [`genericPoolIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/genericpool/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.genericPoolIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -40,0 +49,0 @@ const genericPoolIntegration = defineIntegration(_genericPoolIntegration); |
@@ -65,5 +65,15 @@ import { GraphQLInstrumentation } from '@opentelemetry/instrumentation-graphql'; | ||
/** | ||
* GraphQL integration | ||
* Adds Sentry tracing instrumentation for the [graphql](https://www.npmjs.com/package/graphql) library. | ||
* | ||
* Capture tracing data for GraphQL. | ||
* For more information, see the [`graphqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/graphql/). | ||
* | ||
* @param {GraphqlOptions} options Configuration options for the GraphQL integration. | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.graphqlIntegration()], | ||
* }); | ||
*/ | ||
@@ -70,0 +80,0 @@ const graphqlIntegration = defineIntegration(_graphqlIntegration); |
@@ -23,6 +23,16 @@ import { _optionalChain } from '@sentry/utils'; | ||
/** | ||
* Hapi integration | ||
* Adds Sentry tracing instrumentation for [Hapi](https://hapi.dev/). | ||
* | ||
* Capture tracing data for Hapi. | ||
* If you also want to capture errors, you need to call `setupHapiErrorHandler(server)` after you set up your server. | ||
* | ||
* For more information, see the [hapi documentation](https://docs.sentry.io/platforms/javascript/guides/hapi/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.hapiIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
@@ -74,2 +84,20 @@ const hapiIntegration = defineIntegration(_hapiIntegration); | ||
* Add a Hapi plugin to capture errors to Sentry. | ||
* | ||
* @param server The Hapi server to attach the error handler to | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const Hapi = require('@hapi/hapi'); | ||
* | ||
* const init = async () => { | ||
* const server = Hapi.server(); | ||
* | ||
* // all your routes here | ||
* | ||
* await Sentry.setupHapiErrorHandler(server); | ||
* | ||
* await server.start(); | ||
* }; | ||
* ``` | ||
*/ | ||
@@ -76,0 +104,0 @@ async function setupHapiErrorHandler(server) { |
@@ -19,2 +19,3 @@ import { instrumentOtelHttp } from '../http/index.js'; | ||
import { redisIntegration, instrumentRedis } from './redis.js'; | ||
import { tediousIntegration, instrumentTedious } from './tedious.js'; | ||
@@ -43,2 +44,3 @@ /** | ||
connectIntegration(), | ||
tediousIntegration(), | ||
genericPoolIntegration(), | ||
@@ -74,2 +76,3 @@ kafkaIntegration(), | ||
instrumentRedis, | ||
instrumentTedious, | ||
instrumentGenericPool, | ||
@@ -76,0 +79,0 @@ instrumentAmqplib, |
@@ -31,5 +31,13 @@ import { KafkaJsInstrumentation } from '@opentelemetry/instrumentation-kafkajs'; | ||
/** | ||
* KafkaJs integration | ||
* Adds Sentry tracing instrumentation for the [kafkajs](https://www.npmjs.com/package/kafkajs) library. | ||
* | ||
* Capture tracing data for KafkaJs. | ||
* For more information, see the [`kafkaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/kafka/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.kafkaIntegration()], | ||
* }); | ||
*/ | ||
@@ -36,0 +44,0 @@ const kafkaIntegration = defineIntegration(_kafkaIntegration); |
@@ -43,4 +43,42 @@ import { _optionalChain } from '@sentry/utils'; | ||
/** | ||
* Adds Sentry tracing instrumentation for [Koa](https://koajs.com/). | ||
* | ||
* If you also want to capture errors, you need to call `setupKoaErrorHandler(app)` after you set up your Koa server. | ||
* | ||
* For more information, see the [koa documentation](https://docs.sentry.io/platforms/javascript/guides/koa/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.koaIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
const koaIntegration = defineIntegration(_koaIntegration); | ||
/** | ||
* Add an Koa error handler to capture errors to Sentry. | ||
* | ||
* The error handler must be before any other middleware and after all controllers. | ||
* | ||
* @param app The Express instances | ||
* @param options {ExpressHandlerOptions} Configuration options for the handler | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const Koa = require("koa"); | ||
* | ||
* const app = new Koa(); | ||
* | ||
* Sentry.setupKoaErrorHandler(app); | ||
* | ||
* // Add your routes, etc. | ||
* | ||
* app.listen(3000); | ||
* ``` | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
@@ -47,0 +85,0 @@ const setupKoaErrorHandler = (app) => { |
@@ -19,5 +19,13 @@ import { LruMemoizerInstrumentation } from '@opentelemetry/instrumentation-lru-memoizer'; | ||
/** | ||
* LruMemoizer integration | ||
* Adds Sentry tracing instrumentation for the [lru-memoizer](https://www.npmjs.com/package/lru-memoizer) library. | ||
* | ||
* Propagate traces through LruMemoizer. | ||
* For more information, see the [`lruMemoizerIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/lrumemoizer/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.lruMemoizerIntegration()], | ||
* }); | ||
*/ | ||
@@ -24,0 +32,0 @@ const lruMemoizerIntegration = defineIntegration(_lruMemoizerIntegration); |
@@ -28,5 +28,14 @@ import { MongoDBInstrumentation } from '@opentelemetry/instrumentation-mongodb'; | ||
/** | ||
* MongoDB integration | ||
* Adds Sentry tracing instrumentation for the [mongodb](https://www.npmjs.com/package/mongodb) library. | ||
* | ||
* Capture tracing data for MongoDB. | ||
* For more information, see the [`mongoIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongo/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mongoIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -33,0 +42,0 @@ const mongoIntegration = defineIntegration(_mongoIntegration); |
@@ -28,5 +28,14 @@ import { MongooseInstrumentation } from '@opentelemetry/instrumentation-mongoose'; | ||
/** | ||
* Mongoose integration | ||
* Adds Sentry tracing instrumentation for the [mongoose](https://www.npmjs.com/package/mongoose) library. | ||
* | ||
* Capture tracing data for Mongoose. | ||
* For more information, see the [`mongooseIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongoose/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mongooseIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -33,0 +42,0 @@ const mongooseIntegration = defineIntegration(_mongooseIntegration); |
@@ -19,5 +19,14 @@ import { MySQLInstrumentation } from '@opentelemetry/instrumentation-mysql'; | ||
/** | ||
* MySQL integration | ||
* Adds Sentry tracing instrumentation for the [mysql](https://www.npmjs.com/package/mysql) library. | ||
* | ||
* Capture tracing data for mysql. | ||
* For more information, see the [`mysqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mysqlIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -24,0 +33,0 @@ const mysqlIntegration = defineIntegration(_mysqlIntegration); |
@@ -28,5 +28,14 @@ import { MySQL2Instrumentation } from '@opentelemetry/instrumentation-mysql2'; | ||
/** | ||
* MySQL2 integration | ||
* Adds Sentry tracing instrumentation for the [mysql2](https://www.npmjs.com/package/mysql2) library. | ||
* | ||
* Capture tracing data for mysql2 | ||
* For more information, see the [`mysql2Integration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql2/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mysqlIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -33,0 +42,0 @@ const mysql2Integration = defineIntegration(_mysql2Integration); |
@@ -29,5 +29,14 @@ import { PgInstrumentation } from '@opentelemetry/instrumentation-pg'; | ||
/** | ||
* Postgres integration | ||
* Adds Sentry tracing instrumentation for the [pg](https://www.npmjs.com/package/pg) library. | ||
* | ||
* Capture tracing data for pg. | ||
* For more information, see the [`postgresIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/postgres/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.postgresIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -34,0 +43,0 @@ const postgresIntegration = defineIntegration(_postgresIntegration); |
@@ -40,9 +40,27 @@ import { _optionalChain } from '@sentry/utils'; | ||
/** | ||
* Prisma integration | ||
* Adds Sentry tracing instrumentation for the [prisma](https://www.npmjs.com/package/prisma) library. | ||
* | ||
* Capture tracing data for prisma. | ||
* Note: This requires to set: | ||
* previewFeatures = ["tracing"] | ||
* For the prisma client. | ||
* See https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing for more details. | ||
* For more information, see the [`prismaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/). | ||
* | ||
* @example | ||
* | ||
* Make sure `previewFeatures = ["tracing"]` is set in the prisma client generator block. See the | ||
* [prisma docs](https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing) for more details. | ||
* | ||
* ```prisma | ||
* generator client { | ||
* provider = "prisma-client-js" | ||
* previewFeatures = ["tracing"] | ||
* } | ||
* ``` | ||
* | ||
* Then you can use the integration like this: | ||
* | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.prismaIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -49,0 +67,0 @@ const prismaIntegration = defineIntegration(_prismaIntegration); |
@@ -92,5 +92,15 @@ import { _optionalChain } from '@sentry/utils'; | ||
/** | ||
* Redis integration for "ioredis" | ||
* Adds Sentry tracing instrumentation for the [redis](https://www.npmjs.com/package/redis) and | ||
* [ioredis](https://www.npmjs.com/package/ioredis) libraries. | ||
* | ||
* Capture tracing data for redis and ioredis. | ||
* For more information, see the [`redisIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/redis/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.redisIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -97,0 +107,0 @@ const redisIntegration = defineIntegration(_redisIntegration); |
@@ -1,1 +0,1 @@ | ||
{"type":"module","version":"8.37.1","sideEffects":false} | ||
{"type":"module","version":"8.38.0","sideEffects":false} |
@@ -29,2 +29,4 @@ export { httpIntegration } from './integrations/http'; | ||
export { spotlightIntegration } from './integrations/spotlight'; | ||
export { knexIntegration } from './integrations/tracing/knex'; | ||
export { tediousIntegration } from './integrations/tracing/tedious'; | ||
export { genericPoolIntegration } from './integrations/tracing/genericPool'; | ||
@@ -31,0 +33,0 @@ export { dataloaderIntegration } from './integrations/tracing/dataloader'; |
export declare const instrumentAmqplib: ((options?: unknown) => void) & { | ||
id: string; | ||
}; | ||
/** | ||
* Adds Sentry tracing instrumentation for the [amqplib](https://www.npmjs.com/package/amqplib) library. | ||
* | ||
* For more information, see the [`amqplibIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/amqplib/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.amqplibIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const amqplibIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=amqplib.d.ts.map |
@@ -7,5 +7,40 @@ type ConnectApp = { | ||
}; | ||
/** | ||
* Adds Sentry tracing instrumentation for [Connect](https://github.com/senchalabs/connect/). | ||
* | ||
* If you also want to capture errors, you need to call `setupConnectErrorHandler(app)` after you initialize your connect app. | ||
* | ||
* For more information, see the [connect documentation](https://docs.sentry.io/platforms/javascript/guides/connect/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.connectIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
export declare const connectIntegration: () => import("@sentry/types").Integration; | ||
/** | ||
* Add a Connect middleware to capture errors to Sentry. | ||
* | ||
* @param app The Connect app to attach the error handler to | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const connect = require("connect"); | ||
* | ||
* const app = connect(); | ||
* | ||
* Sentry.setupConnectErrorHandler(app); | ||
* | ||
* // Add you connect routes here | ||
* | ||
* app.listen(3000); | ||
* ``` | ||
*/ | ||
export declare const setupConnectErrorHandler: (app: ConnectApp) => void; | ||
export {}; | ||
//# sourceMappingURL=connect.d.ts.map |
@@ -5,7 +5,16 @@ export declare const instrumentDataloader: ((options?: unknown) => void) & { | ||
/** | ||
* Dataloader integration | ||
* Adds Sentry tracing instrumentation for the [dataloader](https://www.npmjs.com/package/dataloader) library. | ||
* | ||
* Capture tracing data for Dataloader. | ||
* For more information, see the [`dataloaderIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/dataloader/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.dataloaderIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const dataloaderIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=dataloader.d.ts.map |
@@ -7,6 +7,16 @@ /// <reference types="node" /> | ||
/** | ||
* Express integration | ||
* Adds Sentry tracing instrumentation for [Express](https://expressjs.com/). | ||
* | ||
* Capture tracing data for express. | ||
* In order to capture exceptions, you have to call `setupExpressErrorHandler(app)` before any other middleware and after all controllers. | ||
* If you also want to capture errors, you need to call `setupExpressErrorHandler(app)` after you set up your Express server. | ||
* | ||
* For more information, see the [express documentation](https://docs.sentry.io/platforms/javascript/guides/express/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.expressIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
@@ -35,4 +45,24 @@ export declare const expressIntegration: () => import("@sentry/types").Integration; | ||
/** | ||
* Setup an error handler for Express. | ||
* Add an Express error handler to capture errors to Sentry. | ||
* | ||
* The error handler must be before any other middleware and after all controllers. | ||
* | ||
* @param app The Express instances | ||
* @param options {ExpressHandlerOptions} Configuration options for the handler | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const express = require("express"); | ||
* | ||
* const app = express(); | ||
* | ||
* // Add your routes, etc. | ||
* | ||
* // Add this after all routes, | ||
* // but before any and other error-handling middlewares are defined | ||
* Sentry.setupExpressErrorHandler(app); | ||
* | ||
* app.listen(3000); | ||
* ``` | ||
*/ | ||
@@ -39,0 +69,0 @@ export declare function setupExpressErrorHandler(app: { |
@@ -9,9 +9,36 @@ interface Fastify { | ||
/** | ||
* Express integration | ||
* Adds Sentry tracing instrumentation for [Fastify](https://fastify.dev/). | ||
* | ||
* Capture tracing data for fastify. | ||
* If you also want to capture errors, you need to call `setupFastifyErrorHandler(app)` after you set up your Fastify server. | ||
* | ||
* For more information, see the [fastify documentation](https://docs.sentry.io/platforms/javascript/guides/fastify/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.fastifyIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
export declare const fastifyIntegration: () => import("@sentry/types").Integration; | ||
/** | ||
* Setup an error handler for Fastify. | ||
* Add an Fastify error handler to capture errors to Sentry. | ||
* | ||
* @param fastify The Fastify instance to which to add the error handler | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const Fastify = require("fastify"); | ||
* | ||
* const app = Fastify(); | ||
* | ||
* Sentry.setupFastifyErrorHandler(app); | ||
* | ||
* // Add your routes, etc. | ||
* | ||
* app.listen({ port: 3000 }); | ||
* ``` | ||
*/ | ||
@@ -18,0 +45,0 @@ export declare function setupFastifyErrorHandler(fastify: Fastify): void; |
@@ -5,7 +5,16 @@ export declare const instrumentGenericPool: ((options?: unknown) => void) & { | ||
/** | ||
* GenericPool integration | ||
* Adds Sentry tracing instrumentation for the [generic-pool](https://www.npmjs.com/package/generic-pool) library. | ||
* | ||
* Capture tracing data for GenericPool. | ||
* For more information, see the [`genericPoolIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/genericpool/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.genericPoolIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const genericPoolIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=genericPool.d.ts.map |
@@ -31,5 +31,15 @@ interface GraphqlOptions { | ||
/** | ||
* GraphQL integration | ||
* Adds Sentry tracing instrumentation for the [graphql](https://www.npmjs.com/package/graphql) library. | ||
* | ||
* Capture tracing data for GraphQL. | ||
* For more information, see the [`graphqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/graphql/). | ||
* | ||
* @param {GraphqlOptions} options Configuration options for the GraphQL integration. | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.graphqlIntegration()], | ||
* }); | ||
*/ | ||
@@ -36,0 +46,0 @@ export declare const graphqlIntegration: (options?: GraphqlOptions | undefined) => import("@sentry/types").Integration; |
@@ -6,6 +6,16 @@ import { Server } from './types'; | ||
/** | ||
* Hapi integration | ||
* Adds Sentry tracing instrumentation for [Hapi](https://hapi.dev/). | ||
* | ||
* Capture tracing data for Hapi. | ||
* If you also want to capture errors, you need to call `setupHapiErrorHandler(server)` after you set up your server. | ||
* | ||
* For more information, see the [hapi documentation](https://docs.sentry.io/platforms/javascript/guides/hapi/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.hapiIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
@@ -20,4 +30,22 @@ export declare const hapiIntegration: () => import("@sentry/types").Integration; | ||
* Add a Hapi plugin to capture errors to Sentry. | ||
* | ||
* @param server The Hapi server to attach the error handler to | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const Hapi = require('@hapi/hapi'); | ||
* | ||
* const init = async () => { | ||
* const server = Hapi.server(); | ||
* | ||
* // all your routes here | ||
* | ||
* await Sentry.setupHapiErrorHandler(server); | ||
* | ||
* await server.start(); | ||
* }; | ||
* ``` | ||
*/ | ||
export declare function setupHapiErrorHandler(server: Server): Promise<void>; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -5,7 +5,15 @@ export declare const instrumentKafka: ((options?: unknown) => void) & { | ||
/** | ||
* KafkaJs integration | ||
* Adds Sentry tracing instrumentation for the [kafkajs](https://www.npmjs.com/package/kafkajs) library. | ||
* | ||
* Capture tracing data for KafkaJs. | ||
* For more information, see the [`kafkaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/kafka/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.kafkaIntegration()], | ||
* }); | ||
*/ | ||
export declare const kafkaIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=kafka.d.ts.map |
export declare const instrumentKoa: ((options?: unknown) => void) & { | ||
id: string; | ||
}; | ||
/** | ||
* Adds Sentry tracing instrumentation for [Koa](https://koajs.com/). | ||
* | ||
* If you also want to capture errors, you need to call `setupKoaErrorHandler(app)` after you set up your Koa server. | ||
* | ||
* For more information, see the [koa documentation](https://docs.sentry.io/platforms/javascript/guides/koa/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.koaIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
export declare const koaIntegration: () => import("@sentry/types").Integration; | ||
/** | ||
* Add an Koa error handler to capture errors to Sentry. | ||
* | ||
* The error handler must be before any other middleware and after all controllers. | ||
* | ||
* @param app The Express instances | ||
* @param options {ExpressHandlerOptions} Configuration options for the handler | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const Koa = require("koa"); | ||
* | ||
* const app = new Koa(); | ||
* | ||
* Sentry.setupKoaErrorHandler(app); | ||
* | ||
* // Add your routes, etc. | ||
* | ||
* app.listen(3000); | ||
* ``` | ||
*/ | ||
export declare const setupKoaErrorHandler: (app: { | ||
@@ -6,0 +44,0 @@ use: (arg0: (ctx: any, next: any) => Promise<void>) => void; |
@@ -5,7 +5,15 @@ export declare const instrumentLruMemoizer: ((options?: unknown) => void) & { | ||
/** | ||
* LruMemoizer integration | ||
* Adds Sentry tracing instrumentation for the [lru-memoizer](https://www.npmjs.com/package/lru-memoizer) library. | ||
* | ||
* Propagate traces through LruMemoizer. | ||
* For more information, see the [`lruMemoizerIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/lrumemoizer/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.lruMemoizerIntegration()], | ||
* }); | ||
*/ | ||
export declare const lruMemoizerIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=lrumemoizer.d.ts.map |
@@ -5,7 +5,16 @@ export declare const instrumentMongo: ((options?: unknown) => void) & { | ||
/** | ||
* MongoDB integration | ||
* Adds Sentry tracing instrumentation for the [mongodb](https://www.npmjs.com/package/mongodb) library. | ||
* | ||
* Capture tracing data for MongoDB. | ||
* For more information, see the [`mongoIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongo/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mongoIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const mongoIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=mongo.d.ts.map |
@@ -5,7 +5,16 @@ export declare const instrumentMongoose: ((options?: unknown) => void) & { | ||
/** | ||
* Mongoose integration | ||
* Adds Sentry tracing instrumentation for the [mongoose](https://www.npmjs.com/package/mongoose) library. | ||
* | ||
* Capture tracing data for Mongoose. | ||
* For more information, see the [`mongooseIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongoose/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mongooseIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const mongooseIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=mongoose.d.ts.map |
export declare const instrumentMysql: ((options?: unknown) => void) & { | ||
/** | ||
* MySQL integration | ||
* Adds Sentry tracing instrumentation for the [mysql](https://www.npmjs.com/package/mysql) library. | ||
* | ||
* Capture tracing data for mysql. | ||
* For more information, see the [`mysqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mysqlIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -10,7 +19,16 @@ id: string; | ||
/** | ||
* MySQL integration | ||
* Adds Sentry tracing instrumentation for the [mysql](https://www.npmjs.com/package/mysql) library. | ||
* | ||
* Capture tracing data for mysql. | ||
* For more information, see the [`mysqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mysqlIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const mysqlIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=mysql.d.ts.map |
@@ -5,7 +5,16 @@ export declare const instrumentMysql2: ((options?: unknown) => void) & { | ||
/** | ||
* MySQL2 integration | ||
* Adds Sentry tracing instrumentation for the [mysql2](https://www.npmjs.com/package/mysql2) library. | ||
* | ||
* Capture tracing data for mysql2 | ||
* For more information, see the [`mysql2Integration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql2/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mysqlIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const mysql2Integration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=mysql2.d.ts.map |
@@ -5,7 +5,16 @@ export declare const instrumentPostgres: ((options?: unknown) => void) & { | ||
/** | ||
* Postgres integration | ||
* Adds Sentry tracing instrumentation for the [pg](https://www.npmjs.com/package/pg) library. | ||
* | ||
* Capture tracing data for pg. | ||
* For more information, see the [`postgresIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/postgres/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.postgresIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const postgresIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=postgres.d.ts.map |
@@ -5,11 +5,29 @@ export declare const instrumentPrisma: ((options?: unknown) => void) & { | ||
/** | ||
* Prisma integration | ||
* Adds Sentry tracing instrumentation for the [prisma](https://www.npmjs.com/package/prisma) library. | ||
* | ||
* Capture tracing data for prisma. | ||
* Note: This requires to set: | ||
* previewFeatures = ["tracing"] | ||
* For the prisma client. | ||
* See https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing for more details. | ||
* For more information, see the [`prismaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/). | ||
* | ||
* @example | ||
* | ||
* Make sure `previewFeatures = ["tracing"]` is set in the prisma client generator block. See the | ||
* [prisma docs](https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing) for more details. | ||
* | ||
* ```prisma | ||
* generator client { | ||
* provider = "prisma-client-js" | ||
* previewFeatures = ["tracing"] | ||
* } | ||
* ``` | ||
* | ||
* Then you can use the integration like this: | ||
* | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.prismaIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const prismaIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=prisma.d.ts.map |
@@ -9,5 +9,15 @@ interface RedisOptions { | ||
/** | ||
* Redis integration for "ioredis" | ||
* Adds Sentry tracing instrumentation for the [redis](https://www.npmjs.com/package/redis) and | ||
* [ioredis](https://www.npmjs.com/package/ioredis) libraries. | ||
* | ||
* Capture tracing data for redis and ioredis. | ||
* For more information, see the [`redisIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/redis/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.redisIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -14,0 +24,0 @@ export declare const redisIntegration: (options?: RedisOptions | undefined) => import("@sentry/types").Integration; |
@@ -29,2 +29,4 @@ export { httpIntegration } from './integrations/http'; | ||
export { spotlightIntegration } from './integrations/spotlight'; | ||
export { knexIntegration } from './integrations/tracing/knex'; | ||
export { tediousIntegration } from './integrations/tracing/tedious'; | ||
export { genericPoolIntegration } from './integrations/tracing/genericPool'; | ||
@@ -31,0 +33,0 @@ export { dataloaderIntegration } from './integrations/tracing/dataloader'; |
export declare const instrumentAmqplib: ((options?: unknown) => void) & { | ||
id: string; | ||
}; | ||
/** | ||
* Adds Sentry tracing instrumentation for the [amqplib](https://www.npmjs.com/package/amqplib) library. | ||
* | ||
* For more information, see the [`amqplibIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/amqplib/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.amqplibIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const amqplibIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=amqplib.d.ts.map |
@@ -7,5 +7,40 @@ type ConnectApp = { | ||
}; | ||
/** | ||
* Adds Sentry tracing instrumentation for [Connect](https://github.com/senchalabs/connect/). | ||
* | ||
* If you also want to capture errors, you need to call `setupConnectErrorHandler(app)` after you initialize your connect app. | ||
* | ||
* For more information, see the [connect documentation](https://docs.sentry.io/platforms/javascript/guides/connect/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.connectIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
export declare const connectIntegration: () => import("@sentry/types").Integration; | ||
/** | ||
* Add a Connect middleware to capture errors to Sentry. | ||
* | ||
* @param app The Connect app to attach the error handler to | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const connect = require("connect"); | ||
* | ||
* const app = connect(); | ||
* | ||
* Sentry.setupConnectErrorHandler(app); | ||
* | ||
* // Add you connect routes here | ||
* | ||
* app.listen(3000); | ||
* ``` | ||
*/ | ||
export declare const setupConnectErrorHandler: (app: ConnectApp) => void; | ||
export {}; | ||
//# sourceMappingURL=connect.d.ts.map |
@@ -5,7 +5,16 @@ export declare const instrumentDataloader: ((options?: unknown) => void) & { | ||
/** | ||
* Dataloader integration | ||
* Adds Sentry tracing instrumentation for the [dataloader](https://www.npmjs.com/package/dataloader) library. | ||
* | ||
* Capture tracing data for Dataloader. | ||
* For more information, see the [`dataloaderIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/dataloader/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.dataloaderIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const dataloaderIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=dataloader.d.ts.map |
@@ -7,6 +7,16 @@ /// <reference types="node" /> | ||
/** | ||
* Express integration | ||
* Adds Sentry tracing instrumentation for [Express](https://expressjs.com/). | ||
* | ||
* Capture tracing data for express. | ||
* In order to capture exceptions, you have to call `setupExpressErrorHandler(app)` before any other middleware and after all controllers. | ||
* If you also want to capture errors, you need to call `setupExpressErrorHandler(app)` after you set up your Express server. | ||
* | ||
* For more information, see the [express documentation](https://docs.sentry.io/platforms/javascript/guides/express/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.expressIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
@@ -35,4 +45,24 @@ export declare const expressIntegration: () => import("@sentry/types").Integration; | ||
/** | ||
* Setup an error handler for Express. | ||
* Add an Express error handler to capture errors to Sentry. | ||
* | ||
* The error handler must be before any other middleware and after all controllers. | ||
* | ||
* @param app The Express instances | ||
* @param options {ExpressHandlerOptions} Configuration options for the handler | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const express = require("express"); | ||
* | ||
* const app = express(); | ||
* | ||
* // Add your routes, etc. | ||
* | ||
* // Add this after all routes, | ||
* // but before any and other error-handling middlewares are defined | ||
* Sentry.setupExpressErrorHandler(app); | ||
* | ||
* app.listen(3000); | ||
* ``` | ||
*/ | ||
@@ -39,0 +69,0 @@ export declare function setupExpressErrorHandler(app: { |
@@ -9,9 +9,36 @@ interface Fastify { | ||
/** | ||
* Express integration | ||
* Adds Sentry tracing instrumentation for [Fastify](https://fastify.dev/). | ||
* | ||
* Capture tracing data for fastify. | ||
* If you also want to capture errors, you need to call `setupFastifyErrorHandler(app)` after you set up your Fastify server. | ||
* | ||
* For more information, see the [fastify documentation](https://docs.sentry.io/platforms/javascript/guides/fastify/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.fastifyIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
export declare const fastifyIntegration: () => import("@sentry/types").Integration; | ||
/** | ||
* Setup an error handler for Fastify. | ||
* Add an Fastify error handler to capture errors to Sentry. | ||
* | ||
* @param fastify The Fastify instance to which to add the error handler | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const Fastify = require("fastify"); | ||
* | ||
* const app = Fastify(); | ||
* | ||
* Sentry.setupFastifyErrorHandler(app); | ||
* | ||
* // Add your routes, etc. | ||
* | ||
* app.listen({ port: 3000 }); | ||
* ``` | ||
*/ | ||
@@ -18,0 +45,0 @@ export declare function setupFastifyErrorHandler(fastify: Fastify): void; |
@@ -5,7 +5,16 @@ export declare const instrumentGenericPool: ((options?: unknown) => void) & { | ||
/** | ||
* GenericPool integration | ||
* Adds Sentry tracing instrumentation for the [generic-pool](https://www.npmjs.com/package/generic-pool) library. | ||
* | ||
* Capture tracing data for GenericPool. | ||
* For more information, see the [`genericPoolIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/genericpool/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.genericPoolIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const genericPoolIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=genericPool.d.ts.map |
@@ -31,5 +31,15 @@ interface GraphqlOptions { | ||
/** | ||
* GraphQL integration | ||
* Adds Sentry tracing instrumentation for the [graphql](https://www.npmjs.com/package/graphql) library. | ||
* | ||
* Capture tracing data for GraphQL. | ||
* For more information, see the [`graphqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/graphql/). | ||
* | ||
* @param {GraphqlOptions} options Configuration options for the GraphQL integration. | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.graphqlIntegration()], | ||
* }); | ||
*/ | ||
@@ -36,0 +46,0 @@ export declare const graphqlIntegration: (options?: GraphqlOptions | undefined) => import("@sentry/types").Integration; |
@@ -6,6 +6,16 @@ import type { Server } from './types'; | ||
/** | ||
* Hapi integration | ||
* Adds Sentry tracing instrumentation for [Hapi](https://hapi.dev/). | ||
* | ||
* Capture tracing data for Hapi. | ||
* If you also want to capture errors, you need to call `setupHapiErrorHandler(server)` after you set up your server. | ||
* | ||
* For more information, see the [hapi documentation](https://docs.sentry.io/platforms/javascript/guides/hapi/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.hapiIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
@@ -20,4 +30,22 @@ export declare const hapiIntegration: () => import("@sentry/types").Integration; | ||
* Add a Hapi plugin to capture errors to Sentry. | ||
* | ||
* @param server The Hapi server to attach the error handler to | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const Hapi = require('@hapi/hapi'); | ||
* | ||
* const init = async () => { | ||
* const server = Hapi.server(); | ||
* | ||
* // all your routes here | ||
* | ||
* await Sentry.setupHapiErrorHandler(server); | ||
* | ||
* await server.start(); | ||
* }; | ||
* ``` | ||
*/ | ||
export declare function setupHapiErrorHandler(server: Server): Promise<void>; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -5,7 +5,15 @@ export declare const instrumentKafka: ((options?: unknown) => void) & { | ||
/** | ||
* KafkaJs integration | ||
* Adds Sentry tracing instrumentation for the [kafkajs](https://www.npmjs.com/package/kafkajs) library. | ||
* | ||
* Capture tracing data for KafkaJs. | ||
* For more information, see the [`kafkaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/kafka/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.kafkaIntegration()], | ||
* }); | ||
*/ | ||
export declare const kafkaIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=kafka.d.ts.map |
export declare const instrumentKoa: ((options?: unknown) => void) & { | ||
id: string; | ||
}; | ||
/** | ||
* Adds Sentry tracing instrumentation for [Koa](https://koajs.com/). | ||
* | ||
* If you also want to capture errors, you need to call `setupKoaErrorHandler(app)` after you set up your Koa server. | ||
* | ||
* For more information, see the [koa documentation](https://docs.sentry.io/platforms/javascript/guides/koa/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.koaIntegration()], | ||
* }) | ||
* ``` | ||
*/ | ||
export declare const koaIntegration: () => import("@sentry/types").Integration; | ||
/** | ||
* Add an Koa error handler to capture errors to Sentry. | ||
* | ||
* The error handler must be before any other middleware and after all controllers. | ||
* | ||
* @param app The Express instances | ||
* @param options {ExpressHandlerOptions} Configuration options for the handler | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* const Koa = require("koa"); | ||
* | ||
* const app = new Koa(); | ||
* | ||
* Sentry.setupKoaErrorHandler(app); | ||
* | ||
* // Add your routes, etc. | ||
* | ||
* app.listen(3000); | ||
* ``` | ||
*/ | ||
export declare const setupKoaErrorHandler: (app: { | ||
@@ -6,0 +44,0 @@ use: (arg0: (ctx: any, next: any) => Promise<void>) => void; |
@@ -5,7 +5,15 @@ export declare const instrumentLruMemoizer: ((options?: unknown) => void) & { | ||
/** | ||
* LruMemoizer integration | ||
* Adds Sentry tracing instrumentation for the [lru-memoizer](https://www.npmjs.com/package/lru-memoizer) library. | ||
* | ||
* Propagate traces through LruMemoizer. | ||
* For more information, see the [`lruMemoizerIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/lrumemoizer/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.lruMemoizerIntegration()], | ||
* }); | ||
*/ | ||
export declare const lruMemoizerIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=lrumemoizer.d.ts.map |
@@ -5,7 +5,16 @@ export declare const instrumentMongo: ((options?: unknown) => void) & { | ||
/** | ||
* MongoDB integration | ||
* Adds Sentry tracing instrumentation for the [mongodb](https://www.npmjs.com/package/mongodb) library. | ||
* | ||
* Capture tracing data for MongoDB. | ||
* For more information, see the [`mongoIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongo/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mongoIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const mongoIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=mongo.d.ts.map |
@@ -5,7 +5,16 @@ export declare const instrumentMongoose: ((options?: unknown) => void) & { | ||
/** | ||
* Mongoose integration | ||
* Adds Sentry tracing instrumentation for the [mongoose](https://www.npmjs.com/package/mongoose) library. | ||
* | ||
* Capture tracing data for Mongoose. | ||
* For more information, see the [`mongooseIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongoose/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mongooseIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const mongooseIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=mongoose.d.ts.map |
export declare const instrumentMysql: ((options?: unknown) => void) & { | ||
/** | ||
* MySQL integration | ||
* Adds Sentry tracing instrumentation for the [mysql](https://www.npmjs.com/package/mysql) library. | ||
* | ||
* Capture tracing data for mysql. | ||
* For more information, see the [`mysqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mysqlIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -10,7 +19,16 @@ id: string; | ||
/** | ||
* MySQL integration | ||
* Adds Sentry tracing instrumentation for the [mysql](https://www.npmjs.com/package/mysql) library. | ||
* | ||
* Capture tracing data for mysql. | ||
* For more information, see the [`mysqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mysqlIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const mysqlIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=mysql.d.ts.map |
@@ -5,7 +5,16 @@ export declare const instrumentMysql2: ((options?: unknown) => void) & { | ||
/** | ||
* MySQL2 integration | ||
* Adds Sentry tracing instrumentation for the [mysql2](https://www.npmjs.com/package/mysql2) library. | ||
* | ||
* Capture tracing data for mysql2 | ||
* For more information, see the [`mysql2Integration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql2/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.mysqlIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const mysql2Integration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=mysql2.d.ts.map |
@@ -5,7 +5,16 @@ export declare const instrumentPostgres: ((options?: unknown) => void) & { | ||
/** | ||
* Postgres integration | ||
* Adds Sentry tracing instrumentation for the [pg](https://www.npmjs.com/package/pg) library. | ||
* | ||
* Capture tracing data for pg. | ||
* For more information, see the [`postgresIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/postgres/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.postgresIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const postgresIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=postgres.d.ts.map |
@@ -5,11 +5,29 @@ export declare const instrumentPrisma: ((options?: unknown) => void) & { | ||
/** | ||
* Prisma integration | ||
* Adds Sentry tracing instrumentation for the [prisma](https://www.npmjs.com/package/prisma) library. | ||
* | ||
* Capture tracing data for prisma. | ||
* Note: This requires to set: | ||
* previewFeatures = ["tracing"] | ||
* For the prisma client. | ||
* See https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing for more details. | ||
* For more information, see the [`prismaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/). | ||
* | ||
* @example | ||
* | ||
* Make sure `previewFeatures = ["tracing"]` is set in the prisma client generator block. See the | ||
* [prisma docs](https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing) for more details. | ||
* | ||
* ```prisma | ||
* generator client { | ||
* provider = "prisma-client-js" | ||
* previewFeatures = ["tracing"] | ||
* } | ||
* ``` | ||
* | ||
* Then you can use the integration like this: | ||
* | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.prismaIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
export declare const prismaIntegration: () => import("@sentry/types").Integration; | ||
//# sourceMappingURL=prisma.d.ts.map |
@@ -9,5 +9,15 @@ interface RedisOptions { | ||
/** | ||
* Redis integration for "ioredis" | ||
* Adds Sentry tracing instrumentation for the [redis](https://www.npmjs.com/package/redis) and | ||
* [ioredis](https://www.npmjs.com/package/ioredis) libraries. | ||
* | ||
* Capture tracing data for redis and ioredis. | ||
* For more information, see the [`redisIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/redis/). | ||
* | ||
* @example | ||
* ```javascript | ||
* const Sentry = require('@sentry/node'); | ||
* | ||
* Sentry.init({ | ||
* integrations: [Sentry.redisIntegration()], | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -14,0 +24,0 @@ export declare const redisIntegration: (options?: RedisOptions | undefined) => import("@sentry/types").Integration; |
{ | ||
"name": "@sentry/node", | ||
"version": "8.37.1", | ||
"version": "8.38.0", | ||
"description": "Sentry Node SDK using OpenTelemetry for performance instrumentation", | ||
@@ -72,3 +72,3 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"@opentelemetry/instrumentation": "^0.54.0", | ||
"@opentelemetry/instrumentation-amqplib": "^0.42.0", | ||
"@opentelemetry/instrumentation-amqplib": "^0.43.0", | ||
"@opentelemetry/instrumentation-connect": "0.40.0", | ||
@@ -85,2 +85,3 @@ "@opentelemetry/instrumentation-dataloader": "0.12.0", | ||
"@opentelemetry/instrumentation-kafkajs": "0.4.0", | ||
"@opentelemetry/instrumentation-knex": "0.41.0", | ||
"@opentelemetry/instrumentation-koa": "0.43.0", | ||
@@ -95,2 +96,3 @@ "@opentelemetry/instrumentation-lru-memoizer": "0.40.0", | ||
"@opentelemetry/instrumentation-redis-4": "0.42.0", | ||
"@opentelemetry/instrumentation-tedious": "0.15.0", | ||
"@opentelemetry/instrumentation-undici": "0.6.0", | ||
@@ -101,6 +103,6 @@ "@opentelemetry/resources": "^1.26.0", | ||
"@prisma/instrumentation": "5.19.1", | ||
"@sentry/core": "8.37.1", | ||
"@sentry/opentelemetry": "8.37.1", | ||
"@sentry/types": "8.37.1", | ||
"@sentry/utils": "8.37.1", | ||
"@sentry/core": "8.38.0", | ||
"@sentry/opentelemetry": "8.38.0", | ||
"@sentry/types": "8.38.0", | ||
"@sentry/utils": "8.38.0", | ||
"import-in-the-middle": "^1.11.2" | ||
@@ -107,0 +109,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
2906108
531
17387
37
+ Added@opentelemetry/instrumentation-amqplib@0.43.0(transitive)
+ Added@opentelemetry/instrumentation-knex@0.41.0(transitive)
+ Added@opentelemetry/instrumentation-tedious@0.15.0(transitive)
+ Added@sentry/core@8.38.0(transitive)
+ Added@sentry/opentelemetry@8.38.0(transitive)
+ Added@sentry/types@8.38.0(transitive)
+ Added@sentry/utils@8.38.0(transitive)
+ Added@types/tedious@4.0.14(transitive)
- Removed@opentelemetry/instrumentation-amqplib@0.42.0(transitive)
- Removed@sentry/core@8.37.1(transitive)
- Removed@sentry/opentelemetry@8.37.1(transitive)
- Removed@sentry/types@8.37.1(transitive)
- Removed@sentry/utils@8.37.1(transitive)
Updated@sentry/core@8.38.0
Updated@sentry/opentelemetry@8.38.0
Updated@sentry/types@8.38.0
Updated@sentry/utils@8.38.0