custom_fields was not included in request log
xiaoming-xue opened this issue · 2 comments
We want to use some custom_fields to filter request logs in Kibana, but custom_fields were not included in request logs generated using RequestLoggingFilter.
Is it possible to include custom_fields in request logs?
There are two kinds of request logs, that are emitted when using the RequestLoggingFilter. One is created by the RequestLoggingFilter and is under control of the library. The second request log is emitted by the CF Router, regardless whether the RequestLoggingFilter is used. While the router logs contain request_id and correlation_id, it is impossible to provide custom fields on those logs as well. Therefore, adding custom fields to the RequestLoggingFilter would introduce a difference in the request logging format, that needs to be accounted for in the parsing as well. While it is easy to add the capability to the library, this might be a breaking change to the request log parsing. We need to take this into account as well.
Can you elaborate a little bit on your desired use-case?
I close this issue, since there are no further comments.