-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(gatsby): Upload source maps automatically when sentry-cli is configured #4109
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
447de7c
feat(gatsby): Upload source maps automatically when sentry-cli is con…
iker-barriocanal 1eb7455
fix linting
iker-barriocanal 9c5ab34
Add comments of included and ignored files
iker-barriocanal 815ea88
Merge branch 'master' into iker/ref/gatsby-webpack-plugin
iker-barriocanal 1684bdd
Merge branch 'master' into iker/ref/gatsby-webpack-plugin
iker-barriocanal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2832,13 +2832,32 @@ | |
progress "^2.0.3" | ||
proxy-from-env "^1.1.0" | ||
|
||
"@sentry/cli@^1.70.1": | ||
version "1.70.1" | ||
resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.70.1.tgz#908517b699c0714eff88bedb68c6ea72e94945e8" | ||
integrity sha512-pab3nU3rNsq1HKKmJP2ITDl5cGi+QbQ5eLX6ELaeAbN2eAzfndHu2rTqlnjJAKcYQg6l9gFBn8vvY2xAeRJb6Q== | ||
dependencies: | ||
https-proxy-agent "^5.0.0" | ||
mkdirp "^0.5.5" | ||
node-fetch "^2.6.0" | ||
npmlog "^4.1.2" | ||
progress "^2.0.3" | ||
proxy-from-env "^1.1.0" | ||
|
||
"@sentry/[email protected]": | ||
version "1.18.1" | ||
resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-1.18.1.tgz#0fa24297043305057111d85a7154d4b8b24d43a6" | ||
integrity sha512-maEnHC0nxRnVgAz0qvKvhTGy+SxneR8MFjpgNMvh9CyAB6GEM9VQI1hzxTcAd7Qk90qGW8W4eUmB+ZX8nMrM1w== | ||
dependencies: | ||
"@sentry/cli" "^1.68.0" | ||
|
||
"@sentry/[email protected]": | ||
version "1.18.3" | ||
resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-1.18.3.tgz#1cd3401f84f561b4a451dac5f42465ee5102f5d6" | ||
integrity sha512-Qk3Jevislc5DZK0X/WwRVcOtO7iatnWARsEgTV/TuXvDN+fUDDpD/2MytAWAbpLaLy3xEB/cXGeLsbv6d1XNkQ== | ||
dependencies: | ||
"@sentry/cli" "^1.70.1" | ||
|
||
"@simple-dom/interface@^1.4.0": | ||
version "1.4.0" | ||
resolved "https://registry.yarnpkg.com/@simple-dom/interface/-/interface-1.4.0.tgz#e8feea579232017f89b0138e2726facda6fbb71f" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this still log the error if we do an early return?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iker-barriocanal Feel like we need a way to tell users about misconfigured sentry-cli without it being blocking. Can we take advantage of the
debug
flag somehow?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean exactly? Telling users when they haven't correctly configured sentry-cli? If this is the case:
debug
will generate too much noise, and they can always customize this by settingSENTRY_LOG_LEVEL
env var, see configuration values.Considering sentry-cli has proper docs, failing doesn't have major consequences (not uploading source maps for a misconfiguration, which they can read the docs of, or try to have their own config, can retry as many times as they wish at no cost (not a production issue)...), and we can update Gatsby docs if the process is clear enough, I don't think it's worth it to provide additional checks. I'd rather remove this UX improvement over adding it and potentially provide a worse UX.
Note that I might have misunderstood what you meant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanted to avoid situations where someone forgets to set an org slug, and doesn't understand why source maps uploading isn't working for gatsby (since the error is being swallowed).
I think we should add to docs how user's can define their own custom config with the webpack plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good point, but I don't think it's worth covering it in this context. As for the docs, we link to the Sentry Webpack docs here; although these sections could be improved, is there anything specific you have in mind?