@laboratory-one/api-components 0.0.35 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentry.service.d.ts","sourceRoot":"","sources":["../../../src/services/sentry.service.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,GAAI,aAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"sentry.service.d.ts","sourceRoot":"","sources":["../../../src/services/sentry.service.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,GAAI,aAAa,MAAM,SAuB7C,CAAC"}
|
|
@@ -5,6 +5,10 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const Sentry = tslib_1.__importStar(require("@sentry/node"));
|
|
6
6
|
const profiling_node_1 = require("@sentry/profiling-node");
|
|
7
7
|
const initSentry = (projectName) => {
|
|
8
|
+
if (!process.env.SENTRY_DSN) {
|
|
9
|
+
console.log('Sentry disabled: SENTRY_DSN not set');
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
8
12
|
Sentry.init({
|
|
9
13
|
dsn: process.env.SENTRY_DSN,
|
|
10
14
|
environment: process.env.ENVIRONMENT,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentry.service.js","sourceRoot":"","sources":["../../../src/services/sentry.service.ts"],"names":[],"mappings":";;;;AAAA,6DAAuC;AACvC,2DAAkE;AAE3D,MAAM,UAAU,GAAG,CAAC,WAAmB,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"sentry.service.js","sourceRoot":"","sources":["../../../src/services/sentry.service.ts"],"names":[],"mappings":";;;;AAAA,6DAAuC;AACvC,2DAAkE;AAE3D,MAAM,UAAU,GAAG,CAAC,WAAmB,EAAE,EAAE;IAChD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;QAC5B,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACnD,OAAO;IACT,CAAC;IAGD,MAAM,CAAC,IAAI,CAAC;QACV,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU;QAC3B,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW;QACpC,OAAO,EAAE,GAAG,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE;QAC5D,YAAY,EAAE;YAEZ,IAAA,yCAAwB,GAAE;YAC1B,MAAM,CAAC,cAAc,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;SACnD;QAGD,gBAAgB,EAAE,GAAG;QAGrB,kBAAkB,EAAE,GAAG;KACxB,CAAC,CAAC;AACL,CAAC,CAAC;AAvBW,QAAA,UAAU,cAuBrB","sourcesContent":["import * as Sentry from '@sentry/node';\nimport { nodeProfilingIntegration } from '@sentry/profiling-node';\n\nexport const initSentry = (projectName: string) => {\n if (!process.env.SENTRY_DSN) {\n console.log('Sentry disabled: SENTRY_DSN not set');\n return;\n }\n\n // Ensure to call this before requiring any other modules!\n Sentry.init({\n dsn: process.env.SENTRY_DSN,\n environment: process.env.ENVIRONMENT,\n release: `${projectName}@${process.env.npm_package_version}`,\n integrations: [\n // Add our Profiling integration\n nodeProfilingIntegration(),\n Sentry.anrIntegration({ captureStackTrace: true }),\n ],\n // Add Tracing by setting tracesSampleRate\n // We recommend adjusting this value in production\n tracesSampleRate: 1.0,\n // Set sampling rate for profiling\n // This is relative to tracesSampleRate\n profilesSampleRate: 1.0,\n });\n};\n"]}
|