Integrate User Feedback based on the documentation.
Code
import * as Sentry from "@sentry/nextjs"
const feedbackIntegration = Sentry.feedbackIntegration({
// Additional SDK configuration goes in here, for example:
colorScheme: "light",
isNameRequired: true,
isEmailRequired: true,
nameLabel: "Ihr Name",
emailPlaceholder: "Geben Sie Ihre E-Mail-Adresse ein",
isRequiredLabel: "(erforderlich)",
namePlaceholder: "Gib deinen Namen ein",
showBranding: false,
formTitle: "Ein Problem melden",
messageLabel: "Beschreibung",
messagePlaceholder: "Was ist das Problem? Was haben Sie erwartet?",
submitButtonLabel: "Problembericht senden",
cancelButtonLabel: "Stornieren",
buttonLabel: "Melde Probleme",
successMessageText: "Vielen Dank für deinen Bericht!",
})
async function initSentry() {
const res = await fetch("/api/env")
const dsn = await res.json()
Sentry.init({
dsn,
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
replaysOnErrorSampleRate: 1.0,
// This sets the sample rate to be 10%. You may want this to be 100% while
// In development and sample at a lower rate in production
replaysSessionSampleRate: 0.1,
// You can remove this option if you're not planning to use the Sentry Session Replay feature:
integrations: [
new Sentry.Replay({
// Additional Replay configuration goes in here, for example:
maskAllText: true,
blockAllMedia: true,
}),
feedbackIntegration,
],
})
}
initSentry()
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
7.8.0
Framework Version
18.2.0
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
Code
Expected Result
The Add Screenshot button should be existed:
Actual Result