Closed as not planned
Description
openedon Aug 6, 2024
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/nextjs
SDK Version
8.22.0
Framework Version
14.2.4
Link to Sentry event
https://test-application-g0.sentry.io/issues/5682136612/?project=4507729342496768
Reproduction Example/SDK Setup
sentry.server.config.ts
/sentry.edge.config.ts
Sentry.init({
dsn: dsn,
...,
integrations: [
Sentry.requestDataIntegration({
include: { ip: true },
}),
],
});
pages/api/test-error.ts
import type { NextApiRequest, NextApiResponse } from "next";
export default function handler(req: NextApiRequest, res: NextApiResponse) {
throw new Error("text error");
}
Steps to Reproduce
- Visit
/api/test-error
- View the created issue in Sentry
Expected Result
The IP address field should be the one contained in X-Forwarded-For
or X-Real-Ip
.
Actual Result
The IP address used is always ip:::ffff:127.0.0.1
(or some variant of localhost).
Metadata
Assignees
Type
Projects
Status
Waiting for: Community
Activity