Skip to content
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

Set REMOTE_ADDR in HTTP request event payload #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devurandom
Copy link

@devurandom devurandom commented Aug 17, 2023

The Sentry event payload supports REMOTE_ADDR under the env key:

The :remote-addr key can be added to ring requests using
ring.middleware.proxy-headers from ring/ring-headers:0.3.0 that is
e.g. enabled with (ring-defaults/wrap-defaults ,,, {:proxy true}) from
ring/ring-defaults:0.3.4.

If :remote-addr is not present in the request, we send the empty string
and Sentry will not show this field in its web UI.

The Sentry event payload supports `REMOTE_ADDR` under the `env` key:
* https://develop.sentry.dev/sdk/event-payloads/request/
* https://develop.sentry.dev/sdk/event-payloads/types/#request

The `:remote-addr` key can be added to ring requests using
`ring.middleware.proxy-headers` from `ring/ring-headers:0.3.0` that is
e.g. enabled with `(ring-defaults/wrap-defaults ,,, {:proxy true})` from
`ring/ring-defaults:0.3.4`.

If `:remote-addr` is not present in the request, we send the empty string
and Sentry will not show this field in its web UI.
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

Successfully merging this pull request may close these issues.

None yet

1 participant