Commit Graph

130 Commits

Author SHA1 Message Date
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
Dave Syer
da60403321 Add message keys to TraceKeys
User can now configure message headers to be added using
spring.sleuth.keys.message.headers.

Fixes gh-119

Also a bunch of cosmetic changes (imports etc).
2016-01-19 13:40:35 +00:00
Dave Syer
fa5fab9175 Make TraceKeys configurable
User can now configure additional HTTP headers to tag via
spring.sleuth.keys.http.headers.

Fixes gh-118
2016-01-19 10:07:35 +00:00
Marcin Grzejszczak
6b88e97b9c TraceManager -> Tracer; startSpan -> startTrace 2016-01-19 09:02:09 +01:00
Adrian Cole
da065504a7 Merge pull request #115 from spring-cloud/pare-down-http
Pares down default http tags, but opens apis for adding more
2016-01-19 12:50:56 +08:00
Marcin Grzejszczak
11c0846353 [#86] Removes the sampler param. Fixed #86 2016-01-18 17:06:09 +01:00
Adrian Cole
860622fb57 Pares down default http tags, but opens apis for adding more
Previously, sleuth logged more data than necessary. This led to issues
including spans approaching megabytes each. This pares down default keys
to a minimal set, but allows users to opt-into logging more by extending
`TraceFilter`.
2016-01-18 21:48:59 +08:00
Marcin Grzejszczak
82ed9f78a1 [#106] Converted UUID to Long
- Changed Random instantiation to a shared Random
- Changed the name of the converter
- Changed generator into random
- Span id is now non-nullable.
    - it gets generated in the http filter if it's not there
    - it's generated in the spring-integration channels if it wasn't set
2016-01-18 14:38:09 +01:00
Marcin Grzejszczak
57d9e62a66 [#104] Refactoring the flickering test 2016-01-15 14:53:35 +01:00
Marcin Grzejszczak
c6b2369a45 [#84] Adding missing name to the filter. Fixes #84 2016-01-13 20:50:55 +01:00
Dave Syer
368d1ccae7 Rename some of the core API concepts
E.g. annotation -> tag, timelineAnnotation -> log

See gh-98
2016-01-12 17:39:58 +00: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
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
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
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
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
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
Spencer Gibb
cc36d6b8ad Added integration tests 2015-12-01 14:06:04 +00:00