-
-
Notifications
You must be signed in to change notification settings - Fork 14
feat: error tracking #417
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: main
Are you sure you want to change the base?
feat: error tracking #417
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 integrates Sentry error tracking into the browser extension, enabling error monitoring and reporting in both the popup and options pages.
- Adds Sentry configuration and initialization to both entry points
- Includes Sentry Vite plugin for build-time integration with sourcemap support
- Adds a test button in the options page to verify error tracking functionality
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| apps/extension/wxt.config.ts | Configures Sentry Vite plugin and enables sourcemap generation |
| apps/extension/src/entrypoints/popup/main.tsx | Initializes Sentry for popup entry point |
| apps/extension/src/entrypoints/options/main.tsx | Initializes Sentry for options entry point and adds error test button |
| apps/extension/package.json | Adds Sentry React and Vite plugin dependencies |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| "@sentry/react": "^10.11.0", | ||
| "@sentry/vite-plugin": "^4.3.0", |
Copilot
AI
Sep 13, 2025
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 packages should be in dependencies, not devDependencies, since they are runtime dependencies needed in production builds.
| import { Root } from "./root"; | ||
|
|
||
| Sentry.init({ | ||
| dsn: "https://93bfaefbe956cf67fc9baad45d9c8357@o4507553809498112.ingest.us.sentry.io/4508510108319744", |
Copilot
AI
Sep 13, 2025
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.
The Sentry DSN contains sensitive configuration data and should be moved to an environment variable instead of being hardcoded.
| dsn: "https://93bfaefbe956cf67fc9baad45d9c8357@o4507553809498112.ingest.us.sentry.io/4508510108319744", | |
| dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, |
| ]); | ||
|
|
||
| Sentry.init({ | ||
| dsn: "https://93bfaefbe956cf67fc9baad45d9c8357@o4507553809498112.ingest.us.sentry.io/4508510108319744", |
Copilot
AI
Sep 13, 2025
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.
The Sentry DSN contains sensitive configuration data and should be moved to an environment variable instead of being hardcoded.
| dsn: "https://93bfaefbe956cf67fc9baad45d9c8357@o4507553809498112.ingest.us.sentry.io/4508510108319744", | |
| dsn: import.meta.env.VITE_SENTRY_DSN, |
| <button | ||
| className="fixed top-4 right-4 z-50 rounded-full bg-red-500 px-4 py-2 text-white transition hover:bg-red-600" | ||
| onClick={() => { | ||
| throw new Error("This is your first error!"); | ||
| }} | ||
| > | ||
| Break the world | ||
| </button> |
Copilot
AI
Sep 13, 2025
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.
This test button for error tracking should be removed before production deployment or wrapped in a development-only condition.
| <button | |
| className="fixed top-4 right-4 z-50 rounded-full bg-red-500 px-4 py-2 text-white transition hover:bg-red-600" | |
| onClick={() => { | |
| throw new Error("This is your first error!"); | |
| }} | |
| > | |
| Break the world | |
| </button> | |
| {import.meta.env.DEV && ( | |
| <button | |
| className="fixed top-4 right-4 z-50 rounded-full bg-red-500 px-4 py-2 text-white transition hover:bg-red-600" | |
| onClick={() => { | |
| throw new Error("This is your first error!"); | |
| }} | |
| > | |
| Break the world | |
| </button> | |
| )} |
| Sentry.init({ | ||
| dsn: "https://93bfaefbe956cf67fc9baad45d9c8357@o4507553809498112.ingest.us.sentry.io/4508510108319744", | ||
| // Setting this option to true will send default PII data to Sentry. | ||
| // For example, automatic IP address collection on events | ||
| sendDefaultPii: true, | ||
| }); |
Copilot
AI
Sep 13, 2025
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 configuration is duplicated between popup and options entry points. Consider creating a shared configuration module to avoid code duplication.
Deploying furigana-maker with
|
| Latest commit: |
190a814
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d237f400.furiganamaker.pages.dev |
| Branch Preview URL: | https://feat-sentry.furiganamaker.pages.dev |
No description provided.