Skip to content

sentry-actix does not send REMOTE_ADDR to the server, even though sentry::capture_error does #680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
026Fatih opened this issue Aug 24, 2024 · 0 comments

Comments

@026Fatih
Copy link

Environment

  • Self hosted Sentry: 23.6.2
  • sentry: 0.34.0
  • sentry-actix: 0.34.0

Steps to Reproduce

  1. Create an Actix project with sentry and sentry-actix crates
  2. Set the SENTRY_DSN environment variable.
  3. Initialise Sentry with the following configuration:
let _guard = sentry::init(sentry::ClientOptions {
        release: sentry::release_name!(),
        debug: true,
        attach_stacktrace: true,
        send_default_pii: true,
        traces_sample_rate: 1.0,
        auto_session_tracking: true,
        session_mode: sentry::SessionMode::Request,
        ..Default::default()
    });
  1. Use the sentry-actix middleware:
.wrap(sentry_actix::Sentry::with_transaction())
  1. Send a request to one of the endpoints.

Expected Result

On the server, I should be able to see the remote IP address from which the request was made in the REMOTE_ADDR field.

Actual Result

The REMOTE_ADDR field is missing in the event details on the server.

Note

If I use sentry::capture_error at step 4, the REMOTE_ADDR field can be seen on the server.

pavel-rosputko added a commit to pavel-rosputko/sentry-rust that referenced this issue Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant