52. 追踪(Tracing)

对于所有的HTTP请求Spring Boot自动启用追踪,你可以查看trace端点获取最近100条请求的基本信息:

  1. [{
  2. "timestamp": 1394343677415,
  3. "info": {
  4. "method": "GET",
  5. "path": "/trace",
  6. "headers": {
  7. "request": {
  8. "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
  9. "Connection": "keep-alive",
  10. "Accept-Encoding": "gzip, deflate",
  11. "User-Agent": "Mozilla/5.0 Gecko/Firefox",
  12. "Accept-Language": "en-US,en;q=0.5",
  13. "Cookie": "_ga=GA1.1.827067509.1390890128; ..."
  14. "Authorization": "Basic ...",
  15. "Host": "localhost:8080"
  16. },
  17. "response": {
  18. "Strict-Transport-Security": "max-age=31536000 ; includeSubDomains",
  19. "X-Application-Context": "application:8080",
  20. "Content-Type": "application/json;charset=UTF-8",
  21. "status": "200"
  22. }
  23. }
  24. }
  25. },{
  26. "timestamp": 1394343684465,
  27. ...
  28. }]