Skip to content

Commit

Permalink
Merge pull request #334 from scientist-softserv/21-sentry-auth-token
Browse files Browse the repository at this point in the history
21 sentry auth token
  • Loading branch information
alishaevn authored Dec 7, 2023
2 parents 79ea124 + 2e1330c commit 0002bf7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
9 changes: 4 additions & 5 deletions .env.development.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ CLIENT_SECRET=
NEXT_PUBLIC_TOKEN=

# uncomment the “SENTRY” prefixed variables below if you are using sentry and need to catch errors in local dev
# SENTRY_DSN=
# NEXT_PUBLIC_SENTRY_DSN=
# SENTRY_DSN=ref: https://docs.sentry.io/product/sentry-basics/concepts/dsn-explainer/#where-to-find-your-dsn
# SENTRY_URL=https://sentry.io/
# SENTRY_ORG=
# SENTRY_PROJECT=
# SENTRY_AUTH_TOKEN=
# SENTRY_ORG= ref: https://github.com/getsentry/sentry-webpack-plugin#options (org)
# SENTRY_PROJECT= ref: https://github.com/getsentry/sentry-webpack-plugin#options (project)
# SENTRY_AUTH_TOKEN= ref: https://github.com/getsentry/sentry-webpack-plugin#options (authToken)
7 changes: 3 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
// This guard clause allows the app to still build in the event another exception handler will be used,
// or the sentry project hasn't been set up yet
if (!process.env.SENTRY_DSN && !process.env.NEXT_PUBLIC_SENTRY_DSN) return
if (!process.env.SENTRY_DSN) return

// This file sets a custom webpack configuration to use your Next.js app
// with Sentry.
// https://nextjs.org/docs/api-reference/next.config.js/introduction
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
const { withSentryConfig } = require('@sentry/nextjs')

/** @type {import('next').NextConfig} */
const moduleExports = {
const nextConfig = {
output: 'standalone',
reactStrictMode: true,
swcMinify: true,
Expand Down Expand Up @@ -44,6 +43,6 @@ const sentryWebpackPluginOptions = {
// Make sure adding Sentry options is the last code to run before exporting, to
// ensure that your source maps include changes from all other Webpack plugins
module.exports = withSentryConfig(
moduleExports,
nextConfig,
sentryWebpackPluginOptions
)
2 changes: 1 addition & 1 deletion sentry.client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import * as Sentry from '@sentry/nextjs'

Sentry.init({
dsn: process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN,
dsn: 'https://[email protected]/4504810271408128',
// Adjust this value in production, or use tracesSampler for greater control
// ref: https://develop.sentry.dev/sdk/performance/#sdk-configuration
tracesSampleRate: 1.0,
Expand Down
2 changes: 1 addition & 1 deletion sentry.edge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import * as Sentry from '@sentry/nextjs'

Sentry.init({
dsn: process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN,
dsn: 'https://[email protected]/4504810271408128',
// Adjust this value in production, or use tracesSampler for greater control
// ref: https://develop.sentry.dev/sdk/performance/#sdk-configuration
tracesSampleRate: 1.0,
Expand Down
2 changes: 1 addition & 1 deletion sentry.server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import * as Sentry from '@sentry/nextjs'

Sentry.init({
dsn: process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN,
dsn: 'https://[email protected]/4504810271408128',
// Adjust this value in production, or use tracesSampler for greater control
// ref: https://develop.sentry.dev/sdk/performance/#sdk-configuration
tracesSampleRate: 1.0,
Expand Down

0 comments on commit 0002bf7

Please sign in to comment.