Skip to content

Commit

Permalink
Merge pull request #39 from awell-health/AST-3970-sentry-error-fix
Browse files Browse the repository at this point in the history
(fix) AST-3970: Fix sentry initialisation
  • Loading branch information
mohsinht authored Aug 18, 2022
2 parents 2a2571a + e4ac3bd commit d66d9dc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
NEXT_PUBLIC_URL_ORCHESTRATION_API_WS=wss://api.development.awellhealth.com/orchestration/subscriptions
NEXT_PUBLIC_URL_ORCHESTRATION_API=https://api.development.awellhealth.com/orchestration/graphql
NEXT_PUBLIC_URL_ORCHESTRATION_API=https://api.development.awellhealth.com/orchestration/graphql
NEXT_PUBLIC_SENTRY_DSN=https://[email protected]/6637498
9 changes: 1 addition & 8 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ const nextConfig = {
}

const sentryWebpackPluginOptions = {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
// release, url, org, project, authToken, configFile, stripPrefix,
// urlPrefix, include, ignore

silent: true, // Suppresses all logs
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
}
Expand All @@ -27,4 +20,4 @@ const nextPlugins = [
(nextConfig) => withSentryConfig(nextConfig, sentryWebpackPluginOptions),
]

module.exports = withPlugins([withImages], nextConfig)
module.exports = withPlugins(nextPlugins, nextConfig)
6 changes: 2 additions & 4 deletions sentry.client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ import * as Sentry from '@sentry/nextjs'
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN

Sentry.init({
dsn:
SENTRY_DSN ||
'https://[email protected]/6637498',
dsn: SENTRY_DSN,
// Adjust this value in production, or use tracesSampler for greater control
// TODO in future use tracesSampler
tracesSampleRate: 0.1,
tracesSampleRate: 0.5,
// ...
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
Expand Down
6 changes: 2 additions & 4 deletions sentry.server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ import * as Sentry from '@sentry/nextjs'
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN

Sentry.init({
dsn:
SENTRY_DSN ||
'https://[email protected]/6637498',
dsn: SENTRY_DSN,
// Adjust this value in production, or use tracesSampler for greater control
// TODO use tracesSampler
tracesSampleRate: 0.1,
tracesSampleRate: 0.5,
// ...
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
Expand Down

1 comment on commit d66d9dc

@vercel
Copy link

@vercel vercel bot commented on d66d9dc Aug 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.