Spring Cloud Sleuth currently is an autoconfiguration over Brave. It also consists of various instrumentation mechanisms for libraries that are not supported by Brave (e.g. Spring Cloud Circuitbreaker). We would like to abstract Brave so that Spring Cloud Sleuth becomes an autoconfiguration for any tracer implementation that is compatible with Spring Cloud Sleuth. That way Spring Cloud Sleuth in its core module would consist of an API and various tracer implementations would implement that API which would also allow automatic instrumentation of libraries that are supported by Spring Cloud Sleuth. ## OpenTelemetry Support Thanks to doing this abstraction we are able to support new tracer implementations, not only Brave. We've decided to add support for the OpenTelemetry SDK as the second one. If in the future if we decide to add new tracers then it will be just a matter of adding a new module that bridges to the Spring Cloud Sleuth one. Thanks to abstraction of tests as well we will be easily able to plug that tracer mechanism into our current suite of tests.
== Spring Cloud Sleuth Benchmarks This module can run benchmarks using the following tools - JMH - JMeter === How to run it? In the root folder inside the `scripts` folder there are the following benchmark scripts: - runJmhBenchmark.sh - runJmeterBenchmarks.sh Just execute them from the root folder like this: [source] ---- ./scripts/runJmeterBenchmarks.sh ./scripts/runJmhBenchmarks.sh ---- === How do they work? For JMH we're building a shaded JAR file that is next executed. For JMeter we're running two applications, one with Sleuth, one without with Spring Boot Maven Plugin. Next a Maven JMeter plugin is executed that loads the `*.jmx` files, starts JMeter and prints out the results. At the end Spring Boot Maven Plugin stops the applications. === What are we testing? For now we're testing the performance impact of the following: - our custom Trace HTTP filter - instrumentation of controllers - `@Callable` returning and the sync one - instrumentation of RestTemplate - `@Async` annotated methods