feat/sentry user implementation#910
Open
egelhaus wants to merge 18 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…t.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…t.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements Sentry user context integration across the Postiz monorepo to enhance error tracking by associating user information with Sentry events. The implementation provides automatic user context setting in both frontend and backend services.
- Adds user context utilities for both React (frontend) and NestJS (backend) environments
- Integrates automatic user context setting in authentication middleware and user components
- Ensures proper cleanup of user context during logout operations
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
libraries/react-shared-libraries/src/sentry/sentry.user.context.ts |
Frontend utility functions for setting and clearing Sentry user context with custom UserInfo interface |
libraries/nestjs-libraries/src/sentry/sentry.user.interceptor.ts |
NestJS interceptor for automatic user context setting on requests |
libraries/nestjs-libraries/src/sentry/sentry.user.context.ts |
Backend utility functions using Prisma User model for Sentry context |
apps/frontend/src/components/layout/user.context.tsx |
Integration of Sentry user context in React user context provider |
apps/frontend/src/components/layout/logout.component.tsx |
Clear Sentry context during frontend logout |
apps/backend/src/services/auth/auth.middleware.ts |
Set/clear Sentry context during authentication middleware |
apps/backend/src/api/routes/users.controller.ts |
Clear Sentry context during backend logout endpoint |
|
This PR is stale because it has been open for 90 days with no activity. |
|
This PR was closed because it has been inactive for 7 days since being marked as stale. |
Collaborator
Author
|
@copilot do you have any improvements for this PR? |
3 tasks
…cumentation Co-authored-by: egelhaus <156946629+egelhaus@users.noreply.github.com>
Co-authored-by: egelhaus <156946629+egelhaus@users.noreply.github.com>
feat: Sentry user context integration with error handling
Collaborator
Author
|
@sentry review |
Collaborator
Author
Comment out the Sentry DSN variable in the example file.
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.




What kind of change does this PR introduce?
eg: Bug fix, feature, docs update, ...
Why was this change needed?
Please link to related issues when possible, and explain WHY you changed things, not WHAT you changed.
Other information:
eg: Did you discuss this change with anybody before working on it (not required, but can be a good idea for bigger changes). Any plans for the future, etc?
Checklist:
Put a "X" in the boxes below to indicate you have followed the checklist;