Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify the environment value when relaying exceptions #559

Merged
merged 1 commit into from Jan 20, 2023

Conversation

oo-bldrs
Copy link
Contributor

@oo-bldrs oo-bldrs commented Jan 20, 2023

PR to explicitly set the environment value that is used for categorization within the Sentry project.

esbuild features logic[1] that forces the value of NODE_ENV to production when one bundles using its build API. This causes all errors from all environments to be tagged as production regardless if it's actually production.

This fix uses a different environment variable (whose value is conditionally set in Netlify) to inform the Sentry SDK of the environment we are currently operating in.

1: https://esbuild.github.io/api/#platform

@netlify
Copy link

netlify bot commented Jan 20, 2023

Deploy Preview for bldrs-share ready!

Name Link
🔨 Latest commit bebf15c
🔍 Latest deploy log https://app.netlify.com/sites/bldrs-share/deploys/63cac7dcfa36e1000835f36d
😎 Deploy Preview https://deploy-preview-559--bldrs-share.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@oo-bldrs oo-bldrs merged commit 5737827 into bldrs-ai:main Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

None yet

2 participants