Commit Graph

129 Commits

Author SHA1 Message Date
Adrian Cole
84d2706a57 Updates to latest zipkin and brave, removing Scribe dependency
Recent versions of zipkin and brave operate with http instead of scribe.
This changes the implementation accordingly, as well adds a sampler to
the POST endpoint.

A notable impact is that we no longer require a collector process, as
the zipkin server's POST endpoint is a collector.
2016-01-12 21:58:48 +08:00
Marcin Grzejszczak
877f401231 Unified test naming 2016-01-11 17:52:16 +01:00
Marcin Grzejszczak
4d3300aab6 Reverting the change with DirtiesContext 2016-01-11 12:02:56 +01:00
Marcin Grzejszczak
d038e7b0cb Trying to fix Hystrix stalling test 2016-01-11 11:58:23 +01:00
Marcin Grzejszczak
d8248d23c5 Added integration tests on integration profile 2016-01-08 23:28:10 +01:00
Marcin Grzejszczak
9a8dc17d8c [#89] Initial approach to the integration tests
- Fixed the tests
- Updated surefire
- Added integration tests (for the moment ignored)
- Fixed wrong surefire setup
2016-01-08 19:09:37 +01:00
Marcin Grzejszczak
ee9594ea96 Added missing TODO 2016-01-07 12:44:39 +01:00
Marcin Grzejszczak
3b6b49fc87 Added test for messaging template and sleuth 2016-01-07 12:43:19 +01:00
Marcin Grzejszczak
640ad4c6f7 [#85] Percentage Based Sampler implementation
fixes #85
- Updated maven setup to support jdk8 in tests
2016-01-06 10:26:13 +01:00
Marcin Grzejszczak
5a1f32c92c Refactored Channel Interceptor code to remove duplications 2016-01-04 16:37:03 +01:00
Marcin Grzejszczak
7ed53116fd Refactored Stomp Propagation Channel tests 2016-01-04 15:54:47 +01:00
Marcin Grzejszczak
04ea3c6b79 Refactored tests for STOMP 2016-01-04 15:33:52 +01:00
Marcin Grzejszczak
502b6b1f85 Merged Support for STOMP messages over websocket
- Merge branch 'master' of https://github.com/gauravrmazra/spring-cloud-sleuth into gauravrmazra-master
- Test scope removed for dependency. Needed for stomp message interceptor support
- Removed unused import from integration test
- Integration tests for TraceStompMessageContextChannelInterceptor
- Refactored code and added integration test for TraceStompMessageChannelInterceptor
- Fix for method which was not available in jdk1.7
- Fix build fail error due to new changes for stomp messages
- Support for STOMP messages over websocket
2016-01-04 10:16:12 +01:00
Dave Syer
55cd5afcb6 Catch exception in filter chain and use it to set status in span
When a controller throws an exception the servlet container will
eventually set the response status to 500, but it is still 200
generally when the filter chain finishes, unless we catch the
exception and do something with it.

Fixes gh-57
2015-12-31 13:38:16 +00:00
Dave Syer
75a5ba25fd Only add response headers once 2015-12-31 12:35:06 +00:00
Dave Syer
9bf19caf07 Add default log pattern for all apps
It goes in the defaultProperties source (appending to the existing
one if possible). That way user can override easily.

Fixes gh-87
2015-12-31 11:09:22 +00:00
Dave Syer
608135551f Add test for closing span hierarchy in message handler 2015-12-31 10:39:57 +00:00
Dave Syer
882e113c87 Close whole hierarchy at end of message interceptor
Just like in the TraceFilter (web) we need to close the parent
(remote) trace after the message has been processed.
2015-12-29 17:34:55 +00:00
Dave Syer
0df278c9af Export export flag via headers when needed
Prevents non-exportable spans from being propagated without knowing
their status.
2015-12-29 10:15:46 +00:00
Marcin Grzejszczak
7e8a483149 [#39] Refactored code according to the code review 2015-12-24 10:17:14 +01:00
Marcin Grzejszczak
980e3f2bd5 [#39] Introduced custom Sleuth assertions 2015-12-24 09:50:10 +01:00
Marcin Grzejszczak
6f71402cf9 [#39] Fixed naming and added dependency between hystrix components 2015-12-23 18:50:50 +01:00
Marcin Grzejszczak
6ecfbca6ed [#39] Initial approach to Hystrix concurrency strategy 2015-12-23 18:08:09 +01:00
Marcin Grzejszczak
aaa00a9754 [#75] Working implementation of Hystrix + Feign + Sleuth. Fixes #75 2015-12-23 09:43:04 +01: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
Spencer Gibb
2d0ff8f436 polish 2015-12-10 10:33:21 -07:00
Spencer Gibb
2f35fc7966 polish 2015-12-10 10:11:26 -07:00
Marcin Grzejszczak
ecf7c446a7 Refactored code according to the review 2015-12-10 17:16:32 +01:00
Marcin Grzejszczak
c1eb04b68a Fixed Travis script for branches
Added test to ensure that traces are cleared, added fix for Hystrix commands
2015-12-02 19:03:24 +01:00
Marcin Grzejszczak
ad8ba1529f Added test for TraceTemplate 2015-12-02 13:38:01 +01:00
Marcin Grzejszczak
74c7ba54d0 Fixed tests for TraceWebAspect, added WebTask aspect 2015-12-02 13:28:46 +01:00
Dave Syer
70708e22a1 Remove trace from current thread in thread pool
The TraceManager.detach() method should be called by wrapper
tasks submitted to background threads. This change fixes it
in TraceCallable and TraceRunnable. Possibly still some work
to do for Hystrix.

The "detached" flag didn't seem to be doing anything, so I
removed it in the process.

Fixes gh-64, fixes gh-61
2015-12-02 07:58:46 +00:00
Dave Syer
5a9757fede Add additional tests for null thread local in thread pools
Fixes gh-64, probably also gh-61
2015-12-02 07:01:54 +00:00
Dave Syer
327ef60d9e Fix @Ignored test 2015-12-01 17:42:40 +00:00
Dave Syer
192964751a Normalize usage of IdGenerator (only in TraceManager)
Also ensures TraceFilter sends traceId and spanId in response if
they are generated in the request.

Fixes gh-65
2015-12-01 17:08:45 +00:00
Dave Syer
fcb12c8f5e Switch to Spring Core IdGenerator 2015-12-01 16:44:48 +00:00
Marcin Grzejszczak
c0e5c865dd Added tests for trace callable and runnable 2015-12-01 16:03:07 +01:00
Marcin Grzejszczak
ac9ef5f740 Added random port for integration tests 2015-12-01 15:16:57 +01:00
Marcin Grzejszczak
4a1743c984 Moved to BDDAssertJ 2015-12-01 15:13:56 +01:00
Spencer Gibb
cc36d6b8ad Added integration tests 2015-12-01 14:06:04 +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
Spencer Gibb
8351c9ba2c polish 2015-11-30 13:17:32 -07:00
Gaurav Rai Mazra
c588d73552 Providing support to enable tracing in Executors
User can opt to wrap java.unit.concurrent package usage with a
traceable version of the same thing.

Fixes gh-60, fixes gh-58
2015-11-30 09:34:24 +00:00
Dave Syer
7d3668b23f Revert to snapshots 2015-11-17 12:36:46 +00:00
Dave Syer
576424a514 Update to 1.0.0.M3 2015-11-17 12:34:31 +00:00
Spencer Gibb
d58a3241f2 Don't trace /hystrix.stream 2015-10-19 15:48:14 -06:00
Dave Syer
1d8d5a0956 Fix null span bug in Zuul filter
If a request is not being sampled, the ClientReceivedEvent should
not be fired.

Fixes gh-47
2015-09-28 07:47:38 +01:00
Marcin Grzejszczak
e9b27e6a49 Removed ConditionalOnMissingBean. Fixes #42 2015-09-21 20:02:46 +02:00
Dave Syer
c786f81086 Fix rest template interceptors (workaround for Boot) 2015-09-21 11:59:03 +01:00
Dave Syer
9612f66754 Drop back to snapshot 2015-09-10 09:02:53 +01:00