github.com/grafana/pyroscope@v1.18.0/docs/sources/configure-server/about-ip-address-logging.md (about) 1 --- 2 aliases: 3 - /docs/phlare/latest/operators-guide/configuring/about-ip-address-logging/ 4 - /docs/pyroscope/latest/configure-server/about-ip-address-logging/ 5 description: Troubleshoot errors by logging IP addresses of reverse proxies. 6 menuTitle: IP address logging of a reverse proxy 7 title: IP address logging of a reverse proxy 8 weight: 600 9 --- 10 11 # IP address logging of a reverse proxy 12 13 Note that using a reverse proxy in front of Grafana Pyroscope can make it difficult to troubleshoot errors. 14 You can use the following settings to log the IP address passed along by the reverse proxy in headers such as `X-Forwarded-For`. 15 16 - `-server.log-source-ips-enabled` 17 18 Set this to `true` to add IP address logging when a `Forwarded`, `X-Real-IP`, or `X-Forwarded-For` header is used. A field called `sourceIPs` is added to error logs when data is pushed into Grafana Pyroscope. 19 20 - `-server.log-source-ips-header` 21 22 The header field stores the source IP addresses and is used only if `-server.log-source-ips-enabled` is `true`, and if `-server.log-source-ips-regex` is set. If you do not set these flags, the default `Forwarded`, `X-Real-IP`, or `X-Forwarded-For` headers are searched. 23 24 - `-server.log-source-ips-regex` 25 26 A regular expression that is used to match the source IPs. The regular expression must contain at least one capturing group, the first of which is returned. This flag is used only if `-server.log-source-ips-enabled` is `true` and if `-server.log-source-ips-header` is set.