Skip to content

Commit 5517ccd

Browse files
committed
feat: Add Sentry profiling integration and update dependencies
1 parent 13972a2 commit 5517ccd

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

apps/api/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"@nestjs/swagger": "^8.0.7",
3333
"@nestjs/terminus": "^11.0.0",
3434
"@sentry/nestjs": "^10.25.0",
35+
"@sentry/profiling-node": "^10.25.0",
3536
"ajv": "^8.16.0",
3637
"ajv-errors": "^3.0.0",
3738
"ajv-formats": "^3.0.1",

apps/api/src/instrument.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Logger } from '@nestjs/common'
22
import * as Sentry from '@sentry/nestjs'
3+
import { nodeProfilingIntegration } from '@sentry/profiling-node'
34

45
if (!process.env.SESAME_SENTRY_DSN) {
56
Logger.warn('SENTRY DSN not provided, Sentry is disabled', 'SentryInit')
@@ -10,9 +11,13 @@ if (!process.env.SESAME_SENTRY_DSN) {
1011

1112
sendDefaultPii: true,
1213
tracesSampleRate: 1.0,
14+
profilesSampleRate: 1.0,
1315
includeLocalVariables: true,
1416

1517
integrations: [
18+
nodeProfilingIntegration(),
19+
20+
1621
Sentry.mongooseIntegration(),
1722
Sentry.consoleIntegration(),
1823
Sentry.httpIntegration(),

yarn.lock

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3947,6 +3947,14 @@
39473947
domhandler "^5.0.3"
39483948
selderee "^0.11.0"
39493949

3950+
"@sentry-internal/node-cpu-profiler@^2.2.0":
3951+
version "2.2.0"
3952+
resolved "https://registry.yarnpkg.com/@sentry-internal/node-cpu-profiler/-/node-cpu-profiler-2.2.0.tgz#0640d4aebb4d36031658ccff83dc22b76f437ede"
3953+
integrity sha512-oLHVYurqZfADPh5hvmQYS5qx8t0UZzT2u6+/68VXsFruQEOnYJTODKgU3BVLmemRs3WE6kCJjPeFdHVYOQGSzQ==
3954+
dependencies:
3955+
detect-libc "^2.0.3"
3956+
node-abi "^3.73.0"
3957+
39503958
"@sentry/core@10.25.0":
39513959
version "10.25.0"
39523960
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-10.25.0.tgz#99e5253a1a5e52f7e8972c89dcf3e710700e4059"
@@ -4023,6 +4031,15 @@
40234031
dependencies:
40244032
"@sentry/core" "10.25.0"
40254033

4034+
"@sentry/profiling-node@^10.25.0":
4035+
version "10.25.0"
4036+
resolved "https://registry.yarnpkg.com/@sentry/profiling-node/-/profiling-node-10.25.0.tgz#bf8c4d2e5fe41092965a5793b0d04690fbd374db"
4037+
integrity sha512-rv/93gPEGTm20+bL7qKCCakkRUmYvyXR27393z0F+uCcMzd0NtZpGrFzZ5Wbbl6X4k2RA4mvadoSFfVil+AC3g==
4038+
dependencies:
4039+
"@sentry-internal/node-cpu-profiler" "^2.2.0"
4040+
"@sentry/core" "10.25.0"
4041+
"@sentry/node" "10.25.0"
4042+
40264043
"@sinclair/typebox@^0.27.8":
40274044
version "0.27.8"
40284045
resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz"
@@ -7636,7 +7653,7 @@ detect-libc@^1.0.3:
76367653
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
76377654
integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==
76387655

7639-
detect-libc@^2.0.0, detect-libc@^2.0.1:
7656+
detect-libc@^2.0.0, detect-libc@^2.0.1, detect-libc@^2.0.3:
76407657
version "2.1.2"
76417658
resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz"
76427659
integrity sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==
@@ -11916,6 +11933,13 @@ no-case@^2.2.0:
1191611933
dependencies:
1191711934
lower-case "^1.1.1"
1191811935

11936+
node-abi@^3.73.0:
11937+
version "3.81.0"
11938+
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.81.0.tgz#176a80904b2d382f5e5d1abcfb44d681cf9105c5"
11939+
integrity sha512-I+SHs7vmUV9ooMDHVzFfUxFQRWeiBCGbI02+XB503WBS8RCDJl4vXSoAXzcnSWpzgItirp2EraDq7jQ2c7CIiA==
11940+
dependencies:
11941+
semver "^7.3.5"
11942+
1191911943
node-abort-controller@^3.0.1, node-abort-controller@^3.1.1:
1192011944
version "3.1.1"
1192111945
resolved "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz"

0 commit comments

Comments
 (0)