diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 3bb12b1..8c14fab 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -24,13 +24,13 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'zulu' # zulu as it supports a wide version range - java-version: '11' # earliest LTS and last that can compile the 1.6 release profile. + java-version: '17' # earliest LTS and last that can compile the 1.6 release profile. - name: Cache local Maven repository uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-maven- + key: ${{ runner.os }}-jdk-17-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-jdk-17-maven- - name: Create Release env: # GH_USER= diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1d7ba5f..c556768 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,13 +27,13 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'zulu' # zulu as it supports a wide version range - java-version: '11' # earliest LTS and last that can compile the 1.6 release profile. + java-version: '17' # earliest LTS supported by Spring Boot 3 - name: Cache local Maven repository uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-maven- + key: ${{ runner.os }}-jdk-17-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-jdk-17-maven- # Don't attempt to cache Docker. Sensitive information can be stolen # via forks, and login session ends up in ~/.docker. This is ok because # we publish DOCKER_PARENT_IMAGE to ghcr.io, hence local to the runner. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 472dad6..f34aa28 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,13 +28,13 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'zulu' # zulu as it supports a wide version range - java-version: '11' # earliest LTS and last that can compile the 1.6 release profile. + java-version: '17' # earliest LTS supported by Spring Boot 3 - name: Cache local Maven repository uses: actions/cache@v3 with: path: ~/.m2/repository - key: ${{ runner.os }}-jdk-11-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-jdk-11-maven- + key: ${{ runner.os }}-jdk-17-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-jdk-17-maven- - name: Build JavaDoc run: ./mvnw clean javadoc:aggregate -Prelease @@ -46,7 +46,7 @@ jobs: fail-fast: false # don't fail fast as sometimes failures are operating system specific matrix: # use latest available versions and be consistent on all workflows! include: - - java_version: 11 # Last that can compile zipkin core to 1.6 for zipkin-reporter + - java_version: 17 # earliest LTS supported by Spring Boot 3 maven_args: -Prelease -Dgpg.skip -Dmaven.javadoc.skip=true - java_version: 21 # Most recent LTS steps: @@ -69,4 +69,4 @@ jobs: # via forks, and login session ends up in ~/.docker. This is ok because # we publish DOCKER_PARENT_IMAGE to ghcr.io, hence local to the runner. - name: Test - run: build-bin/configure_test && build-bin/test + run: build-bin/configure_test && build-bin/test ${{ matrix.maven_args }} diff --git a/README.md b/README.md index c4111b5..f97a524 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Maven Central](https://img.shields.io/maven-central/v/io.zipkin.gcp/zipkin-module-gcp.svg)](https://search.maven.org/search?q=g:io.zipkin.gcp%20AND%20a:zipkin-module-gcp) # zipkin-gcp -Shared libraries that provide Zipkin integration with the Google Cloud Platform. Requires JRE 11 or later. +Shared libraries that provide Zipkin integration with the Google Cloud Platform. Requires JRE 17 or later. # Usage These components integrate traced applications and servers through Google Cloud services @@ -71,7 +71,7 @@ $ STORAGE_TYPE=stackdriver STACKDRIVER_PROJECT_ID=zipkin-demo \ -Dloader.path='gcp.jar,gcp.jar!/lib' \ -Dspring.profiles.active=gcp \ -cp zipkin.jar \ - org.springframework.boot.loader.PropertiesLauncher + org.springframework.boot.loader.launch.PropertiesLauncher ``` ## Example integrating Stackdriver Storage diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml index bdccec6..6e87228 100644 --- a/benchmarks/pom.xml +++ b/benchmarks/pom.xml @@ -30,6 +30,10 @@ ${project.basedir}/.. 1.27 + + 17 + 17 + 17 diff --git a/collector-pubsub/pom.xml b/collector-pubsub/pom.xml index 96d4f24..a943518 100644 --- a/collector-pubsub/pom.xml +++ b/collector-pubsub/pom.xml @@ -26,6 +26,11 @@ ${project.basedir}/.. + + + 17 + 17 + 17 diff --git a/docker/Dockerfile b/docker/Dockerfile index eca5fad..106fba5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,7 +13,7 @@ # # zipkin version should match zipkin.version in /pom.xml -ARG zipkin_version=2.27.0 +ARG zipkin_version=3.0.0 # java_version is used during the installation process to build or download the module jar. # diff --git a/module/README.md b/module/README.md index bdefa02..ae6a98a 100644 --- a/module/README.md +++ b/module/README.md @@ -16,7 +16,7 @@ and exposes configuration options through environment variables. ## Quick start -JRE 11+ is required to run Zipkin server. +JRE 17+ is required to run Zipkin server. Fetch the latest released [executable jar for Zipkin server](https://search.maven.org/remote_content?g=io.zipkin&a=zipkin-server&v=LATEST&c=exec) @@ -34,7 +34,7 @@ $ STORAGE_TYPE=stackdriver STACKDRIVER_PROJECT_ID=zipkin-demo \ -Dloader.path='gcp.jar,gcp.jar!/lib' \ -Dspring.profiles.active=gcp \ -cp zipkin.jar \ - org.springframework.boot.loader.PropertiesLauncher + org.springframework.boot.loader.launch.PropertiesLauncher ``` After executing these steps, applications can send spans @@ -52,12 +52,12 @@ for users that prefer a file based approach. #### Environment Variables -|Environment Variable | Value | -|-------------------------------|------------------| -|GOOGLE_APPLICATION_CREDENTIALS | Optional. [Google Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials). Not managed by spring boot. | -|STACKDRIVER_PROJECT_ID | GCP projectId. Optional on GCE. Required on all other platforms. If not provided on GCE, it will default to the projectId associated with the GCE resource. | -|STACKDRIVER_API_HOST | host:port combination of the gRPC endpoint. Default: cloudtrace.googleapis.com:443 | -|STACKDRIVER_HTTP_LOGGING | When set, controls the volume of HTTP logging of the Stackdriver Trace Api. Options are BASIC and HEADERS | +| Environment Variable | Value | +|--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| GOOGLE_APPLICATION_CREDENTIALS | Optional. [Google Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials). Not managed by spring boot. | +| STACKDRIVER_PROJECT_ID | GCP projectId. Optional on GCE. Required on all other platforms. If not provided on GCE, it will default to the projectId associated with the GCE resource. | +| STACKDRIVER_API_HOST | host:port combination of the gRPC endpoint. Default: cloudtrace.googleapis.com:443 | +| STACKDRIVER_HTTP_LOGGING | When set, controls the volume of HTTP logging of the Stackdriver Trace Api. Options are BASIC and HEADERS | ### Running @@ -67,7 +67,7 @@ $ STORAGE_TYPE=stackdriver STACKDRIVER_PROJECT_ID=zipkin-demo STACKDRIVER_HTTP_L -Dloader.path='gcp.jar,gcp.jar!/lib' \ -Dspring.profiles.active=gcp \ -cp zipkin.jar \ - org.springframework.boot.loader.PropertiesLauncher + org.springframework.boot.loader.launch.PropertiesLauncher ``` ### Testing diff --git a/module/pom.xml b/module/pom.xml index 51232aa..2bf5eda 100644 --- a/module/pom.xml +++ b/module/pom.xml @@ -27,6 +27,11 @@ ${project.basedir}/.. + + + 17 + 17 + 17 @@ -69,6 +74,11 @@ grpc-context ${grpc.version} + + org.apache.logging.log4j + log4j-core + ${log4j.version} + ${zipkin.groupId} @@ -159,7 +169,7 @@ module - ${zipkin.groupId},org.springframework.boot,org.springframework,com.fasterxml.jackson.core,com.google.auto.value,org.reactivestreams,com.google.code.findbugs,javax.annotation,org.slf4j,io.netty,io.micrometer,org.hdrhistogram,org.latencyutils,${armeria.groupId},javax.inject,com.fasterxml.jackson.datatype + ${zipkin.groupId},org.springframework.boot,org.springframework,com.fasterxml.jackson.core,com.google.auto.value,org.reactivestreams,com.google.code.findbugs,javax.annotation,org.slf4j,io.netty,io.micrometer,org.hdrhistogram,org.latencyutils,${armeria.groupId},javax.inject,com.fasterxml.jackson.datatype,com.aayushatharva.brotli4j,commons-logging diff --git a/module/src/test/java/zipkin2/storage/stackdriver/ITZipkinStackdriverStorage.java b/module/src/test/java/zipkin2/storage/stackdriver/ITZipkinStackdriverStorage.java index 59b34bc..789200e 100644 --- a/module/src/test/java/zipkin2/storage/stackdriver/ITZipkinStackdriverStorage.java +++ b/module/src/test/java/zipkin2/storage/stackdriver/ITZipkinStackdriverStorage.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2023 The OpenZipkin Authors + * Copyright 2016-2024 The OpenZipkin Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -121,8 +121,8 @@ public void close() { .atMost(10, TimeUnit.SECONDS) .pollInterval(1, TimeUnit.SECONDS) .ignoreExceptionsMatching(e -> - e instanceof StatusRuntimeException && - ((StatusRuntimeException) e).getStatus().getCode() == Status.Code.NOT_FOUND + e instanceof StatusRuntimeException sre && + sre.getStatus().getCode() == Status.Code.NOT_FOUND ) .until(() -> traceServiceGrpcV1.getTrace(GetTraceRequest.newBuilder() .setProjectId(projectId) diff --git a/module/src/test/java/zipkin2/storage/stackdriver/StackdriverMockServer.java b/module/src/test/java/zipkin2/storage/stackdriver/StackdriverMockServer.java index 5af8cd1..545e369 100644 --- a/module/src/test/java/zipkin2/storage/stackdriver/StackdriverMockServer.java +++ b/module/src/test/java/zipkin2/storage/stackdriver/StackdriverMockServer.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2023 The OpenZipkin Authors + * Copyright 2016-2024 The OpenZipkin Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -66,7 +66,7 @@ public void setSpanCountdown(CountDownLatch spanCountdown) { } public String grpcURI() { - return String.format("%s:%s", "localhost", getPort()); + return "%s:%s".formatted("localhost", getPort()); } public Set spanIds() { diff --git a/pom.xml b/pom.xml index 66d9706..093f1ba 100644 --- a/pom.xml +++ b/pom.xml @@ -66,20 +66,21 @@ 8 - 11 - 11 - 11 + 17 + 17 + 17 io.zipkin.zipkin2 - 2.27.1 - 3.1.0 - 2.7.18 + 3.0.0 + 3.1.1 + 3.2.1 com.linecorp.armeria 1.26.4 + 2.21.1 @@ -205,9 +206,21 @@ - ch.qos.logback - logback-classic - 1.2.13 + org.apache.logging.log4j + log4j-core + ${log4j.version} + test + + + org.apache.logging.log4j + log4j-jul + ${log4j.version} + test + + + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} test @@ -377,7 +390,7 @@ - [11,12),[17,18),[21,22) + [17,18),[21,22) @@ -490,10 +503,10 @@ - error-prone-11+ + error-prone-17+ - [11,12),[17,18),[21,22) + [17,18),[21,22) diff --git a/sender-stackdriver/src/test/java/zipkin2/reporter/stackdriver/ITStackdriverSender.java b/sender-stackdriver/src/test/java/zipkin2/reporter/stackdriver/ITStackdriverSender.java index b7bba6d..287c8f7 100644 --- a/sender-stackdriver/src/test/java/zipkin2/reporter/stackdriver/ITStackdriverSender.java +++ b/sender-stackdriver/src/test/java/zipkin2/reporter/stackdriver/ITStackdriverSender.java @@ -129,8 +129,8 @@ public void tearDown() { .atMost(10, TimeUnit.SECONDS) .pollInterval(1, TimeUnit.SECONDS) .ignoreExceptionsMatching(e -> - e instanceof StatusRuntimeException && - ((StatusRuntimeException) e).getStatus().getCode() == Status.Code.NOT_FOUND + e instanceof StatusRuntimeException sre && + sre.getStatus().getCode() == Status.Code.NOT_FOUND ) .until(() -> traceServiceGrpcV1.getTrace(GetTraceRequest.newBuilder() .setProjectId(projectId) @@ -165,8 +165,8 @@ public void tearDown() { .atMost(10, TimeUnit.SECONDS) .pollInterval(1, TimeUnit.SECONDS) .ignoreExceptionsMatching(e -> - e instanceof StatusRuntimeException && - ((StatusRuntimeException) e).getStatus().getCode() == Status.Code.NOT_FOUND + e instanceof StatusRuntimeException sre && + sre.getStatus().getCode() == Status.Code.NOT_FOUND ) .until(() -> traceServiceGrpcV1.getTrace(GetTraceRequest.newBuilder() .setProjectId(projectId) diff --git a/storage-stackdriver/pom.xml b/storage-stackdriver/pom.xml index d364167..2ee96b1 100644 --- a/storage-stackdriver/pom.xml +++ b/storage-stackdriver/pom.xml @@ -27,6 +27,11 @@ ${project.basedir}/.. + + + 17 + 17 + 17