Skip to content

Commit

Permalink
Add sentry profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
pastelsky committed Jan 5, 2024
1 parent 1f2c49a commit bf97448
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@immobiliarelabs/fastify-sentry": "^8.0.0",
"@monaco-editor/react": "^4.6.0",
"@sentry/node": "^7.91.0",
"@sentry/profiling-node": "^1.3.2",
"@swc/core": "^1.3.101",
"@swc/helpers": "^0.5.3",
"@tanstack/react-query": "^4.36.1",
Expand Down
3 changes: 3 additions & 0 deletions server/init-sentry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const Sentry = require("@sentry/node");
const { ProfilingIntegration } = require("@sentry/profiling-node");
const path = require("path");

require("dotenv").config({
Expand All @@ -18,7 +19,9 @@ if (process.env.SENTRY_DSN) {
new Sentry.Integrations.LocalVariables(),
new Sentry.Integrations.Undici(),
new Sentry.Integrations.RequestData(),
new ProfilingIntegration(),
],
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
});
}
25 changes: 25 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1403,6 +1403,21 @@ __metadata:
languageName: node
linkType: hard

"@sentry/profiling-node@npm:^1.3.2":
version: 1.3.2
resolution: "@sentry/profiling-node@npm:1.3.2"
dependencies:
detect-libc: "npm:^2.0.2"
node-abi: "npm:^3.52.0"
node-gyp: "npm:latest"
peerDependencies:
"@sentry/node": ^7.44.1
bin:
sentry-prune-profiler-binaries: scripts/prune-profiler-binaries.mjs
checksum: 958840e0af1ceb161695fc8df700147df9b693f169eaaf9d34a00fe90aa3eae17834c369d9a1b76f49819522dca4e4cadc5f80deaab43e448d2c2e1858082c62
languageName: node
linkType: hard

"@sentry/tracing@npm:^7.60.0":
version: 7.91.0
resolution: "@sentry/tracing@npm:7.91.0"
Expand Down Expand Up @@ -5561,6 +5576,15 @@ __metadata:
languageName: node
linkType: hard

"node-abi@npm:^3.52.0":
version: 3.54.0
resolution: "node-abi@npm:3.54.0"
dependencies:
semver: "npm:^7.3.5"
checksum: b8cf226033172b68bb8dccf7d19bd654238189968e4af98952c8327155d11c1164fcc49f154b61f8fcdc4e07d4ba91cab5d8a3c6b9719bebe879e169bdce7b22
languageName: node
linkType: hard

"node-abort-controller@npm:^3.1.1":
version: 3.1.1
resolution: "node-abort-controller@npm:3.1.1"
Expand Down Expand Up @@ -7932,6 +7956,7 @@ __metadata:
"@immobiliarelabs/fastify-sentry": "npm:^8.0.0"
"@monaco-editor/react": "npm:^4.6.0"
"@sentry/node": "npm:^7.91.0"
"@sentry/profiling-node": "npm:^1.3.2"
"@swc/core": "npm:^1.3.101"
"@swc/helpers": "npm:^0.5.3"
"@tanstack/react-query": "npm:^4.36.1"
Expand Down

0 comments on commit bf97448

Please sign in to comment.