Commit Graph

45 Commits

Author SHA1 Message Date
Adrian Cole
5080ee3e24 Updates to latest Zipkin and avoids Endpoint factory method (#417)
Now that Endpoint has ipv6, the factory method is even worse than it
was before. This switches to a builder instead.

Note: Endpoint now has a nice toString which should help debugging.
2016-10-06 19:59:40 +08:00
Marius Bogoevici
d331f5a212 Use StreamListener for coercing messages from JSON Span (#386)
* Use StreamListener for coercing messages from JSON `Span`

Rely on the `contentType` header of the transported message to
tell Spring Cloud Stream how to coerce the message to `Span`.
2016-09-08 15:57:24 +02:00
Marcin Grzejszczak
fdea5d6bac Wraped debug logs with conditional 2016-08-17 13:59:01 +02:00
Marcin Grzejszczak
e0fbcfe7c6 Polish 2016-08-10 17:33:44 +02:00
Marcin Grzejszczak
9c0fe65649 Updating the duration setting (#360)
* Updating the duration setting

fixes #349
2016-07-29 23:36:29 +02:00
Adrian Cole
c2ab0d59cf Exposes getAccumulatedMicros for more precise Span duration (#317)
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
2016-06-29 10:42:02 +02:00
Adrian Cole
c360e00a5a Scopes collector metrics 2016-05-24 22:34:47 -04:00
Adrian Cole
b8b1ff05ac Moves to zipkin 0.21
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
2016-05-23 11:21:53 -04:00
Dave Syer
6ae8dfa21c Check for null in endpoint port
Fixes gh-280
2016-05-20 12:27:45 +02:00
Marcin Grzejszczak
650bf6d1f8 Removing the cloud profiled beans for ZipkinMessageListener
fixes #268
2016-05-19 17:23:39 +02:00
Adrian Cole
7da63b9ade Updates to zipkin 0.18
Relating to sleuth, this is mostly cosmetic with a kafka condition fix.

It might be of interest that `GET /api/v1/traces` no longer requires
parameters.

https://github.com/openzipkin/zipkin-java/releases/tag/0.18.0
2016-05-07 00:17:16 +08:00
Adrian Cole
d454641f79 Updates to zipkin 0.16
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.
2016-05-03 18:21:12 +08:00
Adrian Cole
a5b92b817b Updates to zipkin 0.15 (#263)
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
2016-04-29 18:22:23 +02:00
Adrian Cole
37a079c174 Updates to Zipkin 0.12
Prevents crashes by making storage calls lazy
2016-04-12 09:26:47 -04:00
Adrian Cole
eaa008f933 Updates to zipkin 0.11
The only notable change for Sleuth is an artifact id change from
spanstore to storage.
2016-04-03 21:04:55 +08:00
Adrian Cole
8382a823e5 Updates to zipkin 0.10.4
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
2016-03-31 19:31:45 +08:00
Marcin Grzejszczak
a0048a806e Polish 2016-03-21 14:58:30 +01:00
Adrian Cole
d662a4bf90 Updates to zipkin 0.9
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.
2016-03-18 17:46:45 +08:00
Dave Syer
ef1c91b24d Use JSON for span transport with Stream by default
User can still override it and Stream should adjust itself, but
now we have JSON flowing between instrumented apps and the Zipkin
server.

Fixes gh-217
2016-03-17 20:04:31 +00:00
Marcin Grzejszczak
4b61439ab9 [#79] Updated documentation
* first iteration

fixes #79
2016-03-03 11:25:43 +01:00
Marcin Grzejszczak
17bc239536 [#191] Changes following the review 2016-03-02 15:05:18 +01:00
Marcin Grzejszczak
754c8ce96d [#191] Added ServerAddress annotation
* if a span contains a CS or CR (or any other client related annotation) then SA is passed from the Endpoint service name

fixes #191
2016-03-01 16:35:57 +01:00
Marcin Grzejszczak
6c2c87ab3c [#191] Added local component if a span doesn't have any Zipkin constants
fixes #191
2016-03-01 13:45:58 +01:00
Marcin Grzejszczak
3000a4f37d [#69] Added javadocs
fixes #69
2016-02-25 11:23:23 +01:00
Marcin Grzejszczak
dc22434e27 More refactoring 2016-02-22 19:04:37 +01:00
Marcin Grzejszczak
8333c31c99 [#158] Removing span name
fixes #158
2016-02-16 08:28:22 +01:00
Marcin Grzejszczak
ee8d7a54c7 Delomboking 2016-02-10 19:09:20 +01:00
Marcin Grzejszczak
1b0c8dfee5 [#146] Introduced SpanName
- Added aspect to provide better naming for @Async

fixes #146
2016-02-09 15:25:36 +01:00
Dave Syer
0c5c984e4a Use accumulated millisecs instead of computing span duration 2016-01-26 13:53:44 +00:00
Adrian Cole
ef7e70dde3 Prefers the word event when adding to a Span's timeline
Span.logs are really timestamped events. This clarifies the naming and
documentation around that.
2016-01-25 11:24:07 +01:00
Adrian Cole
9417110e90 Changes http key delimiter to dot and adds size keys 2016-01-23 17:28:12 +01:00
Marcin Grzejszczak
7b6a533498 Fixed checkstyle issues 2016-01-20 12:36:38 +01:00
Marcin Grzejszczak
d5b523d021 Converted MilliSpan to Span. Removed the interface 2016-01-20 10:52:02 +01:00
Adrian Cole
9bcab5b0c6 Updates to zipkin-java 0.4.3 2016-01-20 12:22:18 +08:00
Marcin Grzejszczak
82ed9f78a1 [#106] Converted UUID to Long
- 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
2016-01-18 14:38:09 +01:00
Adrian Cole
425123df86 Updates to zipkin-java 0.4.1, particularly docker images
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.
2016-01-14 11:06:19 +08:00
Adrian Cole
582cd157dc Adds test missing from last PR 2016-01-13 11:44:57 +08:00
Dave Syer
368d1ccae7 Rename some of the core API concepts
E.g. annotation -> tag, timelineAnnotation -> log

See gh-98
2016-01-12 17:39:58 +00:00
Adrian Cole
84d2706a57 Updates to latest zipkin and brave, removing Scribe dependency
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.
2016-01-12 21:58:48 +08:00
Marcin Grzejszczak
9a8dc17d8c [#89] Initial approach to the integration tests
- Fixed the tests
- Updated surefire
- Added integration tests (for the moment ignored)
- Fixed wrong surefire setup
2016-01-08 19:09:37 +01:00
Adrian Cole
e3669417dd Fixes missing zipkin service name and polishes span converters.
Missing service name:

Zipkin service names were logged as null, which is invalid and led to
them showing up as "unknown" in the zipkin ui. This was due to a wiring
bug, and a special-case, which this change fixes.

The special-case was when a sleuth span had no annotations. Since zipkin
service names are attached to annotations, they are only queryable when
annotations exist. When there are no annotations, we add the "lc"
binary annotation, which makes that span attached to the correct service
in zipkin.

Polishing:

Zipkin timestamps were not always set as microseconds. This fixes that.

The de-facto label in zipkin for unknown service is "unknown". This
fixes the code, which formerly fell back to "application".

This also removes complexity in assigning timestamp and duration as we
no longer need to make pseudo-annotations "acquire" and "release".

Finally, this adds tests about above consistently to both scs-zipkin and
scs-zipkin-stream.
2015-12-29 17:10:16 +08:00
Dave Syer
28dbb0cd14 Refactor docker compose so default launches everything 2015-12-15 11:44:28 +00:00
Dave Syer
327bb46e90 Remove reference to unused class 2015-12-15 09:44:17 +00:00
Dave Syer
b1068e2050 Re-organize docker files for Zipkin server
Still not quite working:

$ docker-compose -f docker-compose.yml -f docker-compose.zipkin.yml up

everything starts up fine (once the database is initialized), but
the zipkin server is not listening to rabbit (and there are errors
in the logs).
2015-12-11 16:33:25 +00:00
Dave Syer
ce4a7409fa Add Zipkin stream support
@EnableZipkinStreamServer and bind to a Spring Cloud Stream message
broker. That's it. The default span store is in memory, but Zipkin
also supports MySQL (and Cassandra coming soon).
2015-12-11 10:24:03 +00:00