Add Sentry integration - #7
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR integrates Sentry into MōStats to capture basic production launch and crash telemetry across both the main and renderer processes (Issue #6).
Changes:
- Add Sentry initialization in main (Node) and renderer (React) with build-time DSN injection and runtime gating.
- Extend renderer↔main IPC to provide application name/version for Sentry
release. - Wire
SENTRY_DSNinto the release GitHub Actions workflow and document the setup.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
vite.config.ts |
Adds build-time defines for Sentry config and adjusts main bundling/externalization. |
src/renderer/sentry.ts |
New renderer Sentry initializer using IPC metadata for the release string. |
src/renderer/proto/app.proto |
Adds ApplicationMetadata message and GetApplicationMetadata RPC. |
src/renderer/main.tsx |
Initializes Sentry before render and hooks React root error callbacks to Sentry. |
src/main/sentry.ts |
New main-process Sentry initializer, launch event, session capture, and fatal error flushing. |
src/main/index.ts |
Imports Sentry initializer early during main startup. |
src/main/application.ts |
Implements GetApplicationMetadata IPC handler. |
README.md |
Documents build-time DSN requirement and release secret usage. |
package.json |
Adds @sentry/node and @sentry/react dependencies. |
package-lock.json |
Locks new Sentry dependency graph. |
.gitignore |
Ignores local .env* files. |
.github/workflows/release.yml |
Exposes SENTRY_DSN secret to the release build job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Dmytro-Fedoryshyn
marked this pull request as ready for review
July 9, 2026 10:22
Danil-Didkovskiy
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this changeset, we have integrated Sentry into MōStats to track basic app telemetry: production launches and unhandled JavaScript exceptions from the main and renderer processes.
Issue: #6