@sentry/nextjs
内部で、@sentry/reactと@sentry/nodeを使っている
docs
参考
Next.jsにSentryを導入した際の課題と解決策について|食べログ フロントエンドエンジニアブログ|note
#WIP
https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/?original_referrer=https%3A%2F%2Fwww.google.com%2F
next.config.jsの中で行う設定
docs
code:next.config.js
const { withSentryConfig } = require("@sentry/nextjs");
const config = {
sentry: {...},
...
};
const sentryWebpackPluginOptions = {
silent: true,
...
};
module.exports = withSentryConfig(config, sentryWebpackPluginOptions);
2箇所指定する場所がある
後者の方の設定が↓
https://github.com/getsentry/sentry-webpack-plugin#options
silent
https://note.com/tabelog_frontend/n/n7f6822ae0c0d#:~:text=と不便です%E3%80%82-,解決策③,-silentオプションを
wizardで生成されるやつ
next.config.wizardcopy.js
?
sentry.client.config.js
?
sentry.server.config.js
?
sentry.properties
sentry-cli用の設定?
これがないとnext buildに失敗する
CI上にも設定しないといけないのか
自動でsource mapをuploadするときに使う
.sentryclirc
sentry-cliとかに使うauthなどのシークレットキーを保持する
.gitignoreの対象にする
sentry-cliを使うときに自動で読み込まれるっぽい
https://docs.sentry.io/product/cli/configuration/
authってどこで確認できる?
projectごとに異なる?
https://sentry.io/settings/account/api/auth-tokens/
project全体で同じっぽいな
_error.js
?
docsを読む
https://docs.sentry.io/platforms/javascript/guides/nextjs/
SENTRY FOR NEXT.JS
Getting Started
Manual Setup
Configuration
Usage
Source Maps
Troubleshooting
PERFORMANCE MONITORING
Set Up
Instrumentation
Connect Services
Troubleshooting
ENRICHING EVENTS
Add Context
Identify Users
Customize Tags
Attachments
Breadcrumbs
User Feedback
Scopes and Hubs
Event Processors
DATA MANAGEMENT
Scrubbing Sensitive Data
PRODUCT GUIDES
Sentry Basics
Issues
Projects
Alerts
Performance Monitoring
Releases
Discover Queries
Dashboards
Stats
User Feedback
Security Policy Reporting
Data Management
Account Management
Relay
Command Line Interface
Security & Legal
Integrations