You can enable HTTP Tracing by providing a bean of type HttpTraceRepository
in your application’s configuration.
For convenience, Spring Boot offers InMemoryHttpTraceRepository
, which stores traces for the last 100 (the default) request-response exchanges.
InMemoryHttpTraceRepository
is limited compared to other tracing solutions, and we recommend using it only for development environments.
For production environments, we recommend using a production-ready tracing or observability solution, such as Zipkin or Spring Cloud Sleuth.
Alternatively, you can create your own HttpTraceRepository
.
You can use the httptrace
endpoint to obtain information about the request-response exchanges that are stored in the HttpTraceRepository
.