raven-clj icon indicating copy to clipboard operation
raven-clj copied to clipboard

Set REMOTE_ADDR in HTTP request event payload

Open devurandom opened this issue 1 year ago • 0 comments

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.

devurandom avatar Aug 17 '23 19:08 devurandom