17 lines
1.0 KiB
Plaintext
17 lines
1.0 KiB
Plaintext
[[actuator.tracing]]
|
|
== HTTP Tracing
|
|
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`.
|
|
|
|
|
|
|
|
[[actuator.tracing.custom]]
|
|
=== Custom HTTP tracing
|
|
To customize the items that are included in each trace, use the configprop:management.trace.http.include[] configuration property.
|
|
For advanced customization, consider registering your own `HttpExchangeTracer` implementation.
|