diff --git a/next.config.js b/next.config.js index c81e13fad..b71b8fb29 100644 --- a/next.config.js +++ b/next.config.js @@ -10,8 +10,11 @@ module.exports = withSentryConfig(withWorkbox(withBundleAnalyzer({ future: { webpack5: true, }, + env: { + SENTRY_RELEASE: process.env.npm_package_version, + }, workbox: { swSrc: 'src/serviceWorker.js', exclude: ['/manifest.json'], }, -}))); +})), { release: process.env.npm_package_version }); diff --git a/package.json b/package.json index bfa7859b3..a1589f569 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bada-frame", - "version": "0.1.0", + "version": "0.2.0", "private": true, "scripts": { "dev": "next dev", diff --git a/sentry.client.config.js b/sentry.client.config.js index d41b339ea..b96b9e310 100644 --- a/sentry.client.config.js +++ b/sentry.client.config.js @@ -4,11 +4,9 @@ const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN; Sentry.init({ dsn: SENTRY_DSN, - // We recommend adjusting this value in production, or using tracesSampler - // for finer control tracesSampleRate: 1.0, - release: 'bada-frame-v' + process.env.npm_package_version, environment: process.env.NODE_ENV, + release: process.env.SENTRY_RELEASE, attachStacktrace: true, // ... // Note: if you want to override the automatic release value, do not set a diff --git a/sentry.server.config.js b/sentry.server.config.js index e0ff637c8..fce021a3c 100644 --- a/sentry.server.config.js +++ b/sentry.server.config.js @@ -4,13 +4,7 @@ const SENTRY_DSN = process.env.SENTRY_DSN; Sentry.init({ dsn: SENTRY_DSN, - // We recommend adjusting this value in production, or using tracesSampler - // for finer control tracesSampleRate: 1.0, - release: 'bada-frame-v' + process.env.npm_package_version, environment: process.env.NODE_ENV, - // ... - // Note: if you want to override the automatic release value, do not set a - // `release` value here - use the environment variable `SENTRY_RELEASE`, so - // that it will also get attached to your source maps + release: process.env.SENTRY_RELEASE, });