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.
This important in so far that it allows us to do metrics. The actual
implementation of stream metrics is something we can work on after 1.0
if there's a time crunch.
Notably, this removes the accidental transient dependency on scala, by
removing the dependency on `zipkin-cassandra-core`. Related classes have
been vendored into `storage-cassandra`.
This also splits out `CollectorSampler` as its own thing and introduces
two options for instrumentation sampling:
* `BoundaryTraceIdSampler` - For high-volume sites, based on Finagle
* `CountingTraceIdSampler` - Trades lower performance for high accuracy
now instead of first passing all the spans from the queue to the list and then clearing it we're now draining it contents. If in the meantime any spans will arrive they will be rained at next passing
fixes#259
No immediate impact to sleuth, but some notable changes underneath:
* zipkin.Sampler is now extensible to permit dynamic rate adjustments
* self-tracing can now be disabled even if Brave is in the classpath
* related property: zipkin.self-tracing.enabled
* brave-spancollector-scribe is no longer an optional dependency
In the world of plugins:
* Elasticsearch bugfix on traces w/ more than 10 spans
* New ZooKeeper adaptive collection-tier sampler
when an exception was thrown by Feign it was not caught by our Feign customizations and wasn't properly closed. By adding a custom implementation we're closing span whenever an exception is thrown.
Fixes#257
The problem resulted in wrong span durations. The issue was such that for the case where span from request has a parent that needs to be reported we didn't stop that parent. That means that it has value of 'end' equal to 0. In that situation the duration of Span was calculated as a difference between current time and the start time. We should never report spans that have not been stopped - otherwise that stopping will take place a lot of time later.
fixes#247