Commit Graph

184 Commits

Author SHA1 Message Date
buildmaster
152a4326c4 Bumping versions 2021-09-28 17:33:44 +00:00
buildmaster
7e79c6c2bc Bumping versions 2021-05-05 17:28:51 +00:00
Marcin Grzejszczak
55586ac6fd Master -> main 2021-05-05 10:32:21 +02:00
buildmaster
02c00bb682 Bumping versions 2020-12-18 05:29:57 +00:00
Marcin Grzejszczak
4c3d12e639 Removed OTel (#1802) 2020-12-10 22:19:57 +01:00
Marcin Grzejszczak
efa3f2978d Migrating to Github actions 2020-11-30 15:56:59 +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
Marcin Grzejszczak
391059f824 Updated docs 2020-08-13 15:07:13 +02:00
Marcin Grzejszczak
b435d0eef9 Updated docs 2020-07-29 09:06:54 +02:00
buildmaster
cfaa0c711e Bumping versions 2020-07-29 05:29:08 +00:00
fpnuseis
5b98f79f92 Update reverted README.adoc for broken dependencies image link (#1698)
this commit is reverted at 946f5a8e85

relate #1676
2020-07-28 15:51:03 +02:00
buildmaster
946f5a8e85 Bumping versions 2020-07-10 05:29:09 +00:00
zianKazi
6163d95a14 Fix for Zipkin dependencies image link (#1676) 2020-07-09 11:48:13 +02:00
Marcin Grzejszczak
0ce00291b6 Updated adocs 2020-06-04 15:52:32 +02:00
buildmaster
9feba73fc4 Bumping versions 2020-06-03 05:33:16 +00:00
Marcin Grzejszczak
dde56c766d Merge branch '2.2.x' 2020-06-02 11:05:13 +02:00
Marcin Grzejszczak
ba73aa03d4 Updated links 2020-06-01 14:42:30 +02:00
buildmaster
4b961dcdf3 Going back to snapshots 2020-05-28 20:00:54 +00:00
buildmaster
fdf4c647df Update SNAPSHOT to 2.2.3.RELEASE 2020-05-28 19:57:31 +00:00
buildmaster
20280e896e Bumping versions 2020-05-23 05:29:13 +00:00
buildmaster
6764f06c53 Bumping versions 2020-04-24 05:29:04 +00:00
Adrian Cole
07baf87bdf Don't talk too much in the feature intro 2020-04-15 13:12:45 +08:00
Adrian Cole
1d9bcbad4f typo 2020-04-09 22:29:44 +08:00
Adrian Cole
da33366d8a fix indent 2020-04-09 22:12:24 +08:00
Adrian Cole
a4a33dec6f polish 2020-04-09 22:01:45 +08:00
Adrian Cole
3e809f0ba1 attempt to fix numbers 2020-04-09 20:58:20 +08:00
Adrian Cole
d4472fb0f0 fix bad link 2020-04-09 19:45:56 +08:00
Adrian Cole
8bcffe6f0b Overhauls documentation to focus on what sleuth does (#1614)
While some overview is important, the direct implementation details of tracing
not only drifted since Sleuth 1.x, but also caused a complaint #1466

This deletes most documentation that applies to an abstraction lower than sleuth
and reworks existing docs to focus on features it enables. By doing so, we have
less to maintain and users will have a clearer idea about the relationship
between Sleuth, Zipkin and Brave. Also important is this uses updated screen
shots and is in general less cluttered than before.

Note: the relationship between Sleuth and Brave was already redone in #1603
Note: this also removes the pws app which is usually broken or out of date.

Fixes #1466
2020-04-09 19:38:48 +08:00
buildmaster
a1b2595aa8 Bumping versions 2020-04-08 05:30:05 +00:00
Adrian Cole
2c4f787dee fixes drift made in version bump 2020-04-08 10:17:07 +08:00
buildmaster
37645fbf9d Bumping versions 2020-04-07 05:29:02 +00:00
Adrian Cole
01e0c97838 doc drift 2020-04-07 08:54:40 +08:00
Adrian Cole
44a7f4b7ad Reorganizes code under o.s.c.sleuth.baggage
This moves code and properties under org.springframework.cloud.sleuth.baggage
Properties are now under "spring.sleuth.baggage"

Those coming from 2.x should migrate with the following:
 * spring.sleuth.baggage-keys -> `BaggagePropagationCustomizer`
 * spring.sleuth.local-keys -> spring.sleuth.baggage.local-fields
 * spring.sleuth.propagation-keys -> spring.sleuth.baggage.remote-fields
 * spring.sleuth.propagation.tag.whitelisted-keys -> spring.sleuth.baggage.tag-fields
 * spring.sleuth.log.slf4j.whitelisted-mdc-keys -> spring.sleuth.baggage.correlation-fields
 * spring.sleuth.log.slf4j.enabled -> spring.sleuth.baggage.correlation-enabled

Those using MDC should know that for performance reasons, we no longer
set the following fields: `parentId` `spanExportable`.

We also do not set fields to "dirty" by default. Doing this by default
raised the overhead substantially, especially in reactive applications.

Those who want sleuth to override manual `MDC.put` operations as
described in #1416, or with to add back `parentId` `spanExportable` need
to define their own bean:

Ex. this is the former setup:

```java
@Bean CorrelationScopeDecorator oldConfig(List<String> myFieldNames) {
	CorrelationScopeDecorator.Builder builder = MDCScopeDecorator.newBuilder().clear()
			.add(SingleCorrelationField.create(BaggageFields.TRACE_ID))
			.add(SingleCorrelationField.create(BaggageFields.PARENT_ID))
			.add(SingleCorrelationField.create(BaggageFields.SPAN_ID))
			.add(SingleCorrelationField.newBuilder(BaggageFields.SAMPLED)
					.name("spanExportable").build());

        // Set all fields dirty, so that any changes made by MDC directly are reverted.
	for (String name : myFieldNames) {
		builder.add(SingleCorrelationField.newBuilder(BaggageField.create(name))
				.dirty().build());
	}
	return builder.build();
}

```
2020-04-06 23:06:10 +08:00
Adrian Cole
f01a65b035 Deprecates spring.sleuth.baggage-keys property (#1605)
The `spring.sleuth.baggage-keys` property assigned two headers for each
baggage. This causes unnecessary overhead and can be accomplished in another
way now:

```java
public class MyCode {
  static final BaggageField USER_ID = BaggageField.create("userId");

  @Autowired CurrentTraceContext currentTraceContext;

  @Nullable
  public String currentUserId() {
    return USER_ID.getValue(currentTraceContext.get());
  }

}

// In your @Configuration type, if you want to map multiple prefixes...
@Bean
BaggagePropagationConfig userIdBaggageConfig() {
  return SingleBaggageField.newBuilder(MyBaggage.USER_ID)
      .addKeyName("baggage-userId")
      .addKeyName("baggage_userId")
      .build();
}
```
2020-04-06 19:40:17 +08:00
Adrian Cole
3ac524c7e3 Renames spring.sleuth.propagation-keys to remote-keys (#1604)
spring.sleuth.local-keys and spring.sleuth.remote-keys make sense
together, especially as baggage-keys will be removed.
2020-04-06 18:06:40 +08:00
buildmaster
8d72c4a08d Bumping versions 2020-04-05 05:28:37 +00:00
Adrian Cole
5e1f7f9c0c Merge branch '2.2.x' 2020-04-04 14:39:36 +08:00
Marcin Grzejszczak
7b420a98e6 Updated Sleuth docs with attaching docs zip 2020-04-01 10:20:12 +02:00
buildmaster
9faade028b Bumping versions 2020-04-01 05:29:11 +00:00
Marcin Grzejszczak
a7858671d6 Fixed the build 2020-03-31 13:43:31 +02:00
buildmaster
5dd714da5c Going back to snapshots 2020-03-04 16:59:42 +00:00
buildmaster
151218b30a Update SNAPSHOT to 2.2.2.RELEASE 2020-03-04 16:57:41 +00:00
buildmaster
b34e04666d Bumping versions 2020-02-20 05:29:30 +00:00
Marcin Grzejszczak
0d237b564f Removed deprecated apis; fixes gh-1564 2020-02-18 13:30:00 +01:00
Marcin Grzejszczak
9c93d678d0 Removed Hystrix from docs 2020-02-12 11:18:31 +01:00
Adrian Cole
8a4002d288 Cleanups of build including upgrade of Brave (#1530)
In efforts to dig deep into benchmarks, I noticed we were a bit out of
date on Brave. Then, noticed some other artifacts could be bumped
safely. Finally, a find/replace on http/https was over zealous and
tripped up XML.

One change to test expectations and Brave is explained here:
https://github.com/openzipkin/brave/blob/master/instrumentation/RATIONALE.md#calling-spanfinish-while-the-context-is-in-scope
2020-01-22 19:31:50 +08:00
Adrian Cole
8866b84906 Cleanups of build including upgrade of Brave (#1530)
In efforts to dig deep into benchmarks, I noticed we were a bit out of
date on Brave. Then, noticed some other artifacts could be bumped
safely. Finally, a find/replace on http/https was over zealous and
tripped up XML.

One change to test expectations and Brave is explained here:
https://github.com/openzipkin/brave/blob/master/instrumentation/RATIONALE.md#calling-spanfinish-while-the-context-is-in-scope
2020-01-21 09:44:08 +01:00
buildmaster
4af5e18179 Bumping versions 2020-01-14 05:30:32 +00:00
Marcin Grzejszczak
81c2b8822b Fixed unresolved elements 2019-10-23 15:50:07 +02:00