Commit Graph

9 Commits

Author SHA1 Message Date
Adrian Cole
b45bfa2c24 Adds notes about fields in types explicitly new'ed 2016-01-13 12:01:06 +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
Dave Syer
c3ac8f570f Test for null in StreamSpanListener
A span can have a null name so we need to guard against it explicitly.
2015-12-31 15:27:17 +00:00
Dave Syer
258abebeb1 Formatting 2015-12-31 12:35:14 +00: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
3b0ff4b4c5 Update to 1.0.0.M4 2015-12-23 09:12:22 +00:00
Dave Syer
c11e530560 Add exportable to Span and use it to determine if data are exported
If the flag is set then annotations are collected and the data are exported
in zipkin or stream. If not you still get the correlation ids, so a purely
log-oriented solution will always have useful data on all requests.
2015-12-22 11:19:24 +00:00
Dave Syer
ffa97c1f20 Big refactor of sleuth core API
Instrumentation should be able to get by with only 2
interfaces: TraceManager and TraceAccessor (the former is
not needed if you aren't starting a new Span). No explicit
access to thread locals or manipulation of thread context
is required (except locally where necessary).

A Span is enclosed by a Trace (actually a view of the complete
Trace that would be constructed remotely).
2015-12-01 14:06:04 +00:00
Dave Syer
d9bf984e5f Add spring-cloud-sleuth-stream 2015-10-12 11:09:08 +01:00