Skip to content

feature: add a user feedback button from sentry #289

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/admin/dashboard #leave as-is

##sentry
NEXT_PUBLIC_SENTRY_DSN=<SENTRY_DSN> #only necessary if working on error tracking, otherwise leave as-is
NEXT_RUNTIME=nodejs #change if it's 'edge' or something else accordingly . It's mainly for sentry, otherwise leave as-is
SENTRY_AUTH_TOKEN=<SENTRY_AUTH_TOKEN> #sentry-build-plugin for sentry ( It's used for authentication when uploading source maps.) It's mainly for sentry, otherwise leave as-is

##misc
NEXT_PUBLIC_BASE_URL=http://localhost:3000 #leave as-is
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ next-env.d.ts
.xatarc
src/xata.ts
.xata

# Sentry Config File
.env.sentry-build-plugin
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@react-email/components": "^0.0.25",
"@react-email/render": "^1.0.1",
"@react-email/tailwind": "^0.1.0",
"@sentry/nextjs": "^7.106.1",
"@sentry/nextjs": "^8.33.1",
"@t3-oss/env-nextjs": "^0.9.2",
"@tailwindcss/container-queries": "^0.1.1",
"@tanstack/react-table": "^8.12.0",
Expand Down
1,288 changes: 997 additions & 291 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,14 @@ Sentry.init({
blockAllMedia: true,
}),
Sentry.browserTracingIntegration({ enableInp: true }),
Sentry.feedbackIntegration({
// Additional SDK configuration goes in here, for example:
isNameRequired : true,
isEmailRequired : true,
colorScheme: "system",
themeDark: {
background: "#202d4c",
},
}),
],
})
2 changes: 1 addition & 1 deletion sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Sentry.init({
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
// uncomment the line below to enable Spotlight (https://spotlightjs.com)
})
})
13 changes: 13 additions & 0 deletions src/instrumentation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as Sentry from '@sentry/nextjs';

export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
await import('../sentry.server.config');
}

if (process.env.NEXT_RUNTIME === 'edge') {
await import('../sentry.edge.config');
}
}

export const onRequestError = Sentry.captureRequestError;