Skip to content

Commit

Permalink
Add preliminary Sentry setup
Browse files Browse the repository at this point in the history
  • Loading branch information
backspace committed Mar 8, 2024
1 parent 196cdb8 commit 0af6959
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/realm-server/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@ import { RunnerOptionsManager } from '@cardstack/runtime-common/search-index';
import { readFileSync } from 'fs-extra';
import { shimExternals } from './lib/externals';
import { type RealmPermissions as RealmPermissionsInterface } from '@cardstack/runtime-common/realm';
import * as Sentry from '@sentry/node';

import fs from 'fs';

if (process.env.REALM_SENTRY_DSN) {
Sentry.init({
dsn: process.env.REALM_SENTRY_DSN,
environment: process.env.REALM_SENTRY_ENVIRONMENT || 'development',
});
}

const REALM_SECRET_SEED = process.env.REALM_SECRET_SEED;
if (!REALM_SECRET_SEED) {
console.error(
Expand Down
3 changes: 3 additions & 0 deletions packages/realm-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,8 @@
},
"volta": {
"extends": "../../package.json"
},
"dependencies": {
"@sentry/node": "^7.105.0"
}
}
4 changes: 4 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit 0af6959

Please sign in to comment.