diff --git a/sample-apps/java-sample-app/auto/build.gradle.kts b/sample-apps/java-sample-app/auto/build.gradle.kts index 4999d95a..fe6de7f0 100644 --- a/sample-apps/java-sample-app/auto/build.gradle.kts +++ b/sample-apps/java-sample-app/auto/build.gradle.kts @@ -33,7 +33,7 @@ repositories { } -val javaAgent = "software.amazon.opentelemetry:aws-opentelemetry-agent:1.32.5" +val javaAgent = "software.amazon.opentelemetry:aws-opentelemetry-agent:2.20.0" val javaAgentVersion = javaAgent.split(":").get(2) jib { diff --git a/sample-apps/java-sample-app/base/build.gradle.kts b/sample-apps/java-sample-app/base/build.gradle.kts index 4382fc2c..e927204e 100644 --- a/sample-apps/java-sample-app/base/build.gradle.kts +++ b/sample-apps/java-sample-app/base/build.gradle.kts @@ -23,20 +23,20 @@ repositories { dependencies { // Used to have access to the APIs - api("io.opentelemetry:opentelemetry-api:1.44.1") + api("io.opentelemetry:opentelemetry-api:1.58.0") // Third party libraries used in this application // Exposed to dependent modules api("com.sparkjava:spark-core:2.9.4") - api("com.squareup.okhttp3:okhttp:4.12.0") - api(platform("software.amazon.awssdk:bom:2.29.16")) + api("com.squareup.okhttp3:okhttp:5.3.2") + api(platform("software.amazon.awssdk:bom:2.41.15")) api("software.amazon.awssdk:s3") // Not exposed to dependent modules - implementation("org.yaml:snakeyaml:2.3") - implementation("org.apache.logging.log4j:log4j-api:2.24.1") - implementation("org.apache.logging.log4j:log4j-core:2.24.1") - implementation("org.slf4j:slf4j-simple:2.0.16") + implementation("org.yaml:snakeyaml:2.5") + implementation("org.apache.logging.log4j:log4j-api:2.25.3") + implementation("org.apache.logging.log4j:log4j-core:2.25.3") + implementation("org.slf4j:slf4j-simple:2.0.17") } diff --git a/sample-apps/java-sample-app/extension/build.gradle.kts b/sample-apps/java-sample-app/extension/build.gradle.kts index e27997ca..0f1ee800 100644 --- a/sample-apps/java-sample-app/extension/build.gradle.kts +++ b/sample-apps/java-sample-app/extension/build.gradle.kts @@ -7,14 +7,14 @@ repositories { mavenCentral() } dependencies { - testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.3") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.3") + testImplementation("org.junit.jupiter:junit-jupiter-api:6.0.2") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:6.0.2") compileOnly("com.google.auto.service:auto-service:1.1.1") annotationProcessor("com.google.auto.service:auto-service:1.1.1") - compileOnly("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:1.44.1") - compileOnly("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:2.10.0") - compileOnly("io.opentelemetry.javaagent:opentelemetry-javaagent-extension-api:2.10.0-alpha") + compileOnly("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:1.58.0") + compileOnly("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:2.24.0") + compileOnly("io.opentelemetry.javaagent:opentelemetry-javaagent-extension-api:2.24.0-alpha") compileOnly("io.opentelemetry:opentelemetry-semconv:1.30.1-alpha") } diff --git a/sample-apps/java-sample-app/gradle/wrapper/gradle-wrapper.jar b/sample-apps/java-sample-app/gradle/wrapper/gradle-wrapper.jar index 943f0cbf..61285a65 100644 Binary files a/sample-apps/java-sample-app/gradle/wrapper/gradle-wrapper.jar and b/sample-apps/java-sample-app/gradle/wrapper/gradle-wrapper.jar differ diff --git a/sample-apps/java-sample-app/gradle/wrapper/gradle-wrapper.properties b/sample-apps/java-sample-app/gradle/wrapper/gradle-wrapper.properties index 37aef8d3..aa28adbd 100644 --- a/sample-apps/java-sample-app/gradle/wrapper/gradle-wrapper.properties +++ b/sample-apps/java-sample-app/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/sample-apps/java-sample-app/gradlew b/sample-apps/java-sample-app/gradlew index 65dcd68d..adff685a 100755 --- a/sample-apps/java-sample-app/gradlew +++ b/sample-apps/java-sample-app/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -83,10 +85,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -114,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -133,10 +132,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -144,7 +146,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +154,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -169,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -197,16 +198,19 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/sample-apps/java-sample-app/gradlew.bat b/sample-apps/java-sample-app/gradlew.bat old mode 100644 new mode 100755 index 6689b85b..e509b2dd --- a/sample-apps/java-sample-app/gradlew.bat +++ b/sample-apps/java-sample-app/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,22 +59,21 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/sample-apps/java-sample-app/manual/build.gradle.kts b/sample-apps/java-sample-app/manual/build.gradle.kts index c516ed73..492a2652 100644 --- a/sample-apps/java-sample-app/manual/build.gradle.kts +++ b/sample-apps/java-sample-app/manual/build.gradle.kts @@ -45,7 +45,7 @@ jib { dependencies { // OpenTelemetry APIs and SDKs - implementation(platform("io.opentelemetry:opentelemetry-bom:1.44.1")) + implementation(platform("io.opentelemetry:opentelemetry-bom:1.58.0")) implementation("io.opentelemetry:opentelemetry-api") implementation("io.opentelemetry:opentelemetry-sdk") @@ -53,27 +53,27 @@ dependencies { implementation("io.opentelemetry:opentelemetry-exporter-otlp") // OpenTelemetry Aws Xray dependencies - implementation("io.opentelemetry.contrib:opentelemetry-aws-xray-propagator:1.40.0-alpha") - implementation("io.opentelemetry.contrib:opentelemetry-aws-xray:1.40.0") + implementation("io.opentelemetry.contrib:opentelemetry-aws-xray-propagator:1.53.0-alpha") + implementation("io.opentelemetry.contrib:opentelemetry-aws-xray:1.53.0") // OpenTelemetry AWS SDK Library Instrumentation - implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:2.10.0-alpha")) + implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:2.24.0-alpha")) implementation("io.opentelemetry.instrumentation:opentelemetry-aws-sdk-2.2") // Opentelemetry OkHttp Library Instrumentation - implementation("io.opentelemetry.instrumentation:opentelemetry-okhttp-3.0:2.10.0-alpha") + implementation("io.opentelemetry.instrumentation:opentelemetry-okhttp-3.0:2.24.0-alpha") implementation(project(":base")) constraints { - implementation("com.fasterxml.jackson:jackson-bom:2.18.1") { + implementation("com.fasterxml.jackson:jackson-bom:2.21.0") { because("bom used upstream is problematic. https://github.com/FasterXML/jackson-bom/issues/52#issuecomment-1292883281") } } - implementation("org.apache.logging.log4j:log4j-api:2.24.1") - implementation("org.apache.logging.log4j:log4j-core:2.24.1") - implementation("org.slf4j:slf4j-simple:2.0.16") + implementation("org.apache.logging.log4j:log4j-api:2.25.3") + implementation("org.apache.logging.log4j:log4j-core:2.25.3") + implementation("org.slf4j:slf4j-simple:2.0.17") } diff --git a/sample-apps/java-sample-app/settings.gradle.kts b/sample-apps/java-sample-app/settings.gradle.kts index a7f36aeb..0dd02ca0 100644 --- a/sample-apps/java-sample-app/settings.gradle.kts +++ b/sample-apps/java-sample-app/settings.gradle.kts @@ -17,7 +17,7 @@ rootProject.name = "java-sample-app" pluginManagement { plugins { - id("com.google.cloud.tools.jib") version "3.4.4" + id("com.google.cloud.tools.jib") version "3.5.2" } }