Commit Graph

142 Commits

Author SHA1 Message Date
Marcin Grzejszczak
eb01d5952b Reactive mongo (#2044)
Added support for the new Reactive and Synchronous Context Providers in Mongo
2021-10-26 16:13:57 +02:00
Marcin Grzejszczak
90417f1f07 Stream reactive (#2038)
Added native support for Reactive Spring Cloud Stream.
2021-10-26 16:01:12 +02:00
Jonatan Ivanov
79208f410f Fix tests that depend on previous Spring Boot config issue
fixes gh-2042
2021-10-20 16:16:25 -07:00
buildmaster
11ef7e028a Going back to snapshots 2021-10-20 03:03:18 +00:00
buildmaster
17e68ba7c6 Update SNAPSHOT to 3.1.0-M3 2021-10-20 02:59:04 +00:00
Marcin Grzejszczak
3dc8387a6f Merge branch '3.0.x' into main 2021-10-12 10:25:23 +02:00
Marcin Grzejszczak
a403c9aa91 Added conditional on spring kafka; fixes gh-2037 2021-10-12 10:23:07 +02:00
Marcin Grzejszczak
5ea63f6f8c Adding span flushing on shutdown hook (#2036)
without this change when batch process finishes the async reporter doesn't have time to properly shutdown and send out spans to Zipkin.
with this change we're registering a shutdown hook. AsyncReporter has no option to send out spans in a blocking way, so what we need to do to flush it, then wait for the configured time for the spans to be drained from the queue and then give a chance to send the spans out over the wire.

fixes gh-2035
2021-10-08 10:53:15 +02:00
Marcin Grzejszczak
6c23dfb179 Caches executor wrappers (#2033)
without this change whenever a traced executor is created (either via a proxy or directly) we create a new instance of that traced wrapper. The problem with that is such that we create a lot of objects (e.g. each getExecutor() would return a new instance of the traced version). There are projects such as Micrometer that create WeakReferences to those objects. That means that if we don't cache the traced instance then we will lose the WeakReference upon the first GC.
with this change we're introducing new static wrapper methods that cache the traced instance for a given delegate. That means that not only will we create fewer objects but also we will honour the WeakReference mechanisms.

fixes gh-2020
2021-10-04 10:10:45 +02:00
buildmaster
3855298689 Going back to snapshots 2021-10-01 19:38:52 +00:00
buildmaster
160524d943 Update SNAPSHOT to 3.1.0-M2 2021-10-01 19:34:24 +00:00
Marcin Grzejszczak
d19b72d553 Caches executor wrappers (#2033)
without this change whenever a traced executor is created (either via a proxy or directly) we create a new instance of that traced wrapper. The problem with that is such that we create a lot of objects (e.g. each getExecutor() would return a new instance of the traced version). There are projects such as Micrometer that create WeakReferences to those objects. That means that if we don't cache the traced instance then we will lose the WeakReference upon the first GC.
with this change we're introducing new static wrapper methods that cache the traced instance for a given delegate. That means that not only will we create fewer objects but also we will honour the WeakReference mechanisms.

fixes gh-2020
2021-10-01 09:34:20 -07:00
buildmaster
e295ff9214 Bumping versions to 3.0.5-SNAPSHOT after release 2021-09-21 15:23:29 +00:00
buildmaster
4ff72048cf Going back to snapshots 2021-09-21 15:23:29 +00:00
buildmaster
bffa4ab7db Update SNAPSHOT to 3.0.4 2021-09-21 15:17:41 +00:00
Flaviu Mureșan
460d994a53 Spring kafka autoconfiguration (#2013)
* Add auto-configuration for spring kafka

* Add auto-configuration for spring kafka

* Make spring-kafka instrumentation autoconfig conditional on missing brave

Co-authored-by: flavium31 <w7og3bljlmmn742puqw2zwzu7ycuwmflr2nb4swrwzivccx6arpq>
2021-09-20 19:19:53 +02:00
Marcin Grzejszczak
ef8554daa6 Fixed the build for Boot 2.6.0 Snapshots 2021-09-08 12:21:54 +02:00
Jonatan Ivanov
f3051483d7 Instrumenting Spring Security (#2011)
* First draft of instrumenting Spring Security

* Create events based on Authentication not SecurityContext

* Simplifying security config

* Checkstyle reformat

* Create DocumentedSpan and EventValue for Spring Security instrumentation

* Adding spring-security-bom to ensure the right dependencies are used.

* TracingSecurityContextChangedListenerTests

* Adding integration tests

* Deleting spring-cloud-sleuth-sample-security

* Checkstyle, license, javadoc

* Inlining SleuthSecuritySpan methods

* Deleting javadoc links from DocumentedSpan

* Updating auto-generated docs
2021-08-25 15:44:45 -07:00
buildmaster
d5dad5d1e6 Going back to snapshots 2021-07-30 18:51:11 +00:00
buildmaster
848a1bbcdc Update SNAPSHOT to 3.1.0-M1 2021-07-30 18:47:07 +00:00
Marcin Grzejszczak
013d95120a Added an option to mutate the reactor context; fixes gh-2000 2021-07-30 11:38:07 +02:00
Marcin Grzejszczak
95c1a1df1e Fixed line endings 2021-07-28 20:08:39 +02:00
Marcin Grzejszczak
3970778bc5 Moved SingleSkipPattern to spring-cloud-sleuth-autoconfiguration; fixes gh-1991 2021-07-19 14:15:53 +02:00
buildmaster
44dd4d17eb Bumping versions 2021-07-17 17:34:57 +00:00
Marcin Grzejszczak
bbb23b66a2 Fixed missing async processing for TomcatValve; fixes gh-1998 2021-07-16 17:53:30 +02:00
Chintan Radia
7651e7c51f Fix traces actuator should return json by default (#1997)
Fixes gh-1996

Change order of TextOutputFormat enum and give `CONTENT_TYPE_OPENZIPKIN_JSON_V2`
highest ordinal value, so that it will be matched first by spring-boot-actuator
and in case of default Accept header JSON data will be returned.
2021-07-15 09:58:58 +02:00
Marcin Grzejszczak
76d63ce44d Fixed broken build 2021-07-14 16:55:50 +02:00
Marcin Grzejszczak
c3287d9efb Merge remote-tracking branch 'origin/3.0.x' into main 2021-07-14 15:53:04 +02:00
Marcin Grzejszczak
42c8896e75 Modified tests 2021-07-14 15:52:15 +02:00
Marcin Grzejszczak
dabd32b3ef Checkstyle fix 2021-07-14 15:27:32 +02:00
Chintan Radia
87fac14505 Fix startup failure when using VaultPropertySource + reactive (#1994)
Fixes gh-1990

When using `@ValuePropertySource` in reactive web app,
`KafkaSender` bean is getting created before `BeanPostProcessor` populate `@Value`
and as a result topic is passed as `null` in `KafkaSender.Builder` and it throws `NullPointerException`

To resolve this we are using `Environment` to get the property value instead on relying on `BeanPostProcessor`
to populate `@Value`
2021-07-13 10:14:21 -07:00
Marcin Grzejszczak
58fca4d12a Added missing @return description 2021-07-13 11:33:18 +02:00
Jonatan Ivanov
b18819a414 Fixing CustomPropagationFactoryTests 2021-07-06 15:42:41 -07:00
Jonatan Ivanov
f94330a02e Merge branch 'main' into 3.1.x
# Conflicts:
#	benchmarks/pom.xml
#	pom.xml
#	spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/messaging/TraceMessageHandler.java
2021-07-06 15:03:23 -07:00
Marcin Grzejszczak
8b61684168 Ensures that there are no issues with context setup when picking custom propagation type (#1989)
fixes gh-1987
2021-07-02 08:14:05 -07:00
Andrew Flower
08b4c1368e Broaden caught exceptions (#1985)
Handle BeanCreationException instead of just BeanCurrentlyInCreationException.

This handles the case when a cyclic reference (causing a BeanCurrentlyInCreationException) occurs further down the line - when it is not the actuator of that references the in-creation HttpTracing bean, but a dependency of that actuator. In this case the exception that bubbles up here is an UnsatisfiedDependencyException, which is a BeanCreationException
2021-06-24 17:42:53 +02:00
Marcin Grzejszczak
b876551a78 Fixing sc function (#1983)
- Removed an unnecessary child span; the parent span was never ended
- Added tests
2021-06-23 17:20:01 +02:00
Chintan Radia
f7eb398917 Fix not able to override datasource-proxy log-level (#1976)
* Fix datasource-proxy log-level is not working

- Aligned default values of `Query` & `SlowQuery` in
  `TraceJdbcProperties.DataSourceProxyProperties`
  and `DataSourceProxyProperties`
- Add code to copy properties of `Query` and `SlowQuery` in
  `DataSourceProxyConfiguration`
- Add test case to check if `log-level` can be override or not.

Fixes gh-1973

* Disable query log listener by default

- By default `QueryLogListener` and `LoggingQueryLogListener`
  will be disabled, dev need to enable it by using properties
- By default `Slf4j` will be enlabled for query logging
  so by adding below property slow query logging will be enabled
  `spring.sleuth.jdbc.datasource-proxy.slow-query.enable-logging=true`
  this property will register `SLF4JSlowQueryListener`

* Add docs for how-to enable data-proxy query logs
2021-06-18 09:36:28 +02:00
Marcin Grzejszczak
7c4d8b1479 Adds support for Kotlin Coroutines (#1977)
* Added Kotlin Coroutine support
* Added docs, polished code and added one more case for reactor context
2021-06-18 07:30:49 +02:00
Marcin Grzejszczak
2493b176e5 Actuator endpoint with spans (#1964)
fixes #1879
2021-06-16 12:48:43 +02:00
Marcin Grzejszczak
17ba1b18d5 Adds Cassandra support (#1974)
Co-authored-by: Mark Paluch <mpaluch@vmware.com>
2021-06-10 15:46:04 +02:00
Marcin Grzejszczak
4fcc7cc32e Adds Spring Session support (#1961)
* Adds Spring Session support

* Changes following the review
2021-06-09 16:11:23 +02:00
Marcin Grzejszczak
821bc3abd4 Merge branch 'main' into 3.1.x 2021-06-07 14:31:57 +02:00
Marcin Grzejszczak
988c85fc5b Polish 2021-06-07 14:25:18 +02:00
Marcin Grzejszczak
6bca07075f Fixed brave redis setup
fixes gh-1971
2021-06-07 14:14:19 +02:00
Marcin Grzejszczak
6a094db84e Changed the logging defaults 2021-05-28 14:10:43 +02:00
buildmaster
58eb56d796 Going back to snapshots 2021-05-27 21:49:30 +00:00
buildmaster
c8da912f85 Update SNAPSHOT to 3.0.3 2021-05-27 21:44:52 +00:00
Marcin Grzejszczak
b255974c00 Fixed autoconfiguration ordering 2021-05-27 15:38:23 +02:00
Marcin Grzejszczak
685fb727b5 Polish 2021-05-27 14:05:39 +02:00