Commit Graph

1593 Commits

Author SHA1 Message Date
Marcin Grzejszczak
0f458b03ee Making Redis tracing lazy; fixes gh-1756 2020-12-10 11:41:48 +01:00
Marcin Grzejszczak
b3051a136a Passing a copy of headers - otherwise ConcurrentModificationException may happen
fixes gh-1184
2020-12-09 14:57:00 +01:00
Marcin Grzejszczak
68497e0c51 Guarding context retreval; fixes gh-1789 2020-12-04 11:46:14 +01:00
Marcin Grzejszczak
5ad9108de9 Added missing javadocs 2020-12-03 17:18:37 +01:00
Marcin Grzejszczak
3f0cb2ffaa Adds MessageSpanCustomizer to customize message spans
fixes gh-1772
2020-12-03 14:02:55 +01:00
Marcin Grzejszczak
f50fb221a7 Added broker information basing on the binders in spring cloud stream
fixes gh-1711
2020-12-01 19:54:17 +01:00
Marcin Grzejszczak
f40cbf85a0 Not doing assertions for ReactorSleuth; fixes gh-1712 2020-12-01 16:05:48 +01:00
Marcin Grzejszczak
55440c641e Ensures that all Lazy components are resolving any beans when context is running
fixes gh-1750
2020-12-01 15:13:58 +01:00
Marcin Grzejszczak
cb03ca0f86 Ensures that all executor service based tracing is done when context is ready; fixes gh-1128 2020-12-01 14:26:23 +01:00
Marcin Grzejszczak
c82a9be5d5 Added conditional on class for web auto configuration; fixes gh-1790 2020-12-01 13:44:12 +01:00
Marcin Grzejszczak
382f4a0da7 Will reuse the mutable accessor if present; fixes gh-1742 2020-11-25 15:24:14 +01:00
buildmaster
d2ea5f1b75 Bumping versions to 2.2.7.BUILD-SNAPSHOT after release 2020-11-09 11:03:34 +00:00
buildmaster
a2ff64e797 Going back to snapshots 2020-11-09 11:03:34 +00:00
buildmaster
97b99bf9e3 Update SNAPSHOT to 2.2.6.RELEASE 2020-11-09 11:01:22 +00:00
Olga Maciaszek-Sharma
eaa6acd59c Add more tests. 2020-10-28 14:10:22 +01:00
Olga Maciaszek-Sharma
4b5263c595 Add instrumentation for RetryableFeignBlockingLoadBalancerClient. (#1759) 2020-10-26 14:32:57 +01:00
buildmaster
cf3a082477 Bumping versions to 2.2.6.BUILD-SNAPSHOT after release 2020-08-28 20:23:45 +00:00
buildmaster
8b1d17fb26 Going back to snapshots 2020-08-28 20:23:44 +00:00
buildmaster
53a15b5b52 Update SNAPSHOT to 2.2.5.RELEASE 2020-08-28 20:21:13 +00:00
Julio Gómez Díaz
36d2c3cc2c Broaden the catched exception when the calculation of patterns could provoke a cyclic reference. Fixes gh-1679 (#1722) 2020-08-28 20:21:15 +02:00
Marcin Grzejszczak
aea67cb0bb Improved checks on final methods and cglib proxy creation; fixes gh-1569 2020-08-06 17:13:45 +02:00
Marcin Grzejszczak
f31df6b3e2 Resolves the remote ip when behind proxy; fixes gh-1683 2020-08-05 18:28:19 +02:00
buildmaster
bb8d203f4c Bumping versions to 2.2.5.BUILD-SNAPSHOT after release 2020-07-31 21:27:20 +00:00
buildmaster
8fe9812944 Going back to snapshots 2020-07-31 21:27:20 +00:00
buildmaster
db7427984e Update SNAPSHOT to 2.2.4.RELEASE 2020-07-31 21:25:19 +00:00
Marcin Grzejszczak
5fa8409114 Reuses messaging properties for remote service name for brokers; fixes gh-1691 2020-07-29 15:53:55 +02:00
Marcin Grzejszczak
97574373a9 Resolves placeholders for skip pattern; fixes gh-1689 2020-07-16 11:04:17 +02:00
Adrian Cole
39671a76a3 Permits Actuator endpoints to depend on HttpTracing (#1680)
* Permits Actuator endpoints to depend on HttpTracing

It is unusual to inject HttpTracing into an actuator endpoint vs an end-user api
such as `Tracer` or `SpanCustomizer`. However, we decided to allow this and so
need a test to prove this continues to work.

Fixes #1679
2020-07-08 08:56:31 +02:00
Ivo Smid
18c27d9a43 Optional/Null parameter used within @SpanTag 2020-06-30 14:26:54 +02:00
Roberto Tassi
791f729f49 Adds tracing on every factory methods in KafkaListenerContainerFactory (#1665) 2020-06-29 15:13:52 +02:00
Marcin Grzejszczak
a83621ebb2 Adds support for the new properties in baggage propagation 2020-06-23 12:38:01 +02:00
Marcin Grzejszczak
fcee4fd424 Added deprecation warning messages for baggage 2020-06-17 11:46:53 +02:00
buildmaster
6b8dd82346 Bumping versions to 2.2.4.BUILD-SNAPSHOT after release 2020-05-28 20:00:54 +00: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
Adrian Cole
3685cc2d7c Fixes bug where we didn't fall back to current span (#1656) 2020-05-26 19:44:25 +08:00
Adrian Cole
a6573bc2a5 Uses B3 single for non-remote spans (2.2.x) (#1655)
This makes sure there cannot be JMS problems related to use of
hyphenated headers unless someone overrides the `Propagation.Factory`.

To avoid this, we set non-remote spans to B3 single format as done on
the 3.x branch here:
https://github.com/spring-cloud/spring-cloud-sleuth/pull/1607/files#diff-db43b7e91bd69d063333c20b947c902bR83-R84
2020-05-26 14:42:27 +08:00
Marcin Grzejszczak
473549f000 Removed / ignored flakey tests; fixes gh-1635; fixes gh-1652 2020-05-22 13:51:14 +02:00
Adrian Cole
03be784678 Ensures Zipkin handlers order last (after redacters etc) (#1648)
This is more prevention of a problem, then seeing one in practice.
Technically, a TracingCustomizer can order things backwards, and it hit
me in a test env (not sleuth).
2020-05-18 23:43:23 +08:00
Adrian Cole
e19e0ca169 Backports BaggagePropagation to 2.2.x (#1647)
This allows integrations of Sleuth to use the same approach for 2.2.x as 3.x:

If you have a custom base propagation format, override the `BaggagePropagation.Factory`
bean instead of `ExtraFieldsPropagation.Factory`

Note: one subtle difference 2.2.x to 3.x is the change in the primary inject format.

2.2.x is
```java
return BaggagePropagation.newFactoryBuilder(B3Propagation.newFactoryBuilder()
                         .injectFormat(B3Propagation.Format.MULTI).build());
```

3.0 is
```java
return BaggagePropagation.newFactoryBuilder(B3Propagation.newFactoryBuilder()
                         .injectFormat(B3Propagation.Format.SINGLE_NO_PARENT).build());
```
per #1607

See https://github.com/spring-cloud/spring-cloud-gcp/issues/2268
2020-05-18 23:08:08 +08:00
Adrian Cole
40785d642a Removes Zipkin dependency from all tests (#1645)
Brave's SpanHandler can report natively in other formats which have different
constraints than Zipkin and often extensions to the data model.

This change ports all tests away from Zipkin's types so that it is more clear
what's actually recorded vs what's a side-effect of Zipkin conversion.

This removes `BlockingQueueSpanReporter` which was never released, also.
2020-05-18 17:02:29 +08:00
Adrian Cole
e9d12703c1 Pares back some deprecation after analyzing each file (#1640)
This puts specific comments in as to why certain files that seem like they
shouldn't be public are. Notably, this includes entrypoint autoconfiguration,
which are sometimes order sensitive. In other cases there are types that were
documented (notably the async package).

This also untangles a few configuration.
2020-05-17 08:38:08 +08:00
Adrian Cole
c1a83aa5bb Replaces deprecated note on Properties with TODO to hide them in 3.x (#1639)
I noticed we deleted many things without deprecation in 3.x and figured
deprecation was the right way. However, this doesn't work for auto-config
properties. This replaces deprecation with a TODO note to hide all the
types so that 4.x won't require guessing if someone externally is using
them directly or not.
2020-05-16 14:37:45 +08:00
Adrian Cole
b1d39ce291 Updates to Brave 5.12 and introduces SpanHandler (#1632)
`SpanHandler` is the base type for the now deprecated `FinishedSpanHandler`.

Notable, it can not just handle things at the end of a recording, but also the
beginning.

For example, this permits set-once baggage without the HTTP abstraction:
```java
static final BaggageField EPOCH_SECONDS = BaggageField.create("epoch_seconds");

static final class RootOnlyBaggage extends SpanHandler {
  @Override
  public boolean begin(TraceContext context, MutableSpan span, @Nullable TraceContext parent) {
    if (EPOCH_SECONDS.getValue(context) == null) { // only set at the first span
      long epochSeconds = System.currentTimeMillis() / 1000;
      EPOCH_SECONDS.updateValue(context, String.valueOf(epochSeconds));
    }
    return true;
  }

  @Override public boolean end(TraceContext context, MutableSpan span, Cause cause) {
    Tags.BAGGAGE_FIELD.tag(EPOCH_SECONDS, context, span);
    return true;
  }
}
```

As the parent is available, it can also facilitate advanced tasks like counting
children, or summarizing entire local roots.

See https://github.com/openzipkin/brave/tree/master/brave/src/test/java/brave/features/handler
and https://github.com/openzipkin/brave/blob/master/brave/src/main/java/brave/handler/SpanHandler.java for more
2020-05-16 14:01:38 +08:00
Adrian Cole
d4088dec9c Deprecates unnecessarily public types to ease burden (#1638)
Types like Properties and AutoConfiguration and internal utilities are
routinely marked public when they needn't be. This causes toil as we
have to preserve signatures even if they were made public by accident.

This deprecates the mass of types marked public to give some hope of
less undifferentiated toil in the future. Ideally, future change will
consider greatly if a type should be public or not as doing so haunts
maintainers.
2020-05-16 13:09:24 +08:00
Adrian Cole
f9821495e1 Deprecates ExceptionLoggingFilter and disables it by default (#1633)
`ExceptionLoggingFilter` logs "Uncaught exception thrown" to error level
when there is a synchronous exception not otherwise swallowed. This is a
cure worse than the disease. This disables it by default and the 3.x
should end the years of problems it caused.
2020-05-15 20:27:13 +08:00
Tim te Beek
75756fd092 Move TraceSchedulingAutoConfiguration @Conditional for optional AspectJ
Co-authored-by: Tim te Beek <tim.te.beek@jdriven.com>
2020-05-09 15:19:49 +08:00
Toshiaki Maki
79f258c2eb This commit makes TraceMessagingAutoConfiguration happens only when (#1629)
MessagingTracing so that excluding brave-instrumentation-messaging
dependency does't make an exception.
2020-05-09 15:19:28 +08:00
Toshiaki Maki
c3f67f31d4 This commit makes TraceRpcAutoConfiguration happens only when (#1628)
RpcTracing so that excluding brave-instrumentation-rpc dependency
does't make an exception.
Also add an missing property to disable RPC tracing
in additional-spring-configuration-metadata.json
2020-05-09 15:19:15 +08:00
zhanghaoxin-at-826767166263
e92a735faa add unit test for saved template 2020-05-09 14:57:06 +08:00