Skip to content

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

@026Fatih

Description

@026Fatih

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions