Commit Graph

41 Commits

Author SHA1 Message Date
Marcin Grzejszczak
899410a2b0 Updated copyrights 2021-02-25 15:24:10 +01:00
Marcin Grzejszczak
de33b91739 Upgraded copyrights 2021-02-25 12:43:46 +01:00
Marcin Grzejszczak
6e306e594d Abstract tracer implementations via an API (#1757)
Spring Cloud Sleuth currently is an autoconfiguration over Brave. It also consists of various instrumentation mechanisms for libraries that are not supported by Brave (e.g. Spring Cloud Circuitbreaker).

We would like to abstract Brave so that Spring Cloud Sleuth becomes an autoconfiguration for any tracer implementation that is compatible with Spring Cloud Sleuth. That way Spring Cloud Sleuth in its core module would consist of an API and various tracer implementations would implement that API which would also allow automatic instrumentation of libraries that are supported by Spring Cloud Sleuth.

## OpenTelemetry Support

Thanks to doing this abstraction we are able to support new tracer implementations, not only Brave. We've decided to add support for the OpenTelemetry SDK as the second one. If in the future if we decide to add new tracers then it will be just a matter of adding a new module that bridges to the Spring Cloud Sleuth one. Thanks to abstraction of tests as well we will be easily able to plug that tracer mechanism into our current suite of tests.
2020-10-23 08:50:23 +02:00
buildmaster
05461159eb Bumping versions 2020-09-17 05:29:17 +00:00
Marcin Grzejszczak
bd149ce4a7 Improvement with Reactor instrumentation
- adds Spring Cloud Function instrumentation
- adds Operators to manually provide instrumentation for Fluxes
- introduces Manual instrumentation mode for Reactor

TODO: Documentation (will add it soon)

related gh-1684
2020-07-21 19:06:55 +02:00
Adrian Cole
b92db4ce51 Stops propagating Sleuth 1.x spring-messaging headers
To reduce confusion and overhead, the following custom spring-messaging headers added in Sleuth 1.0 are no longer sent, and a log warning is issued once if they are by outside code.

* spanId
* spanSampled
* spanParentSpanId
* spanTraceId
* spanFlags

Sending the above headers actually increases the headers by up to 10 because they are duplicated in the "native" part of messages. This overhead is extreme especially if messages never leave the process.

The solution is to only send [b3 single format](https://github.com/openzipkin/b3-propagation#single-header), which has been in sleuth since 2.0 and is compatible with JMS. The B3 single format is always parsed and takes precedence, even if multiple headers are sent, so this is a safe change.

Note: Unlike RPC, messaging spans never join with their parent. Better performance is achieved by not propagating the producer's parentId downstream.

Note: Deprecated spring-messaging headers such "spanTraceId" as are still read in Sleuth 3.x. However, they will not be at some point in the future. Please pay attention to the log messages and update your code if you are accidentally using them.
2020-04-07 10:58:49 +08:00
Spring Operator
8e51934e9e URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 338 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-21 13:16:37 -05:00
Marcin Grzejszczak
f044c07f67 NPE guard for null response; fixes gh-1224 2019-02-28 15:28:42 +01:00
Marcin Grzejszczak
b4174ffa82 Trying to make tests less brittle 2019-02-27 16:02:25 +01:00
Marcin Grzejszczak
2f7cf78614 Applied checkstyle 2019-02-07 16:41:59 +01:00
Marcin Grzejszczak
9b2def2be1 Improved span passing for NettyClient.
without this change the child span has a wrong parent span id
2018-11-02 13:31:43 +01:00
Marcin Grzejszczak
aa2a0209de Brought back netty-client instrumentation; fixes gh-1080 2018-11-02 11:34:55 +01:00
Marcin Grzejszczak
99d38afc69 Fixed a lot of checkstyle warnings' 2018-10-01 12:29:33 +02:00
Marcin Grzejszczak
6b3593660f Updated copyrights, fixed zuul 2018-01-31 10:56:48 +01:00
Marcin Grzejszczak
7eb374b5a5 Sleuth now uses Brave (#829)
with this pull request we have rewritten the whole Sleuth internals to use Brave. That way we can leverage all the functionalities & instrumentations that Brave already has (https://github.com/openzipkin/brave/tree/master/instrumentation).

Migration guide is available here: https://github.com/spring-cloud/spring-cloud-sleuth/wiki/Spring-Cloud-Sleuth-2.0-Migration-Guide

fixes #711 - Brave instrumentation
fixes #92 - we move to Brave's Sampler
fixes #143 - Brave is capable of passing context
fixes #255 - we've moved away from Zipkin Stream server
fixes #305 - Brave has GRPC instrumentation (https://github.com/openzipkin/brave/tree/master/instrumentation/grpc)
fixes #459 - Brave (openzipkin/brave#510) & Zipkin (openzipkin/zipkin#1754) will deal with the AWS XRay instrumentation
fixes #577 - Messaging instrumentation has been rewritten
2018-01-19 22:45:47 +01:00
Marcin Grzejszczak
8ba607c7a4 Trying to limit flakey tests 2017-11-17 11:37:17 +01:00
Adrian Cole
bfe15ab0cd Misaligns Zipkin v1 from sharing the same version number as v2 (#760)
This does two things: ensures samples don't use Zipkin v1 in any way,
and misaligns the version numbers of zipkin v1 and zipkin v2 apis.

This is an attempt to walk around the gradle plugin issue, which only
exists when someone is using both versions of zipkin.

See https://github.com/spring-projects/spring-boot/issues/10778
2017-10-27 17:29:45 +03:00
Marcin Grzejszczak
b83caf4ac0 Polish 2017-08-25 11:52:14 +02:00
Marcin Grzejszczak
92d7c3443a Bumped libraries
awaitillity to 3.0.0
 wiremock to 2.6.0
 junit params to 1.1.0
 assertj to 3.8.0

fixes #620
2017-06-27 15:05:39 +02:00
Marcin Grzejszczak
98c99db209 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-27 15:47:16 +02:00
Marcin Grzejszczak
05e221ef54 HTTP filter child span renamed
with this change the child span of the HTTP filter span gets changed into a span coming from the Controller aspect. The name of the span becomes the name of the method.
2016-06-23 13:24:16 +02:00
Marcin Grzejszczak
dc22434e27 More refactoring 2016-02-22 19:04:37 +01:00
Marcin Grzejszczak
08c99667c9 [#127] Added tests for parent-id propagation
fixes #127
2016-02-22 12:03:16 +01:00
Marcin Grzejszczak
c0620c410c [#160] Removed unnecessary Slf4j loggers
fixes #160
2016-02-18 11:23:09 +01:00
Marcin Grzejszczak
ee8d7a54c7 Delomboking 2016-02-10 19:09:20 +01:00
Dave Syer
9aeb399f7e Make SpanContextHolder package private
That way it can't leak back out into public classes, particularly
in intrumentation. Such use cases should use TraceAccessor or
Tracer exclusively.
2016-02-05 06:33:40 +00:00
Marcin Grzejszczak
8258289550 [#128] Added an integration test 2016-01-22 13:24:42 +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
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
Dave Syer
687ef45e6d Further simplify integration tests for zipkin-stream
It's not really necessary to use rabbit, but the existing tests
weren't really using the stream components at all because
zipkin spans were being collected by spring-cloud-sleuth-zipkin.
2016-01-14 09:12:36 +00:00
Marcin Grzejszczak
a4035f61db Refactored code, removed notion of DockerTests 2016-01-13 11:51:25 +01:00
Dave Syer
f204ed6d51 Fix compiler warnings 2016-01-12 17:45:13 +00:00
Marcin Grzejszczak
33fda076ad Updated with Adrian's changes 2016-01-12 16:28:21 +01:00
Marcin Grzejszczak
091a4fc218 Working Zipkin Stream tests 2016-01-12 15:40:42 +01:00
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
3084eab3eb [#89] Added test for zipkin integration 2016-01-11 17:38:24 +01:00
Marcin Grzejszczak
ff7e4ffa8a Fixed surefire and failsafe plugins setup, fixed docker tests 2016-01-11 10:53:20 +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