Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 1.03 KB

README.md

File metadata and controls

14 lines (11 loc) · 1.03 KB

brave-instrumentation-spring-web

This module contains tracing interceptors for Spring RestTemplate. TracingClientHttpRequestInterceptor and TracingAsyncClientHttpRequestInterceptor add trace headers to outgoing requests. They then report to Zipkin how long each request took, along with relevant tags like the http url.

Configuration

Tracing always needs a bean of type HttpTracing configured. Make sure it is in place before proceeding. Here's an example in XML and Java.

Then, wire TracingClientHttpRequestInterceptor and add it with the RestTemplate.setInterceptors method. If you are using AsyncRestTemplate and Spring 4.3+, you can wire AsyncTracingClientHttpRequestInterceptor and add it via AsyncRestTemplate.setInterceptors.