I have the following requirement: I want to track all requests, that go through our WebSphere servers. We have some web applications, and some web services deployed to our servers. However, i don't want to add that tracking mechanism to each application.
Is there a possibility, to add some plugin or to create a filter for the WebSphere server, where i can read the request (i need some additional data from the request, like username, and session id for the tracking)?
Or is the only solution for that problem some kind of proxy server, which i have to put before our WebSphere server and which can process the tracking?
We are using WebSphere 8.
At first there is a kind of HTTP request logging that can be done in Websphere version 8.
From the administration console choose Servers > Server Types > WebSphere application servers > server_name > Troubleshooting > NCSA access and HTTP error logging
Once you enable Access Logging and Error Logging you have Web server like HTTP logs in the WAS logs directory.
In case you need additional information, like the HTTP headers you mentioned, you should enable the following traces:
com.ibm.ws.http.HttpConnection=finest:
com.ibm.ws.http.HttpRequest=finest:
com.ibm.ws.http.HttpResponse=finest
More on this you can find here.
来源:https://stackoverflow.com/questions/9497418/track-http-requests-in-websphere