Sunday, February 8, 2015

Get lastest HTTP requests and responses' information in Spring Boot

To get lastest HTTP requests and responses' information in Spring Boot,

add Spring Boot Actuator and check the '/trace' endpoint.

You will get the following information:

[{"timestamp":1423401573491,"info":{"method":"GET","path":"/trace","headers":{"request":{"host":"localhost:8080","connection":"keep-alive","cache-control":"max-age=0","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36","accept-encoding":"gzip, deflate, sdch","accept-language":"ko,zh-CN;q=0.8,zh;q=0.6,en-US;q=0.4,en;q=0.2","cookie":"JSESSIONID=0C5D304BACC47BAFB28A4F1044501560; _ga=GA1.1.2128301213.1414071979"},"response":{"X-Application-Context":"application","Content-Type":"application/json;charset=UTF-8","Transfer-Encoding":"chunked","Date":"Sun, 08 Feb 2015 13:19:32 GMT","status":"200"}}}}]

It doesn't provide parameters' information yet.

I think it would be good if provided.

A discussion on it is in progress now at:

https://github.com/spring-projects/spring-boot/issues/2458

Reference:
http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready-tracing

No comments:

Post a Comment