Commit Graph

801 Commits

Author SHA1 Message Date
Marcin Grzejszczak
642cf9d7a9 Updated docs 2016-11-10 15:41:03 +01:00
Marcin Grzejszczak
96df523557 Added baggage support (#440)
without this change there is no support for context propagation
with this change whenever you pass the `baggage-...` for http or `baggage_` for messaging headers then such a value will be propagated through your system

fixes #237
2016-11-10 15:36:47 +01:00
Marcin Grzejszczak
9ab37c34fa Wrapping ExecutorService in its own representation
without this change ExecutorService was treated as an Executor and wrapped in the Executor bean. Due to this the bean was missing / bean of invalid type was registered.
with this change we do not wrap ExecutorService with a Executor bean, instead we wrap it in a TraceableExecutorService representation.

fixes #445
2016-11-08 15:22:40 +01:00
Adrian Cole
840d30dd33 Fixes MessagingApplicationTests 2016-11-07 07:29:31 -08:00
Adrian Cole
5e4bf0a2e3 Fixes ZipkinMessageListenerTests 2016-11-07 07:10:18 -08:00
Adrian Cole
77e9328e12 Ensures Span.timestamp/duration are not reported on remote spans
This ensures spans that have remote set to true don't send
Span.timestamp/duration.

In the RPC span model, the client owns the timestamp and duration of the
span. If we were propagated an id, we can assume that we shouldn't
report timestamp or duration, rather let the client do that. Worst case
we were propagated an unreported ID and Zipkin backfills timestamp and
duration.

See https://github.com/openzipkin/openzipkin.github.io/issues/49
2016-11-07 06:59:17 -08:00
Marcin Grzejszczak
2ab2eb1747 Polish 2016-11-06 20:03:44 +01:00
Christoffer Sawicki
3b14e6a1f7 Allow TraceWebAutoConfiguration to work without Web MVC
Fixes #436
2016-11-06 20:03:34 +01:00
Adrian Cole
84b066970a Updates to zipkin 1.14.4 (#441)
* Support for MySQL 5.7 with SQL_MODE=ONLY_FULL_GROUP_BY
* Includes support to store 128-bit trace ID (not yet implemented here)

See https://github.com/openzipkin/b3-propagation/issues/6
2016-11-06 19:38:46 +08:00
Marcin Grzejszczak
9291af89cf Updated docs 2016-11-06 12:31:03 +01:00
Marcin Grzejszczak
e5dce64d71 Added a test for tracing the tracer 2016-11-06 10:06:17 +01:00
Marcin Grzejszczak
718a62ba5b Fixed the missing sampled flag for sleuth stream messages
without this change your message broker will explode due to number of message:sleuth messages
with this change it gets fixed
2016-11-06 09:28:58 +01:00
Marcin Grzejszczak
6f24c8866c Polish 2016-11-04 13:09:36 +01:00
Marcin Grzejszczak
83012a5aa6 Text map introduction (#439)
without this change we had to treat every mean of injecting and extracting span information separately
with this change all means of communications are abstracted. That way you configure things once only.

part of #237
2016-11-04 12:23:14 +01:00
Marcin Grzejszczak
43ae6dd7e3 Updated docs whitelisted branches 2016-11-02 14:13:54 +01:00
Marcin Grzejszczak
69521f37f0 Updated version to 1.2.0 2016-11-02 13:58:40 +01:00
Marcin Grzejszczak
1eefc4c4b3 Ensuring that disabling of modules work
without this change when you disable Sleuth web client the context fails to load
with this change it's working fine. We've moved beans around + the async web client will be turned off automatically if the sync one is also disabled

fixes #433
2016-11-02 12:39:12 +01:00
Marcin Grzejszczak
5e5338869c Added error tag upon exceptions (#435)
without this change there's no error colouring on Zipkin side
with this change we set error tags
- whenever there is an exception thrown on the server side (5xx)
- wheneber on the client side it's impossible to send a message

fixes #384
2016-10-31 13:22:22 +01:00
Marcin Grzejszczak
067242288f Providing examples of how to work with executors
without this example it might be misleading for users how to work with callables and custom executors.
with this example we're showing both the case when you're using a custom executor (in this case you just have to register it as a bean and then use that bean in your callable); and also we show an example of how to reuse the taskScheduler one (it's enough to wrap it with LazyTraceExecutor).

fixes #423
2016-10-28 09:57:16 +02:00
Marcin Grzejszczak
ec3a94b8c5 Updated docs with percentage information
without this change the percentage value might have been set to over 1.0
with this change we explain what are the valid values and what are the reasons for keeping the value as it is

fixes #397
2016-10-27 14:07:07 +02:00
Biju Kunjummen
92cdb8817b Issue 424 - Documentation for adding trace/span headers to http response (#429) 2016-10-27 13:42:48 +02:00
Marcin Grzejszczak
8794971bfe Increased level of TOC 2016-10-20 12:21:09 +02:00
Marcin Grzejszczak
14236cfd97 Propagating exceptions in trace filter
without this change any exception occurring while creating a span will be swallowed.
with this change we're propagating the exception so that it gets handled properly.

fixes #426
2016-10-18 16:23:32 +02:00
Marcin Grzejszczak
17f68f80fd Failure in extracting headers results in new span
without this change if the users sends invalid headers then exceptions are thrown.
with this change extractors catch the exception, log it and then a new span is created. That of course will lead to an invalid trace graph cause a new trace will be created but at least business apps will not be broken due to an issue in instrumentation.

fixes #425
2016-10-18 14:42:47 +02:00
Spencer Gibb
68c582d5cc Merge pull request #418 from dstine/docs
fix small typo
2016-10-13 11:37:58 -04:00
Marcin Grzejszczak
6642a369bc Not throwing an exception when queue size is exceeded
without this change when queue size of spans is exceeded for Stream span propagation, an exception is thrown that terminates business logic processing
with this change we're not propagating the exception - we're incrementing the dropped spans counter

fixes #421
2016-10-11 15:24:48 +02:00
Dave Syer
825ea0ce31 Ensure lifecycle callbacks are applied to delegate
When wrapping a ThreadPoolTaskExecutor in a bean postprocessor
we should take care that the delegate gets the lifecycle callbacks
from the container. Otherwise when it is first used, the thread pool
will not have been initialized, resulting in an exception.

(Can't believe this ever actually worked)
2016-10-10 13:45:03 +01:00
Dave Syer
0e43466b91 Ensure message headers are still mutable after interceptor is called
Some components in Spring assume (perhaps wrongly) that a channel
interceptor will not convert a mutable message into an immutable
one, and they continue to modify the headers dowstream. We can
dosge the issue of whether this is right or wrong by keeping the
message headers mutable, just in case.

It would probably be better to refactor the SpanInjector so that
it works with something other than the MessageBuilder, but we can
defer doing that in favour of this smaller change that works.

Adds a test for mutability. Also tested with the
gs-messaging-stomp-websocket guide from spring.io.

Fixes gh-276
2016-10-10 13:44:46 +01:00
Dan Stine
d30fcd5201 fix small typo 2016-10-08 21:26:36 -04:00
Adrian Cole
b2df9844db 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:05:20 +08:00
Marcin Grzejszczak
4a3b346888 Fixed race condition in tests 2016-10-04 14:31:15 +02:00
Marcin Grzejszczak
31cec3fc79 Fixing ConcurrentModificationException 2016-10-04 14:04:03 +02:00
Marcin Grzejszczak
baad8c404a Wrapping all Executors and ThreadPoolTaskExecutors
without this change there was a gap in passing tracing info to executors.

With this change the Executors are wrapped in LazyTraceExecutor and ThreadPoolTaskExecutors are wrapped in their tracing representation too

fixes #410
2016-10-04 13:50:31 +02:00
Marcin Grzejszczak
155d6aed7c Updating mvnw for all projects 2016-09-19 19:31:57 +02:00
Adrian Cole
60cdafc1bc Updates to adjust for reporter metrics drift (#411) 2016-09-19 22:14:43 +08:00
Marcin Grzejszczak
8a6664c065 Updating mvnw for all projects 2016-09-19 14:19:08 +02:00
Dave Syer
b8b2a6cc17 Move unnecessary dependencies up a level 2016-09-19 12:04:59 +01:00
Marcin Grzejszczak
123c2c7e87 Updating mvnw for all projects 2016-09-19 12:47:31 +02:00
Marcin Grzejszczak
ae06079bdc Updating mvnw for all projects 2016-09-15 16:13:46 +02:00
Adrian Cole
12b488b130 Tolerate reads of 128 bit X-B3-TraceId (#408)
The first step of transitioning to 128bit `X-B3-TraceId` is tolerantly reading 32 character long ids by throwing away the high bits (any characters left of 16 characters). This allows the tracing system to more flexibly introduce 128bit trace id support in the future.

Ex. when `X-B3-TraceId: 463ac35c9f6413ad48485a3953bb6124` is received, parse the lower 64 bits (right most 16 characters ex48485a3953bb6124) as the trace id.
2016-09-15 21:12:33 +08:00
Adrian Cole
91e506ce35 Reroutes HttpZipkinSpanReporter to use zipkin.reporter.AsyncReporter (#407)
AsyncReporter is a more robust version of what we were doing before.
Notably, it can give a memory threshold instead of span count for the
backlog. This change ports to use AsyncReporter internally.

See https://github.com/openzipkin/zipkin-reporter-java#asyncreporter
2016-09-15 21:03:28 +08:00
Marcin Grzejszczak
f00585a7d4 Added more explicit Tracer explanation
without this change it could be nonclear where Tracer comes from and how you can use it.

With this change hopefully it get properly explained

fixes #402
2016-09-13 14:35:11 +02:00
Marcin Grzejszczak
4c3ca67235 Simplified TraceZuulHandlerMapping
without this change we were wrapping the ZuulHandlerMapping in its tracing representation.

with this change we are simplifing that by adding interceptors

fixes #399
2016-09-13 10:22:30 +02:00
Marcin Grzejszczak
9ebd9184ca Feign fixes
it turned out that some of the tests were leaky and didn't catch that ExceptionUtils were throwing an exception (race condition with Hystrix). That was due to the fact that When Hystrix with Feign were doing retries the RequestInterceptor wasn't called. That means that a new span wasn't created but a parent span was closed.

With this change the only place where the span creation and closing takes place is TraceFeignClient. I removed the Feign RequestInterceptor. Now whenever there is a retry - a new span is created and closed after getting a response. There are no exceptions, special cases etc.

In addition to that since Feign is fully immutable and SpanInjector is by design made to mutate objects I had to wrap the immutable Request in an AtomicReference in order to change the contents of the Request. I'm ashamed but didn't have a better idea. Since that is packaged scope nobody should every see that (outside the package of course)
2016-09-08 22:27:46 +02:00
Marius Bogoevici
bd8b64a5b9 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:56:29 +02:00
Marcin Grzejszczak
a9b4cbcfe6 TraceLoadBalancerFeignClient not closing span
when TLBFC is throwing an exception the span wasn't closed. Throwing exception can occurr when IOExcepiton is thrown. Then the span wouldn't be closed and the whole series of problems occur.

fixes #393
2016-09-08 15:08:01 +02:00
Marcin Grzejszczak
ea05343137 Fixed wrapping the wrapper 2016-09-08 13:03:40 +02:00
Marcin Grzejszczak
c26a722ced Reverting the feature 2016-09-08 12:19:30 +02:00
Marcin Grzejszczak
062aba6ec1 Trying to make it work 2016-09-08 12:08:51 +02:00
Marcin Grzejszczak
9d6a45fb43 Trying to fix the build 2016-09-08 11:56:46 +02:00