without this change whenever a traced executor is created (either via a proxy or directly) we create a new instance of that traced wrapper. The problem with that is such that we create a lot of objects (e.g. each getExecutor() would return a new instance of the traced version). There are projects such as Micrometer that create WeakReferences to those objects. That means that if we don't cache the traced instance then we will lose the WeakReference upon the first GC.
with this change we're introducing new static wrapper methods that cache the traced instance for a given delegate. That means that not only will we create fewer objects but also we will honour the WeakReference mechanisms.
fixes gh-2020
This can be fixed by recording the wall time and the duration (using monotonic time) and calculating the end time using the duration (also converting them to the right units) but I think it does not worth the effort.
* First draft of instrumenting Spring Security
* Create events based on Authentication not SecurityContext
* Simplifying security config
* Checkstyle reformat
* Create DocumentedSpan and EventValue for Spring Security instrumentation
* Adding spring-security-bom to ensure the right dependencies are used.
* TracingSecurityContextChangedListenerTests
* Adding integration tests
* Deleting spring-cloud-sleuth-sample-security
* Checkstyle, license, javadoc
* Inlining SleuthSecuritySpan methods
* Deleting javadoc links from DocumentedSpan
* Updating auto-generated docs
* simplify ON_EACH reactor instrumentation
remove custom Publisher decorators that
were mostly copy of reactor-core Lift Publishers
and use new LIFTER Scannable Attribute instead
* change constant scope
* add note about test constant origin
Without this change we don't even really know how many tags are created and what are their values.
With this change we want this information to be automatically rendered.
Spans names are in the form '<http method> <uri template>'
(e.g. 'GET /path/{id}'). This naming strategy matches the span names
generated by TraceWebFilter.
The improve naming strategy is not applied to RestTemplate as the uri
template is not readily available to interceptors and RestTemplate is
in maintenance mode
* Bump javadocs since version to 3.1.0
* Extend integration tests to cover all Kafka clients
* Add autoconfiguration module for kafka instrumentation
* Refactor instrumentation for reactive Kafka Receiver
* Refactor instrumentation for reactive Kafka Receiver
* Add docs for Kafka instrumentation
* Revert "Refactor instrumentation for reactive Kafka Receiver"
This reverts commit 58c8f2fa
* Revert "Revert "Refactor instrumentation for reactive Kafka Receiver""
This reverts commit 450a9f8c
* Remove empty test
* Resolve comments from PR 1936
* Revert whitespaces
* Revert whitespaces in common tests pom.xml
* Fix autoconfig to consider generics when registering beans.
Only register reactor-kafka beans if the dependency is on the classpath.
* Split autoconfig for kafka and reactor-kafka