After following the onboarding steps for expressjs app, and triggering the demo error, no error is shown in Sentry. Verify step says that event was received, but nothings happening after clicking on the button, I am returned to the same onboarding page
instrument.js:
// Import with `import * as Sentry from "@sentry/node"` if you are using ESM
import * as Sentry from "@sentry/node";
// import { nodeProfilingIntegration } from "@sentry/profiling-node";
Sentry.init({
dsn: "<dsn>",
// integrations: [
// nodeProfilingIntegration(),
// ],
// Tracing
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Set sampling rate for profiling - this is relative to tracesSampleRate
// profilesSampleRate: 1.0,
});
index.js
import app from "./app.js";
import "./instrument.js";
import * as Sentry from "@sentry/node";
Sentry.setupExpressErrorHandler(app);
app.get("/debug-sentry", function mainHandler(req, res) {
throw new Error("My first Sentry error!");
});
const port = 3000;
console.log(`Server is running on port ${port}`);
app.listen(port);
The problem with this setup is that I did Sentry.setupExpressErrorHandler(app); before all routes were declared, but we still shown user that we have received an event, although we had nothing to show
After following the onboarding steps for expressjs app, and triggering the demo error, no error is shown in Sentry. Verify step says that event was received, but nothings happening after clicking on the button, I am returned to the same onboarding page
instrument.js
:index.js
app.ts