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.
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.