Skip to content

Commit

Permalink
Fix Sentry instrumentation server-side
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Jan 8, 2025
1 parent c1e27cc commit 2694d82
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 28 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-otters-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'gitbook': patch
---

Fix Sentry instrumentation server-side
8 changes: 1 addition & 7 deletions packages/gitbook/instrumentation.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import * as Sentry from '@sentry/nextjs';

export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
await import('./sentry.server.config');
}

if (process.env.NEXT_RUNTIME === 'edge') {
await import('./sentry.edge.config');
}
await import('./sentry.edge.config');
}

export const onRequestError = Sentry.captureRequestError;
21 changes: 0 additions & 21 deletions packages/gitbook/sentry.server.config.ts

This file was deleted.

0 comments on commit 2694d82

Please sign in to comment.