Formerly, `Span.getAccumulatedMillis()` worked, but could returns
imprecise measurements, particularly local spans. This changes the
internals of Span to keep track of a start tick. Using this, it can
return a more precise `Span.getAccumulatedMicros()`.
To ensure this precision isn't lost in serialization, this adds a
json field `durationMicros`, which is only set when the span is stopped.
This is set instead of start tick because `System.nanoTime()` is JVM
specific and so cannot be used across the network. `durationMicros` uses
null instead of zero comparisons because nano time can be negative.
Fixes#312
Fixed integration tests to use ZipkinRule
Introduce assertj assertions (#315)
* Introduce assertJ assertions in some tests
* Fix code formatting to be inline with Spring rules
This moves to changes made in preparation of zipkin 1.0.
Here are the notables:
* Zipkin has autoconfiguration modules, where maven artifacts have the prefix 'zipkin-autoconfigure-X'
* Zipkin's ui now shares a version with everything else
* Zipkin now namespaces packages and configuration. ex zipkin.storage.X as opposed to zipkin.X
* All autoconfiguration classes are prefixed `Zipkin` to be easier to find
* Zipkin binds components like StorageComponent, as opposed to individual classes like SpanStore.
* Health checks are under the scope "zipkin" and broken down by component
* UI responsiveness is better by conditionally caching names queries for 5 minutes
* New `Collector` class, which makes logging and metrics patterns the same regardless of transport
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
This updates to the latest release. Beyond bug fixes, there are some
notable changes:
* storage: writes are now via AsyncSpanConsumer
* storage: added elasticsearch
* zipkin-ui: constrains start time to look for traces
* zipkin-ui: assets set cache headers, increasing responsiveness
* core: debug logging available for zipkin.internal.DependencyLinker
Notably, this removes the "zipkin-web" dependency, as the UI is now
collocated on zipkin-server.
Other notable changes are Cassandra and Kafka support, as well removing
the Brave dependency.
- Changed Random instantiation to a shared Random
- Changed the name of the converter
- Changed generator into random
- Span id is now non-nullable.
- it gets generated in the http filter if it's not there
- it's generated in the spring-integration channels if it wasn't set
Zipkin 0.4.1 obviates some duplication of configuration. It is also the
first version that's published as a docker image.
By switching to the published image of zipkin-java, we can be more
consistent, as `spring-cloud-sleuth-zipkin-stream` is derived from that,
not the scala query service.