Ivan and I discovered a problem when the server framework undertow.io is used (which is included in the latest WildFly versions).
The problem is, that the framework uses an custom ServletInitialHandler which wraps the Java Servlet API and manages the response codes in the case of errors. This means that our HTTP sensor (which is included in the HttpServlet) is not at the top level of the processing chain and misses data or collects wrong data because it is not processed when it is collected.
This problem does only have an impact if the user does not handle the response code by itself (e.g. throwing exception instead of valid responses).
After discussion we agreed that we would like to do the following:
Have one HttpHook, but multiple Http sensors that initialize the hook with different data providers (similar to tracing approach)
Each data provider can work on different methods, objects, etc
Currently we capture every time parameters, attributes, request headers (session attributes are optional).. Providers should be more flexible on what data they capture, so that user can limit amount of data captured and thus decrease the overhead in the application
Providers should collect the response headers as well