Commit Graph

189 Commits

Author SHA1 Message Date
Marcin Grzejszczak
f772f50bbc Removed unnecessary field 2016-02-10 19:19:44 +01:00
Marcin Grzejszczak
0ab23b405c [#124] Added support for async rest template
fixes #124
2016-02-10 19:19:44 +01:00
Marcin Grzejszczak
ee8d7a54c7 Delomboking 2016-02-10 19:09:20 +01:00
Marcin Grzejszczak
8f5f553376 Removed unnecessary constructors 2016-02-10 12:17:44 +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
65c243178f Add explicit autoconfiguration support for STOMP and websockets
Adds channel interceptors to initiate a span on an incoming message
and also inject it into the thread context when it is handled
asynchronously.
2016-02-09 13:31:29 +00:00
Dave Syer
d6170027a7 Rationalize async instrumentation 2016-02-09 13:31:29 +00:00
Dave Syer
f59737c238 Remove TraceTemplate
Users should inject TraceAccessor if they want to interact with
the current Span.
2016-02-09 13:31:29 +00:00
Marcin Grzejszczak
51ff572fbe [#149] Removed the JSON Span logger
fixes #149
2016-02-09 12:50:09 +01:00
Marcin Grzejszczak
b4e85d04d8 [#148] Reseting the custom concurrency strategy before test class 2016-02-09 10:34:30 +01:00
Marcin Grzejszczak
ebfe276ced [#148] Resetting custom hystrix strategy before tests
fixes #148
2016-02-09 10:23:57 +01:00
Dave Syer
bc48a0094e Revert to snapshots 2016-02-05 10:02:47 +00:00
Dave Syer
203d9cc4f2 Update to 1.1.0.M5 2016-02-05 09:56:38 +00:00
Dave Syer
9aeb399f7e Make SpanContextHolder package private
That way it can't leak back out into public classes, particularly
in intrumentation. Such use cases should use TraceAccessor or
Tracer exclusively.
2016-02-05 06:33:40 +00:00
Dave Syer
ad97be2fa6 Remove remaining public accesses of SpanContextHolder
Hystrix is complex and the stacks get very deep. It turns out that
it is also rather stateful, so order of tests affects the outcomes.
Long story short: if you set the concurrency strategy it infects
other tests (like the TraecCommandTests), which then have to assert
slightly more carefully.
2016-02-04 17:22:10 +00:00
Dave Syer
7f975c0ff8 Remove redundant SpanContextHolder access in TraceFilter
The TraceFilter should clean up its own spans. It should never
need to use the SpanContextHolder directly.

There was a test that needed it inserted instead.
2016-02-04 13:28:22 +00:00
Dave Syer
3703452626 Guard against null sampler
If user passes in a null sampler we'll just asume it was the
default.
2016-02-04 13:28:09 +00:00
Dave Syer
ff08e3d518 Remove redunant method 2016-02-04 13:14:42 +00:00
Dave Syer
7f012ac02c Introduce SpanContext as internal detail of SpanContextHolder
The fact that a Span was active when a new one is created needs
to be recorded, but it doesn't seem to belong in the Span. However
the DefaultTracer can call other methods on the SpanContextHolder
and that's what this change does (with package private methods).

There are still some usages of the public methods in
SpanContextHolder which I'd like to stamp out as a separate issue.

Fixes gh-141
2016-02-04 12:30:25 +00:00
Dave Syer
e819881be8 Add test to assert auto close behaviour 2016-02-04 12:30:02 +00:00
Dave Syer
9bfe364518 SamplerConfiguration -> SamplerProperties
Plus tidy up docs a bit
2016-02-02 16:15:35 +00:00
Marcin Grzejszczak
055137bb72 [#50] Removed FRB.
fixes #50
2016-02-02 11:46:34 +01:00
Dave Syer
948d9e7886 Ensure sampled traces are exportable in test 2016-02-02 08:34:45 +00:00
Dave Syer
d8b72473d1 Ensure sampler is called with the new span if it is to be started 2016-02-01 18:01:34 +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
12620a4725 Fix NPE in TracePreZuulFilter
Fixes gh-135
2016-01-30 16:47:23 +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
4f3c731d37 Fix trace filter so async requests are handled properly
Previously, if a trace id came into the filter from the caller and
the controller was async, the span context was not properly managed
resulting in warnings in logs.

Fixes gh-137
2016-01-30 12:19:07 +00:00
Dave Syer
78365fe3c3 Fix test that fails because we asert a duration 2016-01-28 12:04:56 +00:00
Dave Syer
ab1fd1c234 Removes message propagating interceptor
Now that the span data is stored in a header it is safe to remove
the slightly clunky propagation implentation that used a subclass.

Also removed the Stomp* features because they were diverging from
the mainstream integration support and no-one seems to understand
why they are needed. If the original author of #96 can explain
why they were needed we can ask for a new PR to re-instate a version
that works with the new model.
2016-01-26 13:00:07 +00:00
Marcin Grzejszczak
2ef5ba2a80 Fixed checkstyle issues 2016-01-26 13:50:45 +01:00
Dave Syer
5e2c0e9bd4 Use Message headers to propagate span not thread local
Otherwise we can end up closing spans that we shouldn't, or not
closing ones that we should.
2016-01-26 12:43:27 +00:00
Marcin Grzejszczak
0fc2c1a809 [#132] Fixed closing of spans in messaging
fixes #132
2016-01-26 12:57:34 +01:00
Marcin Grzejszczak
0ff1cf92bd [#128] Added spans for messaging
fixes #128
2016-01-25 15:57:28 +01: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
d83e0dea3c Merge pull request #129 from spring-cloud/dots
Changes http key delimiter to dot and adds size keys
2016-01-24 17:57:01 +01:00
Dave Syer
205d9c1a84 Move stream header environment properties to stream library 2016-01-24 11:25:31 +00:00
Adrian Cole
9417110e90 Changes http key delimiter to dot and adds size keys 2016-01-23 17:28:12 +01: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
3a4554d8c1 Tidy up conditionals in trace autoconfig 2016-01-21 14:05:16 +00:00
Dave Syer
0bbd7cb70f Fix messaging and ribbon instrumentation for hex headers
It still feels brittle because it's up to the suthor of the
instrumentation. This patches all the places where we were still
using Long instead of Long.toHexString(..).

Fixes gh-125
2016-01-21 09:48:34 +00:00
Marcin Grzejszczak
10325e9547 Removed obsolete converter 2016-01-20 15:47:29 +01:00
Marcin Grzejszczak
72574f31ed Added comment with the difference between OpenTracing Span and Sleuth's Span 2016-01-20 14:53:16 +01:00
Marcin Grzejszczak
d22a497b0c TraceAccessor -> SpanAccessor 2016-01-20 14:39:08 +01:00
Marcin Grzejszczak
3c5625a9de Changed sampler method to be consistent with open tracing API
https://github.com/opentracing/opentracing-python/blob/master/example/zipkin_like/sampler.py#L36
2016-01-20 13:05:29 +01:00
Marcin Grzejszczak
2698e0b9c2 Added Redundant Imports rule for checkstyle 2016-01-20 12:55:19 +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
Marcin Grzejszczak
797ca4f50c Removed Trace 2016-01-20 10:50:43 +01:00
Adrian Cole
9bcab5b0c6 Updates to zipkin-java 0.4.3 2016-01-20 12:22:18 +08:00