-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create instrument.ts file refactor sentry configuration
- Loading branch information
Showing
4 changed files
with
65 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as Sentry from '@sentry/node' | ||
import config from './config' | ||
import { ProfilingIntegration } from '@sentry/profiling-node' | ||
|
||
Sentry.init({ | ||
dsn: config.sentry.dsn, | ||
release: config.commitHash, | ||
integrations: [ | ||
new ProfilingIntegration() | ||
], | ||
tracesSampleRate: 0.1, // Performance Monitoring. Should use 0.1 in production | ||
profilesSampleRate: 1.0 // Set sampling rate for profiling - this is relative to tracesSampleRate | ||
}) | ||
|
||
Sentry.setTags({ botName: config.botName }) | ||
|
||
export { Sentry } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters