Commit Graph

49 Commits

Author SHA1 Message Date
Marcin Grzejszczak
00b1852efe Changed arraylist to linkedlist 2016-07-15 15:43:13 +02:00
Dave Syer
2a38aa1241 Fix property names for stream binder headers
Spring Cloud Stream changed the names of the headers config
that we need to propagate headers in kafka (and other binders
that do not support headers natively).

Fixes gh-284
2016-06-06 09:53:54 +01:00
Dave Syer
fe7271960d Compiler warnings 2016-05-04 11:32:03 +01:00
Marcin Grzejszczak
80f51f76fe Draining from queue instead of clearing it (#262)
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
2016-04-29 13:52:11 +02:00
Marcin Grzejszczak
c9cdb7e4c3 Added missing conditionals 2016-04-22 11:35:35 +02:00
Marcin Grzejszczak
184afe698d Added tests for exporting to Zipkin 2016-03-23 14:28:06 +01:00
Marcin Grzejszczak
a0048a806e Polish 2016-03-21 14:58:30 +01: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
Dave Syer
35ba7bab95 Ensure that BPP dependencies are not created too early
The FeignBeanPostProcessor was causing other things to misbehave
by forcing early instantiation of all its dependencies. One of those
is a @MessageEndpoint when Sleuth Stream is in use, and the annotation
wasn't being processed because the bean was processed too early.
2016-03-17 11:29:46 +00:00
Marcin Grzejszczak
4d6fbd29bb Added missing conditionals
without it if you provide `spring.sleuth.enaled:false` the app would blow up
2016-03-16 16:31:42 +01:00
Marcin Grzejszczak
3bb7916fff Customizable headers
* Fixed the HttpServlet extractors
    (now the response can contain custom headers)
    * Changed header names to be Zipkin compatible
    * removed qualifiers and properties
    * updated the docs

fixes #19
2016-03-16 16:10:28 +01:00
Marcin Grzejszczak
146f7f652b Removed events and replaced them with method calls
fixes #156
2016-03-13 10:37:01 +01:00
Marcin Grzejszczak
e4bcd13b8c Added tests 2016-03-10 14:28:05 +01:00
Marcin Grzejszczak
24fa3514da Added missing tests 2016-03-09 17:49:27 +01:00
Marcin Grzejszczak
e5b1495613 Simplified Tracer API 2016-03-04 11:50:59 +01:00
Marcin Grzejszczak
6948d92d13 [#184] Stopped overriding tags via messaging
fixes #184
2016-02-25 13:44:33 +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
7927f4914f Removed some package dependencies
* TraceKeys -> moved to root
    * TraceRunnable and TraceCallable moved to root
    * Websockets moved as a subpackage of messaging
    * created TraceMetricsAutoConfiguration in the metric package (thanks to this the TraeAutoConfiguration doesn't need any metric info)

    What’s left?
    * the remaining dependencies are related to everybody using events
    * there are a couple of usages of NeverSample
2016-02-22 17:09:23 +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
83d4986e48 Fix test with wrong asdsumption about null sampler 2016-02-04 13:24:09 +00:00
Dave Syer
9bfe364518 SamplerConfiguration -> SamplerProperties
Plus tidy up docs a bit
2016-02-02 16:15:35 +00:00
Dave Syer
70b18054e1 Add Span to Sampler method params
Also allows us to actually create a PercentageBasedSampler (I
don't think anyone tried it before) without resorting to
lazy beans and proxies.

Another freature added here is a default percentage sampler
if we know that spans need to be exported (zipkin or stream
is present).

Fixes gh-138
2016-02-01 17:00:00 +00:00
Dave Syer
39998a5def Ensure clients set X-Not-Sampled header for non-exportable Span
It also turns out that there's a bug in Spring MVC which makes an
empty header blow up in RequestHeaderMapMethodArgumentResolver
so we set the header to "true" instead of empty.

Fixes gh-136
2016-01-30 16:19:15 +00:00
Dave Syer
e2419d8cc0 Set default binding group name to "sleuth"
Can be changed by user with spring.sleuth.stream.group.

Fixes gh-134
2016-01-28 17:27:36 +00: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
Dave Syer
a3a15fb69e Use classpath*: to ensure all binders are located 2016-01-24 14:48:16 +00:00
Dave Syer
205d9c1a84 Move stream header environment properties to stream library 2016-01-24 11:25:31 +00:00
Marcin Grzejszczak
301c6b230a [#99] Basic Health Metrics
Changes following review
    - Reusing CounterService to automatically profit from Dropwizard if present
    - NoOp is the default impl for SpanReporterService
    - SpanReporterService has configurable metric names (it's enough to change the
    name to 'meter.a.b.c' to profit from Dropwizard's meters)

    Fixes gh-99
2016-01-21 15:55:26 +01:00
Dave Syer
689955a1f6 Add some javadocs for Sleuth{Source,Sink} 2016-01-21 14:00:36 +00:00
Dave Syer
7f58eab435 Make span collection thread safe in message source 2016-01-20 17:00:05 +00: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
Marcin Grzejszczak
797ca4f50c Removed Trace 2016-01-20 10:50:43 +01:00
Marcin Grzejszczak
6b88e97b9c TraceManager -> Tracer; startSpan -> startTrace 2016-01-19 09:02:09 +01:00
Marcin Grzejszczak
11c0846353 [#86] Removes the sampler param. Fixed #86 2016-01-18 17:06:09 +01: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
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