Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
8.33.1
Framework Version
express 4.18.2, serverless-http 3.1.1
Link to Sentry event
Reproduction Example/SDK Setup
import {init, setupExpressErrorHandler} from '@sentry/node';
import {nodeProfilingIntegration} from '@sentry/profiling-node';
init({
dsn: process.env.SENTRY_DSN,
environment: 'development',
integrations: [nodeProfilingIntegration()],
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
});
import express from 'express';
import serverless from 'serverless-http';
const app = express();
app.get('/debug-sentry/:test', (req, res) => {
throw new Error('My first Sentry error!');
});
setupExpressErrorHandler(app);
export const handler = serverless(app);
Steps to Reproduce
Run the above file as a single file using serverless
and serverless-offline
plugin.
Then run curl http://localhost:3000/debug-sentry/hello
I've removed the serverless
part and just started it as a raw express server using node index.js
, which successfully logs the error, so it must be specific to the serverless-http
wrapper.
I've also tried using @sentry/aws-serverless
instead of @sentry/node
which sadly logs nothing, presumably since express already handles the error.
Sentry 7 is logging errors correctly with the serverless + express combo.
Expected Result
Issue with URL, Headers & Query params
Actual Result
Also missing headers + query params
Metadata
Metadata
Assignees
Type
Projects
Status
Waiting for: Product Owner