Add Sentry portal integration#437
Conversation
ahd44
left a comment
There was a problem hiding this comment.
I have not tested this (if you want to provide the config details I'm happy to do so) but the changes look good to me, assuming you've tested it.
ahd44
left a comment
There was a problem hiding this comment.
Seems to be working well now, was able to generate a test error for Sentry using config provided by Jonathan. The building and source map publishing is working well also.
A small concern would be to ensure that assembly wasn't used without actually deploying, otherwise the source maps can end up wrong. This would also happen by necessity when deploying to, e.g., staging -- a cpDeploy to staging would end up trigerring the source map build/publish. I don't know a great way to avoid this, but ideally we would only send new source maps specifically when cpDeploy to production was used.
|
The checks fail because I haven't published the plugin update yet. I'm waiting for ICOS-Carbon-Portal/infrastructure#78 to be approved to do that. |
ahd44
left a comment
There was a problem hiding this comment.
Looks good to me. Would be nice to test it after approving/deploying the infrastructure PR
We set the `cp.deploy.sentryUpload` property to true when deploying to production. This allows us to only upload source maps to Sentry when using the `cpDeploy to production` command. You can see how this is used in ICOS-Carbon-Portal/data#437
We would keep the current DSN for the backend only and have a separate DSN for the data portal. Sentry seems to recommend to use separate projects/DSN for different backend/frontend applications.
In this implementation, we would provide the data portal DSN from the
application.conffile like we do for the backend one.This is linked to our deploy plugin in ICOS-Carbon-Portal/infrastructure#78