-
Notifications
You must be signed in to change notification settings - Fork 110
H-5764: Setup Sentry UserFeedback + ErrorTracker #8241
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
base: cf/h-5691-visualiser-for-global-state
Are you sure you want to change the base?
H-5764: Setup Sentry UserFeedback + ErrorTracker #8241
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
…ider to a new path and enhance error handling callbacks
…e; improve Sentry integration by injecting SENTRY_DSN directly into the application.
This will need a better solution soon.
PR SummaryIntroduces Sentry-based error tracking and feedback to the demo site with minimal coupling to the library.
Written by Cursor Bugbot for commit 7a07628. This will update automatically on new commits. Configure here. |
| "@hashintel/ds-helpers": "0.0.1-b", | ||
| "@local/eslint": "0.0.0-private", | ||
| "@pandacss/dev": "1.4.3", | ||
| "@sentry/react": "10.22.0", |
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.
Move '@sentry/react': '10.22.0' from devDependencies to dependencies since it's being used at runtime in the demo-site files. Dependencies used at runtime should not be in devDependencies.
Spotted by Graphite Agent (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
🤖 Augment PR SummarySummary: This PR wires Sentry error tracking + user feedback into the Petrinaut demo site. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
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.
| @@ -1,12 +1,30 @@ | |||
| import "./sentry/instrument.js"; | |||
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.
| "./*.ts", | ||
| "./*.d.ts", | ||
| "main/app.tsx", | ||
| "sentry/init-sentry.ts" |
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.
| Sentry.withScope((scope) => { | ||
| if (context) { | ||
| for (const [key, value] of Object.entries(context)) { | ||
| scope.setContext(key, value as Record<string, unknown>); |
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.
| "./*.ts", | ||
| "./*.d.ts", | ||
| "main/app.tsx", | ||
| "sentry/init-sentry.ts" |
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.
tsconfig.json references non-existent file name
Medium Severity
The tsconfig include array references sentry/init-sentry.ts but the actual file is named sentry/instrument.ts. This mismatch means the TypeScript configuration explicitly includes a non-existent file while not explicitly including the actual sentry files in the sentry/ directory. While the files may still be type-checked through imports from main.tsx, this configuration is incorrect and could cause issues with TypeScript project references or direct tsc invocations.

Demo
Kapture 2026-01-07 at 20.22.59.mp4 (uploaded via Graphite)
🌟 What is the purpose of this PR?
This PR adds Sentry User Feedback + Error Tracker inside Petrinaut demo website.
🔍 What does this change?
Error Tracker
Because we don't want Petrinaut to be directly coupled to Sentry:
ErrorTrackerContext<SentryErrorTrackerProvider>(only used in demo-website)This
SentryErrorTrackerProvideris still not used for now in the app, but will be extended later to add more granular tracking of user experience in the demo app.User Feedback
For now the User Feedback widget is the default one, this keeps it simple and prevents having to deal with React component props, or with design.
If we get a good Figma design, we'll be able customize this feedback button to place it properly in the UI.
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
Given the User Feedback widget is the default one, it's on top of the UI and could possibly hide some things.
🐾 Next steps
In the future, we'll do more granular tracking of what happens in the app.
❓ How to test this?
Use latest Petrinaut deployment