Skip to content

Add Sentry portal integration#437

Merged
jonathanthiry merged 7 commits into
masterfrom
sentry-frontend
May 12, 2026
Merged

Add Sentry portal integration#437
jonathanthiry merged 7 commits into
masterfrom
sentry-frontend

Conversation

@jonathanthiry
Copy link
Copy Markdown
Contributor

@jonathanthiry jonathanthiry commented Apr 23, 2026

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.conf file like we do for the backend one.

This is linked to our deploy plugin in ICOS-Carbon-Portal/infrastructure#78

@jonathanthiry jonathanthiry requested a review from ahd44 April 23, 2026 09:29
Copy link
Copy Markdown
Member

@ahd44 ahd44 left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/main/js/portal/main/main.tsx Outdated
@jonathanthiry jonathanthiry requested a review from ahd44 April 29, 2026 10:58
Copy link
Copy Markdown
Member

@ahd44 ahd44 left a comment

Choose a reason for hiding this comment

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

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.

@jonathanthiry
Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Member

@ahd44 ahd44 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Would be nice to test it after approving/deploying the infrastructure PR

jonathanthiry added a commit to ICOS-Carbon-Portal/infrastructure that referenced this pull request May 12, 2026
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
@jonathanthiry jonathanthiry merged commit 15a1243 into master May 12, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants