-
Notifications
You must be signed in to change notification settings - Fork 3
fix(sentry): sentry information now coming from bff #269
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
Conversation
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.
Pull Request Overview
This PR migrates Sentry configuration from build-time environment variables to runtime server configuration, enabling proper Sentry functionality in production builds. It also modernizes the development tooling by replacing ts-node with tsx.
- Updates Sentry configuration to fetch from BFF endpoint instead of build-time variables
- Replaces ts-node with tsx for improved development setup compatibility
- Adjusts Content Security Policy to support Sentry's runtime requirements
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
vite.config.js | Adds telemetry disable flag and ESNext target for top-level await support |
src/mount.ts | Implements runtime Sentry config fetching from /sentry endpoint |
server/config/env.ts | Renames environment variables from VITE_* to FRONTEND_* prefix |
server.ts | Adds /sentry endpoint and updates CSP to allow Sentry scripts |
package.json | Replaces ts-node with tsx and restructures build scripts |
.env.template | Updates environment variable names to match new naming convention |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Nice! Good catch! 👍
In server.ts
, there is still one usage of the old VITE_SENTRY_ENVIRONMENT
variable. Apart from that: great! ✨
Do we need a separate issue to track the changes to the ui-environments repo?
} | ||
|
||
// Validate sentryConfig format | ||
function isValidSentryConfig(config: unknown): config is SentryConfig { |
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.
Nice 👍
What this PR does / why we need it:
Fixes the sentry implementation to work again in production builds.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Introduces tsx instead of ts-node which is working with the new configuration in dev setup.