Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

fdsnws - improvements in access/request logging #103

Open
jordi-domingo opened this issue Mar 3, 2017 · 1 comment
Open

fdsnws - improvements in access/request logging #103

jordi-domingo opened this issue Mar 3, 2017 · 1 comment

Comments

@jordi-domingo
Copy link
Contributor

It would be nice to add the following features to fdsnws logging, for both the access-log files and the DB Arclink-style request statistics.

  • Forwarded IP when fdsnws is behind a proxy. When fdsnws is behind a proxy, the real client IP is not stored in the logs, but the proxy server IP instead. The real client IP is important for statistics and can be obtained from the HTTP X-Forwarded-For header. It would be very useful to use this header instead of client IP. The X-Forwarded-For header can be spoofed by the client, so I suggest doing it only when explicitly configured in fdsnws.cfg, and using only the last part (comma-separated) which is added by the proxy server.

  • Add requestID to access-log. When trackdb is enabled, useful statistics are stored in the DB. However, the access-log files can be also useful (response code, size, procTime...). Adding the requestID to the access-log would allow enhanced statistics by joining both logs and DB requests. It might be also useful to add this requestID to the process-log. Is that possible?

Many thanks for the work. Let me know if I can help with something.

@gempa-stephan
Copy link
Member

Although this issue is rather old we consider your feature request as useful. Please go ahead, implement these extensions and create a pull request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants