The monitoring package has been significantly refactored to improve the granularity of error capture. Code from the 'capture-exception.ts' files in different locations have been deleted and replaced by a more unified approach in the 'use-baselime.ts' and 'use-sentry.ts' hooks. The README documentation has also been updated to reflect these changes and provide additional information about error monitoring setup and usage.
35 lines
843 B
Markdown
35 lines
843 B
Markdown
# Sentry Monitoring / @kit/sentry
|
|
|
|
Please set the following environment variable:
|
|
|
|
```
|
|
NEXT_PUBLIC_MONITORING_PROVIDER=sentry
|
|
NEXT_PUBLIC_SENTRY_DSN=your_dsn
|
|
```
|
|
|
|
Create the following file at the root of your project:
|
|
|
|
```tsx title="sentry.client.config.ts"
|
|
export * from '@kit/sentry/config/client';
|
|
```
|
|
|
|
Create the following file at the root of your project:
|
|
|
|
```tsx title="sentry.server.config.ts"
|
|
export * from '@kit/sentry/config/server';
|
|
```
|
|
|
|
Create the following file at the root of your project:
|
|
|
|
```tsx title="sentry.edge.config.ts"
|
|
export * from '@kit/sentry/config/edge';
|
|
```
|
|
|
|
Finally, update the Next.js configuration in your `next.config.js` file:
|
|
|
|
```tsx title="next.config.mjs"
|
|
import { withSentryConfig } from "@sentry/nextjs";
|
|
|
|
// wrap your Next.js configuration with the Sentry configuration
|
|
withSentryConfig(nextConfig);
|
|
``` |