Search code examples
javaspringspring-bootspring-boot-actuator

Adding response body to Spring Boot Actuator


I'd like to view the response body in Spring Boot Actuator. I have tried couple of tutorials I found but none is working. The most concrete answer I found was using WebRequestTraceFilter which is no longer supported in Spring Boot 2.X.

Alternatively, if there's any tool like Laravel Telescope for Spring Boot would be great. I'm already using Spring Boot Admin and it's great except for the response body part.


Solution

  • I suppose you are talking about /actuator/httptrace. Spring boot doesn't publish request and response payload by default. Also you need to provide implementation of "InMemoryHttpTraceRepository" bean to expose custom information for tracing. This blog could be helpful.