Skip to content

Commit

Permalink
Moves all that can be upgraded to Brave 5.18.1 (#102)
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
codefromthecrypt authored Jan 9, 2024
1 parent 7148c44 commit 76927d7
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 18 deletions.
4 changes: 2 additions & 2 deletions armeria-kafka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<jre.version>21</jre.version>
<maven.compiler.release>8</maven.compiler.release>

<armeria.version>1.6.0</armeria.version>
<kafka.version>3.4.0</kafka.version>
<armeria.version>1.26.4</armeria.version>
<kafka.version>3.6.1</kafka.version>
</properties>

<dependencies>
Expand Down
5 changes: 2 additions & 3 deletions armeria-kafka/src/main/java/brave/example/Backend.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.apache.kafka.streams.StreamsBuilder;
import org.apache.kafka.streams.StreamsConfig;
import org.apache.kafka.streams.kstream.Consumed;
import org.apache.kafka.streams.kstream.Produced;

public final class Backend {

Expand All @@ -36,8 +35,8 @@ public static void main(String[] args) {

StreamsBuilder builder = new StreamsBuilder();
builder.stream("input", Consumed.with(Serdes.String(), Serdes.String()))
.transformValues(tracing.kafkaStreamsTracing.mapValues("mapping", s -> s + ". Thanks!"))
.to("output", Produced.with(Serdes.String(), Serdes.String()));
.processValues(tracing.kafkaStreamsTracing.processValues("mapping",
() -> r -> r.withValue(r.value() + ". Thanks!")));

KafkaStreams kafkaStreams =
tracing.kafkaStreamsTracing.kafkaStreams(builder.build(), streamsConfig);
Expand Down
2 changes: 1 addition & 1 deletion armeria/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<jre.version>21</jre.version>
<maven.compiler.release>8</maven.compiler.release>

<armeria.version>1.6.0</armeria.version>
<armeria.version>1.26.4</armeria.version>
</properties>

<dependencies>
Expand Down
4 changes: 4 additions & 0 deletions jersey2-cassandra3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,9 @@
<groupId>io.zipkin.brave</groupId>
<artifactId>brave-spring-beans</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-spring-beans</artifactId>
</dependency>
</dependencies>
</project>
7 changes: 3 additions & 4 deletions parent-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
<project.build.outputEncoding>UTF-8</project.build.outputEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<brave.version>5.18.0</brave.version>
<old-zipkin-reporter.version>2.17.2</old-zipkin-reporter.version>
<zipkin-reporter.version>3.0.0</zipkin-reporter.version>
<brave.version>5.18.1</brave.version>
<zipkin-reporter.version>3.0.2</zipkin-reporter.version>

<!-- The JRE used in Docker images can be higher than ${maven.compiler.release}. -->
<jre.version>SET MANUALLY IN PROJECTS</jre.version>
Expand All @@ -44,7 +43,7 @@

<exec-maven-plugin.version>3.1.1</exec-maven-plugin.version>
<go-offline-maven-plugin.version>1.2.8</go-offline-maven-plugin.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-compiler-plugin.version>3.12.1</maven-compiler-plugin.version>
<!-- Use same version as https://github.com/openzipkin/docker-java -->
<maven-dependency-plugin.version>3.6.1</maven-dependency-plugin.version>
<maven-help-plugin.version>3.4.0</maven-help-plugin.version>
Expand Down
4 changes: 2 additions & 2 deletions webflux5-sleuth/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## Tracing Example: Spring WebFlux 5/Spring Boot 2.3/Spring Cloud Sleuth 2.2

Instead of servlet, this uses Spring Boot 2.3 to create a self-contained
Instead of servlet, this uses Spring Boot 2.6 to create a self-contained
application that runs Spring WebFlux 5 controllers.

* brave.example.Frontend and Backend: Rest controllers
* brave.example.AppAutoConfiguration: Sets up the WebClient used in the Frontend.

Application code doesn't show any tracing configuration because that's handled
by [Spring Cloud Sleuth v2](https://github.com/spring-cloud/spring-cloud-sleuth/tree/2.2.x), configured by properties.
by [Spring Cloud Sleuth v3](https://github.com/spring-cloud/spring-cloud-sleuth/tree/3.1.x), configured by properties.

Version 2 of Sleuth was based on Brave. It provided auto-configuration of
Brave libraries used in other projects, such as span reporting, logging context,
Expand Down
23 changes: 17 additions & 6 deletions webflux5-sleuth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@
<packaging>jar</packaging>

<name>brave-example-webflux5-sleuth</name>
<description>Tracing Example: Spring 5.2, Reactor Netty 0.9, Spring Boot 2.3, Spring Cloud Sleuth 2.2, Log4J 2.13, JRE 21</description>
<description>Tracing Example: Spring 5.2, Reactor Netty 1.0, Spring Boot 2.6, Spring Cloud Sleuth 3.1, Log4J 2.17, JRE 21</description>

<properties>
<jre.version>21</jre.version>
<maven.compiler.release>8</maven.compiler.release>

<spring-boot.version>2.3.7.RELEASE</spring-boot.version>
<sleuth.version>2.2.6.RELEASE</sleuth.version>
<zipkin-reporter.version>${old-zipkin-reporter.version}</zipkin-reporter.version>
<spring-boot.version>2.6.15</spring-boot.version>
<sleuth.version>3.1.10</sleuth.version>
<!-- Sleuth does not yet implement PropagationFactory.get()
https://github.com/spring-cloud/spring-cloud-sleuth/pull/2335 -->
<brave.version>5.17.1</brave.version>
<!-- Sleuth defines and exports zipkin reporter 2 types, so is rev-locked.
https://github.com/spring-cloud/spring-cloud-sleuth/pull/2335 -->
<zipkin-reporter.version>2.17.2</zipkin-reporter.version>
</properties>

<dependencyManagement>
Expand All @@ -46,17 +51,23 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>${spring-boot.version}</version>
</dependency>

<!-- spring-cloud-starter-zipkin configures instrumentation including what's in Brave and their own. -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
<version>${sleuth.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
<version>${sleuth.version}</version>
</dependency>

<!-- Needed for ZipkinRestTemplateSenderConfiguration: BytesMessageEncoder
See https://github.com/spring-cloud/spring-cloud-sleuth/pull/2335/files -->
See https://github.com/spring-cloud/spring-cloud-sleuth/pull/2335 -->
<dependency>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions webmvc25-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
<groupId>io.zipkin.brave</groupId>
<artifactId>brave</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-spring-beans</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-brave</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions webmvc3-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
<groupId>io.zipkin.brave</groupId>
<artifactId>brave</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-spring-beans</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-brave</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions webmvc4-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
<groupId>io.zipkin.brave</groupId>
<artifactId>brave</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-spring-beans</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-brave</artifactId>
Expand Down

0 comments on commit 76927d7

Please sign in to comment.