Skip to content

Latest commit

 

History

History
 
 

brave-resteasy-spring

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

brave-resteasy-spring

Latest release available in Maven central:

<dependency>
    <groupId>com.github.kristofa</groupId>
    <artifactId>brave-resteasy-spring</artifactId>
    <version>2.2.1</version>
</dependency>

The brave-resteasy-spring module has RESTEasy client and server support which makes the usage of Brave transparent for your application. This module contains:

  • BraveClientExecutionInterceptor can be configured to be used with the RestEasy Client Framework and intercepts every client request made. It will use ClientTracer to decide if request needs to be traced and if so it will submit span to SpanCollector containing client send and client received annotations. It will also detect failed requests and in that case add some additional annotations like for example http.responsecode and failure annotation.
  • BravePreProcessInterceptor and BravePostProcessInterceptor will intercept requests at the server side and will use ServerTracer to deal with tracing.

There is a separate example application that shows how to set up and configure the RESTEAsy integration using Spring -> https://github.com/kristofa/brave-resteasy-example

brave-resteasy-spring puts the Spring and RESTEasy dependencies to scope provided which means you are free to choose the versions yourself and add the dependencies to your own application.

Important to know is that you should use a recent RESTEasy version otherwise the integration might not work. It does for example not work with RESTEasy 2.2.1.GA. It does work with 2.3.5.Final which is also used in https://github.com/kristofa/brave-resteasy-example.

When it comes to Spring the oldest version I tried out and which worked was 3.0.5.