Skip to content

Commit f09f071

Browse files
committed
fix(dips): update OTel Java Agent to v2.18.1 and OTel Contrib to v1.48.0
This updates upstream dependency OTel Java Agent to v2.18.1 and upgrades upstream OTel Contrib to v1.48.0. It removes the Remote Sampling patch file, as that code has been migrated to upstream OTel Contrib v1.48.0. Tests: - Unit tests pass: ./gradlew build test - Smoke/Contract tests pass: ./gradlew appsignals-tests:contract-tests:contractTests - X-Ray remote sampling service end-to-end manual tests pass - EC2 end-to-end tests with SpringBoot Java app pass - Lambda end-to-end tests with SpringBoot Java app pass
1 parent 39e6c30 commit f09f071

File tree

6 files changed

+8
-259
lines changed

6 files changed

+8
-259
lines changed

.github/patches/opentelemetry-java-contrib.patch

Lines changed: 0 additions & 237 deletions
This file was deleted.

.github/patches/versions

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
OTEL_JAVA_INSTRUMENTATION_VERSION=v2.11.0
2-
OTEL_JAVA_CONTRIB_VERSION=v1.39.0
1+
OTEL_JAVA_INSTRUMENTATION_VERSION=v2.18.1

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ build/
44

55
.DS_Store
66

7+
.vscode
8+
79
# Ignore Gradle GUI config
810
gradle-app.setting
911

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ allprojects {
108108
testImplementation("org.junit.jupiter:junit-jupiter-api")
109109
testImplementation("org.junit.jupiter:junit-jupiter-params")
110110
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
111+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
111112
}
112113

113114
spotless {

dependencyManagement/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ data class DependencySet(val group: String, val version: String, val modules: Li
2727
val testSnapshots = rootProject.findProperty("testUpstreamSnapshots") == "true"
2828

2929
// This is the version of the upstream instrumentation BOM
30-
val otelVersion = "2.11.0"
31-
val otelSnapshotVersion = "2.12.0"
30+
val otelVersion = "2.18.1"
31+
val otelSnapshotVersion = "2.19.0"
3232
val otelAlphaVersion = if (!testSnapshots) "$otelVersion-alpha" else "$otelSnapshotVersion-alpha-SNAPSHOT"
3333
val otelJavaAgentVersion = if (!testSnapshots) otelVersion else "$otelSnapshotVersion-SNAPSHOT"
3434
// All versions below are only used in testing and do not affect the released artifact.
@@ -76,8 +76,8 @@ val dependencyLists = listOf(
7676
"commons-logging:commons-logging:1.2",
7777
"com.sparkjava:spark-core:2.9.4",
7878
"com.squareup.okhttp3:okhttp:4.12.0",
79-
"io.opentelemetry.contrib:opentelemetry-aws-xray:1.39.0-adot1",
80-
"io.opentelemetry.contrib:opentelemetry-aws-resources:1.39.0-alpha",
79+
"io.opentelemetry.contrib:opentelemetry-aws-xray:1.48.0",
80+
"io.opentelemetry.contrib:opentelemetry-aws-resources:1.48.0-alpha",
8181
"io.opentelemetry.proto:opentelemetry-proto:1.0.0-alpha",
8282
"io.opentelemetry.javaagent:opentelemetry-javaagent:$otelJavaAgentVersion",
8383
"io.opentelemetry:opentelemetry-extension-aws:1.20.1",

lambda-layer/build-layer.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,6 @@ patch -p1 < "$SOURCEDIR"/patches/StreamHandlerInstrumentation.patch
3131
popd
3232
rm -rf opentelemetry-java-instrumentation
3333

34-
contrib_version=$(awk -F'=v' '/OTEL_JAVA_CONTRIB_VERSION/ {print $2}' "$file")
35-
if [[ -n "$contrib_version" ]]; then
36-
echo "Found OTEL Contrib Version: ${contrib_version}"
37-
## Clone and Patch the OpenTelemetry Java contrib Repository
38-
echo "Info: Cloning and Patching OpenTelemetry Java contrib Repository"
39-
git clone https://github.com/open-telemetry/opentelemetry-java-contrib.git
40-
pushd opentelemetry-java-contrib
41-
git checkout v${contrib_version} -b tag-v${contrib_version}
42-
43-
# There is another patch in the .github/patches directory for other changes. We should apply them too for consistency.
44-
patch -p1 < "$SOURCEDIR"/../.github/patches/opentelemetry-java-contrib.patch
45-
46-
./gradlew publishToMavenLocal
47-
popd
48-
rm -rf opentelemetry-java-contrib
49-
fi
5034

5135
## Build the ADOT Java from current source
5236
echo "Info: Building ADOT Java from current source"

0 commit comments

Comments
 (0)