it turned out that some of the tests were leaky and didn't catch that ExceptionUtils were throwing an exception (race condition with Hystrix). That was due to the fact that When Hystrix with Feign were doing retries the RequestInterceptor wasn't called. That means that a new span wasn't created but a parent span was closed.
With this change the only place where the span creation and closing takes place is TraceFeignClient. I removed the Feign RequestInterceptor. Now whenever there is a retry - a new span is created and closed after getting a response. There are no exceptions, special cases etc.
In addition to that since Feign is fully immutable and SpanInjector is by design made to mutate objects I had to wrap the immutable Request in an AtomicReference in order to change the contents of the Request. I'm ashamed but didn't have a better idea. Since that is packaged scope nobody should every see that (outside the package of course)
* Re-added missing server side span
with this change
- HandlerInterceptor is responsible for wrapping requests in spans
- added Sring Data REST instrumentation
- added Zuul instrumentation
- it will not wrap error controller related requests with spans
- tests have been changed to ensure that ALWAYS there is at least one span on the server side (that way it will show up in Zipkin)
- "fallback" mechanism has been added that if a HandlerInterceptor hasn't been used then we are forcing creation of a Span at the server side
fixes#321
Removes wiremock as a test dependency in core (which created more
issues than you might expect because Tomcat and Jetty don't treay
HTTP headers in the same way apparently).
Also moves the spring-messaging dependency to where it is needed
in sleuth stream.
Recent versions of zipkin and brave operate with http instead of scribe.
This changes the implementation accordingly, as well adds a sampler to
the POST endpoint.
A notable impact is that we no longer require a collector process, as
the zipkin server's POST endpoint is a collector.
- Merge branch 'master' of https://github.com/gauravrmazra/spring-cloud-sleuth into gauravrmazra-master
- Test scope removed for dependency. Needed for stomp message interceptor support
- Removed unused import from integration test
- Integration tests for TraceStompMessageContextChannelInterceptor
- Refactored code and added integration test for TraceStompMessageChannelInterceptor
- Fix for method which was not available in jdk1.7
- Fix build fail error due to new changes for stomp messages
- Support for STOMP messages over websocket