Commit Graph

147 Commits

Author SHA1 Message Date
Marcin Grzejszczak
c9bbc2e4a5 Bumping versions to 1.2.1.BUILD-SNAPSHOT after release 2017-04-11 10:18:41 +02:00
Marcin Grzejszczak
850534689c Going back to snapshots 2017-04-11 10:06:35 +02:00
Marcin Grzejszczak
fdace4f93a Update SNAPSHOT to 1.2.0.RELEASE 2017-04-11 10:03:04 +02:00
Marcin Grzejszczak
e68bc5e634 Going back to snapshots 2017-03-17 09:44:27 +01:00
Marcin Grzejszczak
760c1841b7 Update SNAPSHOT to 1.2.0.RC1 2017-03-17 09:39:16 +01:00
Marcin Grzejszczak
a266d8bc6c Ensured that we guard against negative ports
fixes #518
2017-02-15 13:57:25 +01:00
Marcin Grzejszczak
6d445f56f4 Going back to snapshots 2017-01-30 10:37:40 +01:00
Marcin Grzejszczak
adfaa036a2 Bumping versions before release 2017-01-30 10:31:39 +01:00
Adrian Cole
32d8ea8fc7 Updates to latest zipkin 1.19 (#495)
Most changes are not very interesting to sleuth, though the server is
quite a lot better with UI fixes galore. For sleuth mainly, small api
unaffecting glitch fixes around the Span.Builder.
2017-01-19 20:20:27 +08:00
Marcin Grzejszczak
c347f724cd Add an option to use the X-B3-Flags header to override any sampling decision
without this change it's pretty much impossible to enforce sampling for certain traces
    with this change setting the X-B3-Flags to 1 for HTTP messages / spanFlags to 1 for messaging will override any sampling decisions

    fixes #496
2017-01-18 13:12:13 +01:00
Marcin Grzejszczak
9785bcae15 Due to possible performance problems when DiscoveryClient gives nonexistent DNS name as local address Local endpoint is created from server properties by default.
Local Ip determined from spring.commons InetUtils.
    To enable local endpoint resolution via service discovery, DiscoveryClient must be present and 'spring.zipkin.service.locator.discovery' should be set to true.
    FallbackHavingEndpointLocator was caching and recreating EndpointLocator in the same time - removed the caching part.

    Fixes gh-403
2017-01-11 12:46:19 +01:00
Marcin Grzejszczak
5b442e9526 Adding the spring.instance_id tag
without this tag it's impossible to discern from which server was the given span originated
    with this change we're adding a tag in which we're passing the instance id value. The value can be taken either from Cloud Foundry or from a concatanation of some local properties like instance_id / application name / application port etc.

    fixes #369
2017-01-03 14:44:56 +01:00
Marcin Grzejszczak
225a2d4cbf Added property for overriding the service name in Zipkin
without this only either service discovery service id / spring.application.name can be chosen as a service name for zipkin
    with this change you can pass spring.zipkin.service.name property to change override that both for HTTP and Stream collectors

    fixes #324
2017-01-02 10:39:18 +01:00
Marcin Grzejszczak
d35cf2e74f Adding SA only if peer tag is present
without this change Zipkin doesn't properly visualize the span on the server side.
with this change we're setting SA only if peer tag is set.

fixes #481
2016-12-19 13:32:03 +01:00
Dave Syer
a0adcecba0 Update to Spring Boot 1.5 2016-12-12 12:52:21 +00:00
Marcin Grzejszczak
8c8c3e919b Continuing Spans (#461)
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
2016-12-07 11:18:13 +01:00
Adrian Cole
c596f3f1ae Propagates logs and reports 128-bit trace IDs (#452)
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.
2016-11-18 08:46:54 +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
69521f37f0 Updated version to 1.2.0 2016-11-02 13:58:40 +01: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
Adrian Cole
60cdafc1bc Updates to adjust for reporter metrics drift (#411) 2016-09-19 22:14:43 +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
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
Marcin Grzejszczak
2f93bd955a Added docs on how to provide custom serviceName
without this entry in the docs people got confused on how to do this.

fixes #346
2016-08-19 13:37:50 +02:00
Marcin Grzejszczak
a31a900542 Wraped debug logs with conditional 2016-08-17 13:58:22 +02:00
Marcin Grzejszczak
0f427cbeb9 Polish 2016-08-10 17:18:20 +02:00
Marcin Grzejszczak
11e520c70d Updating the duration setting (#360)
* Updating the duration setting

fixes #349
2016-07-29 23:29:31 +02:00
Marcin Grzejszczak
6b5fa63553 Exposes getAccumulatedMicros for more precise Span duration (#317)
Formerly, `Span.getAccumulatedMillis()` worked, but could returns
    imprecise measurements, particularly local spans. This changes the
    internals of Span to keep track of a start tick. Using this, it can
    return a more precise `Span.getAccumulatedMicros()`.

    To ensure this precision isn't lost in serialization, this adds a
    json field `durationMicros`, which is only set when the span is stopped.
    This is set instead of start tick because `System.nanoTime()` is JVM
    specific and so cannot be used across the network. `durationMicros` uses
    null instead of zero comparisons because nano time can be negative.

    Fixes #312

    Fixed integration tests to use ZipkinRule
    Introduce assertj assertions (#315)

    * Introduce assertJ assertions in some tests
    * Fix code formatting to be inline with Spring rules
2016-06-29 10:44:00 +02:00
Marcin Grzejszczak
9641d4ef98 Possibility to customize HTTP Client for Zipkin calls
* Added RestTemplate for Zipkin
* Added ZipkinRestTemplateCustomizer to allow possibility to customize RestTemplate
* Addded DefaultZipkinRestTemplateCustomizer with GZip compression interceptor
2016-06-28 12:11:40 +02:00
Marcin Grzejszczak
6456709020 Update to SNAPSHOT 2016-06-10 15:56:21 +02:00
Marcin Grzejszczak
8f726cb514 Update SNAPSHOT to 1.0.1.RELEASE 2016-06-10 15:38:37 +02:00
Dave Syer
fc29838b86 Update to 1.0.1 snapshots 2016-05-11 09:21:54 +01:00
Spencer Gibb
feeb8bda0c Revert "Update SNAPSHOT to 1.0.0.RELEASE"
This reverts commit 4b347228a3.
2016-05-10 15:27:39 -06:00
Spencer Gibb
4b347228a3 Update SNAPSHOT to 1.0.0.RELEASE 2016-05-10 15:21:44 -06:00
Adrian Cole
7da63b9ade Updates to zipkin 0.18
Relating to sleuth, this is mostly cosmetic with a kafka condition fix.

It might be of interest that `GET /api/v1/traces` no longer requires
parameters.

https://github.com/openzipkin/zipkin-java/releases/tag/0.18.0
2016-05-07 00:17:16 +08:00
Adrian Cole
2c33895f4a Updates to zipkin 0.17
Most notably includes the group id change
2016-05-05 17:56:44 +08:00
Dave Syer
c14f803363 Tidy up some dependencies
Removes wiremock as a test dependency in core (which created more
issues than you might expect because Tomcat and Jetty don't treay
HTTP headers in the same way apparently).

Also moves the spring-messaging dependency to where it is needed
in sleuth stream.
2016-05-04 11:23:03 +01:00
Marcin Grzejszczak
c9cdb7e4c3 Added missing conditionals 2016-04-22 11:35:35 +02:00
Dave Syer
7dc30191cc Revert to snapshots 2016-04-18 15:11:14 +01:00
Dave Syer
7b40b9808e Update to RC2 2016-04-18 15:09:54 +01:00
Marcin Grzejszczak
60cb5eb49c Removed docker compose
Removed docker compose and updated README

fixes #230
2016-04-04 14:40:22 +02:00
Adrian Cole
eaa008f933 Updates to zipkin 0.11
The only notable change for Sleuth is an artifact id change from
spanstore to storage.
2016-04-03 21:04:55 +08:00
Marcin Grzejszczak
184afe698d Added tests for exporting to Zipkin 2016-03-23 14:28:06 +01:00
Marcin Grzejszczak
e31edbd254 Revert to snapshots 2016-03-23 13:00:05 +01:00
Marcin Grzejszczak
51fd6f784f Bump for 1.0.0.RC1 2016-03-23 12:54:35 +01:00
Marcin Grzejszczak
9c66bed2bb Added missing check for exportable
fixes #224
2016-03-23 12:23:45 +01:00
Adrian Cole
4ffae5c1da Merge pull request #221 from spring-cloud/0.9.2
Updates to zipkin 0.9.3, which fixes a UI recursion bug
2016-03-22 17:25:51 +08:00
Adrian Cole
ac0049f836 Updates to zipkin 0.9.3 and fixes UI dependencies for scs-zipkin-stream 2016-03-21 22:37:23 +08:00
Marcin Grzejszczak
a0048a806e Polish 2016-03-21 14:58:30 +01:00
Adrian Cole
d662a4bf90 Updates to zipkin 0.9
Notably, this removes the "zipkin-web" dependency, as the UI is now
collocated on zipkin-server.

Other notable changes are Cassandra and Kafka support, as well removing
the Brave dependency.
2016-03-18 17:46:45 +08:00