Skip to main content

Test the Sentry feedback widget before users see it

Point the Sentry browser SDK at Buggregator and add the feedback widget. Every feedback you send while testing lands in Buggregator, not in a real Sentry project. Pass the error's event ID as associatedEventId, and the name, email and message show on the page of the error they belong to.

Steps

1. Start Buggregator

bash
docker run --pull always \
  -p 127.0.0.1:8000:8000 \
  ghcr.io/buggregator/server:latest

2. Add the widget and point the DSN at Buggregator

Any key before @ works. The number at the end puts the data into the default project. No CORS setup is needed.

javascript
import * as Sentry from "@sentry/browser";

Sentry.init({
  dsn: "http://sentry@127.0.0.1:8000/1",
  integrations: [
    Sentry.feedbackIntegration({
      colorScheme: "system",
    }),
  ],
});

3. Tie feedback to an error

Feedback from the widget is not linked to an error by itself. To test feedback on an error, send it with captureFeedback and the ID of the error.

javascript
const eventId = Sentry.captureException(new Error('Checkout failed'))

Sentry.captureFeedback({
  name: 'Jane Doe',
  email: 'jane@example.com',
  message: 'The pay button did nothing',
  associatedEventId: eventId,
})

4. Read it in Buggregator

Open http://127.0.0.1:8000. On the error's page, above the tabs, you see the name, email, message, page URL and time. The Feedback tab on the Sentry page lists all feedback, also the feedback sent from the widget without an error.

Screenshots attached to feedback are not stored.

Why it works

The Sentry SDK sends feedback to the DSN like any other event. Buggregator keeps it and links it to the error whose ID is in associatedEventId. Feedback makes no card of its own in the event feed. You can also read it over the API: GET /api/sentry/feedback.

Checked on with Buggregator v2.13.0

Setup in 60 seconds

No registration. No account. Start it and point your app at it.

1

Start Buggregator

One file, installed with one command. The web UI opens on port 8000. Prefer containers? Use the Docker tab.

$ curl -fsSL https://raw.githubusercontent.com/buggregator/server/master/scripts/install.sh | sh
$ HTTP_ADDR=127.0.0.1:8000 \
  SMTP_ADDR=127.0.0.1:1025 \
  VAR_DUMPER_ADDR=127.0.0.1:9912 \
  MONOLOG_ADDR=127.0.0.1:9913 \
  PROXY_ADDR=127.0.0.1:8080 \
  ~/.local/bin/buggregator

The script picks the file for your CPU: Intel/AMD or ARM.

One file for Linux, macOS and Windows, about 40 MB. Nothing else to install.

This run line keeps it on this computer. Without the *_ADDR settings it listens on all network interfaces

Rather not run a script? Download the file yourself

Runs on Windows, macOS and Linux, on Intel/AMD and ARM.

Prefer not to do it yourself? Your AI agent can set Buggregator up for you