Skip to content

Commit 14bd474

Browse files
committed
fix: Get Sentry working properly again
1 parent 5ce4005 commit 14bd474

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed

.github/workflows/deploy.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ jobs:
1414
run: |
1515
echo NEXT_PUBLIC_API_URL=${{ vars.NEXT_PUBLIC_API_URL }} >> $GITHUB_ENV
1616
echo NEXT_PUBLIC_MAPBOX_APIK=${{ vars.NEXT_PUBLIC_MAPBOX_APIK }} >> $GITHUB_ENV
17-
echo SENTRY_AUTH_TOKEN=${{ vars.SENTRY_AUTH_TOKEN }} >> $GITHUB_ENV
18-
echo SENTRY_DSN=${{ vars.SENTRY_DSN }} >> $GITHUB_ENV
19-
echo VATSIM_CONNECT_CLIENT_ID=${{ vars.VATSIM_CONNECT_CLIENT_ID }} >> $GITHUB_ENV
17+
echo NEXT_PUBLIC_SENTRY_DSN=${{ vars.NEXT_PUBLIC_SENTRY_DSN }} >> $GITHUB_ENV
18+
echo SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} >> $GITHUB_ENV
2019
2120
- name: Configure Node 20
2221
uses: actions/setup-node@v4

next.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ const sentryOptions = {
2828
org: 'zhuartcc',
2929
project: 'zhu-frontend',
3030
authToken: process.env.SENTRY_AUTH_TOKEN,
31-
silent: true,
32-
hideSourceMaps: true,
31+
silent: !process.env.CI,
3332
disableLogger: true,
33+
widenClientFileUpload: true,
3434
};
3535

3636
export default withSentryConfig(nextConfig, sentryOptions);

src/instrumentation-client.ts

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

33
Sentry.init({
4-
dsn: process.env.SENTRY_DSN,
4+
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
55
enabled: process.env.NODE_ENV === 'production',
66
sendDefaultPii: true,
77
tracesSampleRate: 1.0,

src/instrumentation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import * as Sentry from '@sentry/nextjs';
22

33
export async function register() {
44
if (process.env.NEXT_RUNTIME === 'nodejs') {
5-
await import('./sentry.server.config');
5+
await import('../sentry.server.config');
66
}
77

88
if (process.env.NEXT_RUNTIME === 'edge') {
9-
await import('./sentry.edge.config');
9+
await import('../sentry.edge.config');
1010
}
1111
}
1212

0 commit comments

Comments
 (0)