without this change an explicit new span is created on the server side. Its name is equal to the method name of the controller. It introduces some nice advantages in terms of readability of trace.
with this change we're continuing a previous span on the server side. We're attaching the tags and logs to that span with information about controller class and controller name. Also events related to start and finish of the controller are there.
fixes#471#469#427
With this change we change the approach to continue spans (if they already exist) instead of starting new ones. The RPC spans would still be generated but Hystrix, Async, Callables / Runnables will reuse an existing span if there is one.
the scenarios are as follows:
Assuming that we have a trace X with span Y
* if you used tracer.wrap(Callable) or trace.wrap(Runnable) then:
* previously you'd get a span Z created when the Callable / Runnable is executed
* with this change you'll continue the span Y
* if you used a HystrixCommand then
* previously you'd get a span Z together with added tags when the command got executed
* with this change you'll continue the span Y and the tags will be added to span Y
* if you used a ExecutorService then
* previously you'd get a span Z together with added tags when a method from ExecutorService got executed
* with this change you'll continue the span Y and the tags will be added to span Y
Assuming that there was no span then everything will work as previously.
In order to create a new span you just have to create it manually. Example of creating a new span for an `@Async` annotated method.
```
// obviously you should inject via constructor ;)
@Autowired Tracer tracer;
@Async
public Future<String> foo() {
Span span = tracer.createSpan("newSpan");
try {
// do your stuff
} finally {
this.tracer.close(span);
}
}
```
fixes#174
Provides custom HTTP status codes support
without this change applications using custom HTTP status codes are currently having issues with Spring Cloud Sleuth. TraceFilter.httpStatusSuccessful() is throwing an IllegalArgumentException on HttpStatus.valueOf(response.getStatus()).
with this change that gets fixed
without this change tracing worked fine but the custom types were not registered as beans. Thus autowiring of them was not possible
with this change the bean post processor is removed and an aspect is used - that way tracing is still working fine but we don't interfere in bean registration
fixes#445
Here are the features relevant to sleuth
* MySQL support of 128-bit group-by
* don't stack overflow on json write bug
* more forgiving of IPv4-mapped addresses in json
This supports 128-bit traces via a new field traceIdHigh, which matches
other zipkin implementations. In encoded form, the trace ID is simply
twice as long (32 hex characters).
With this change in, a 128-bit trace propagated will not be downgraded
to 64-bits when sending downstream, reporting to Zipkin or adding to
the logging context.
This will be followed by a change to support initiating 128-bit traces.
Before, we were using variable encoding for trace and span identifiers.
This complicates search for those who are copy/pasting fixed-length IDs
provisioned upstream. This moves to standard formatting, while
maintaining tolerant reads.
The code added will also be used to support 128-bit (32 char) trace IDs.
Fixes#449
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
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
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
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
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
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
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
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
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
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
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
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)
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
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.
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