Skip to content

Commit d6a99cf

Browse files
authored
Merge pull request #17 from hackclub/staging
Update sentry
2 parents cb51921 + 1db66e0 commit d6a99cf

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

src/hooks.client.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ import { handleErrorWithSentry, replayIntegration } from '@sentry/sveltekit';
22
import * as Sentry from '@sentry/sveltekit';
33

44
Sentry.init({
5-
dsn: process.env.SENTRY_DSN,
5+
dsn: 'https://[email protected]/4510461147742208',
66

77
tracesSampleRate: 1.0,
88

99
// Enable logs to be sent to Sentry
1010
enableLogs: true,
1111

12-
environment: process.env.SENTRY_ENVIRONMENT,
13-
1412
// This sets the sample rate to be 10%. You may want this to be 100% while
1513
// in development and sample at a lower rate in production
1614
replaysSessionSampleRate: 0.1,

src/instrumentation.server.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import * as Sentry from '@sentry/sveltekit';
22

33
Sentry.init({
4-
dsn: process.env.SENTRY_DSN,
4+
dsn: 'https://[email protected]/4510461147742208',
5+
6+
integrations: [Sentry.consoleLoggingIntegration({ levels: ['log', 'warn', 'error'] })],
57

68
tracesSampleRate: 1.0,
79

@@ -13,3 +15,5 @@ Sentry.init({
1315
// uncomment the line below to enable Spotlight (https://spotlightjs.com)
1416
// spotlight: import.meta.env.DEV,
1517
});
18+
19+
export const handleError = Sentry.handleErrorWithSentry();

src/routes/auth/callback/+server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ export async function GET(event) {
9797
const slackProfileResJSON = await slackProfileRes.json();
9898

9999
if (!slackProfileResJSON.ok) {
100+
console.error('Failed to fetch user profile');
101+
100102
const redirectURL = new URL(`${url.protocol}//${url.host}/auth/failed`);
101103
return redirect(302, redirectURL);
102104
}
@@ -121,6 +123,8 @@ export async function GET(event) {
121123
const channelMembersResJSON = await channelMembersRes.json();
122124

123125
if (!channelMembersResJSON.ok) {
126+
console.error('Failed to fetch channel members');
127+
124128
const redirectURL = new URL(`${url.protocol}//${url.host}/auth/failed`);
125129
return redirect(302, redirectURL);
126130
}

vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ export default defineConfig({
88
sentrySvelteKit({
99
sourceMapsUploadOptions: {
1010
org: 'hack-club',
11-
project: 'construct'
11+
project: 'construct',
12+
authToken: process.env.SENTRY_AUTH_TOKEN
1213
}
1314
}),
1415
tailwindcss(),

0 commit comments

Comments
 (0)