saleor / requests-hardened

A library that overrides the default behaviors of the requests library, and adds new security features.
https://pypi.org/project/requests-hardened
BSD 3-Clause "New" or "Revised" License
8 stars 0 forks source link

Improve logging and tracing in IP filtering feature #13

Open NyanKiyoshi opened 1 year ago

NyanKiyoshi commented 1 year ago

Problem

Due to the way the IP filter works, when a log entry is generated (such as during requests failure), the URL that is logged is in the format of https://XXX.XXX.XXX.XXX/ instead of https://<my-domain>/.

The same issue happens in traces.

This logging and tracing behavior change makes it less human friendly to the users investigating issues.

To be done

We need to figure out a way to change our current logging and tracing behaviors so it can include more details, for example it could include extra data such as {"host": "my-domain.test"} to help the user understand what is the hostname behind the IP address.