feat(plugin-sentry): update plugin to 3.0 (#8613)

Updates the plugin to 3.0

Test:
```sh
NEXT_PUBLIC_SENTRY_DSN=<DSN here> pnpm dev plugin-sentry
```

Example:
```ts
sentryPlugin({
  options: {
    captureErrors: [400, 403],
    context: ({ defaultContext, req }) => {
      return {
        ...defaultContext,
        tags: {
          locale: req.locale,
        },
      }
    },
    debug: true,
  },
  Sentry,
})
```
This commit is contained in:
Sasha
2024-10-09 21:26:58 +03:00
committed by GitHub
parent 769c94b4fd
commit 0b2a7a3606
28 changed files with 1867 additions and 450 deletions

View File

@@ -56,6 +56,7 @@
"@payloadcms/storage-vercel-blob": "workspace:*",
"@payloadcms/translations": "workspace:*",
"@payloadcms/ui": "workspace:*",
"@sentry/nextjs": "^8.33.1",
"@sentry/react": "^7.77.0",
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",