Commit Graph

44 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
76ad931b42 Refactoring modules to be consistent with Spring Boot (#1784)
# Modules

* New modules: `spring-cloud-sleuth-autoconfigure`, `spring-cloud-sleuth-api`, `spring-cloud-sleuth-instrumentation`
  `spring-cloud-sleuth-core` removed and changed to `spring-cloud-sleuth-instrumentation` & `spring-cloud-sleuth-api`
* Removed `spring-cloud-starter-sleuth-otel`
  To add OpenTelemetry support you need to add `spring-cloud-starter-sleuth` (adds Brave by default), exclude Brave and add `spring-cloud-sleuth-otel` dependency
* Except for the tests, `spring-cloud-sleuth-autoconfigure` is the only module that can have access to `@Configuration`, `@ConfigurationProperties` classes.
Tests have been added to ensure such separation.

## Package moving

* `org.springframework.cloud.sleuth.api` -> `org.springframework.cloud.sleuth`
* `org.springframework.cloud.sleuth.brave.autoconfig` -> `org.springframework.cloud.sleuth.autoconfig.brave`
* `org.springframework.cloud.sleuth.otel.autoconfig` -> `org.springframework.cloud.sleuth.autoconfig.otel`
* `org.springframework.cloud.sleuth` -> `org.springframework.cloud.sleuth`
* Instrumentation: `org.springframework.cloud.sleuth.annotation` -> `org.springframework.cloud.sleuth.instrument.annotation`
* All the autoconfiguration classes were moved under `org.springframework.cloud/sleuth.autoconfig` package

## Global class modifications

* Any class registered as a bean is now public

## Classes

* `RateLimitingSampler` constructor changed
* Merged a lot of auto configuration classes into one (e.g. `BraveAutoConfiguration` now imports various other configurations)
* Renamed `TraceBraveAutoConfiguration` to `BraveAutoConfiguration`
* Renamed `TraceOtelAutoConfiguration` to `OtelAutoConfiguration`
* Removed all `NoOp` implementations of the API
2020-11-23 15:39:13 +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
Marcin Grzejszczak
3ce018bc51 Upgrades to JUnit5; fixes gh-1567 2020-03-03 19:53:57 +01: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
2f7cf78614 Applied checkstyle 2019-02-07 16:41:59 +01:00
Marcin Grzejszczak
99d38afc69 Fixed a lot of checkstyle warnings' 2018-10-01 12:29:33 +02:00
Marcin Grzejszczak
3f3f30c29e Fix 2018-08-30 19:11:55 +02:00
Marcin Grzejszczak
f9578a5b69 Please work 2018-08-30 15:54:08 +02:00
Marcin Grzejszczak
d4e81d5dbf Polish 2018-08-30 12:46:56 +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
Adrian Cole
df78812969 Fixes bad imports 2017-10-06 16:19:29 +08:00
Marcin Grzejszczak
c82c52b5ce Fixed some tests 2017-10-04 16:31:51 +02:00
Marcin Grzejszczak
db5e16f998 Merge branch 'master' into 2.0.x 2017-08-25 12:04:41 +02:00
Marcin Grzejszczak
b83caf4ac0 Polish 2017-08-25 11:52:14 +02:00
Marcin Grzejszczak
c2d9c4b94e Should be working 2017-06-02 19:57:37 +02:00
Dave Syer
a0adcecba0 Update to Spring Boot 1.5 2016-12-12 12:52:21 +00:00
Dave Syer
00b67a87d5 Remove @Bean RestTemplate
(If users need one they can add it themselves)

Fixes gh-239
2016-03-31 13:31:34 +01:00
Marcin Grzejszczak
e5b1495613 Simplified Tracer API 2016-03-04 11:50:59 +01:00
Marcin Grzejszczak
c0620c410c [#160] Removed unnecessary Slf4j loggers
fixes #160
2016-02-18 11:23:09 +01:00
Marcin Grzejszczak
8333c31c99 [#158] Removing span name
fixes #158
2016-02-16 08:28:22 +01:00
Marcin Grzejszczak
ee8d7a54c7 Delomboking 2016-02-10 19:09:20 +01:00
Marcin Grzejszczak
1b0c8dfee5 [#146] Introduced SpanName
- Added aspect to provide better naming for @Async

fixes #146
2016-02-09 15:25:36 +01:00
Marcin Grzejszczak
d22a497b0c TraceAccessor -> SpanAccessor 2016-01-20 14:39:08 +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
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
Dave Syer
6a8f23e185 Remove unnecessary configs from samples 2015-12-31 11:24:28 +00:00
Spencer Gibb
2d0ff8f436 polish 2015-12-10 10:33:21 -07: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
Dave Syer
4e21bf1b35 Add strategy EndpointLocator to help with service host/port location 2015-10-01 11:52:28 +01:00
Spencer Gibb
0f76427ebf add /messaging annotations 2015-08-21 12:03:11 -06:00
Dave Syer
0caa495fbb Add basic integration test to samples 2015-08-13 11:28:19 +01:00
Dave Syer
4df00755a5 Tidy up sample configs 2015-08-13 11:20:49 +01:00
Dave Syer
673d8cb0b8 Add integration sample and vanilla non-zipkin sample 2015-08-12 13:59:42 +01:00