Skip to content

Commit

Permalink
Adding Sentry profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
nadeesha committed Jan 12, 2024
1 parent 87b119b commit de3bcfa
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 27 deletions.
2 changes: 2 additions & 0 deletions control-plane/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"@babel/preset-typescript": "^7.22.11",
"@fastify/cors": "^8.5.0",
"@influxdata/influxdb-client": "^1.33.2",
"@sentry/node": "^7.93.0",
"@sentry/profiling-node": "^1.3.5",
"@ts-rest/core": "^3.27.0",
"@ts-rest/fastify": "^3.27.0",
"@types/jest": "^29.5.4",
Expand Down
11 changes: 11 additions & 0 deletions control-plane/src/utilities/profiling.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as Sentry from "@sentry/node";
import { ProfilingIntegration } from "@sentry/profiling-node";

if (process.env.SENTRY_DSN) {
Sentry.init({
dsn: "https://9d882048fda0adddf4e96db16b1fef0f@o4506271522881536.ingest.sentry.io/4506271523012608",
integrations: [new ProfilingIntegration()],
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
});
}
176 changes: 149 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit de3bcfa

Please sign in to comment.