Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/actions/patch-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ runs:
if [[ -f .github/patches/opentelemetry-java.patch ]]; then
echo 'patch_otel_java=true' >> $GITHUB_ENV
fi
if [[ -f .github/patches/opentelemetry-java-instrumentation.patch ]]; then
echo 'patch_otel_java_instrumentation=true' >> $GITHUB_ENV
fi
if [[ -f .github/patches/opentelemetry-java-contrib.patch ]]; then
echo 'patch_otel_java_contrib=true' >> $GITHUB_ENV
fi
Expand Down Expand Up @@ -97,3 +100,22 @@ runs:
run: rm -rf opentelemetry-java-contrib
if: ${{ env.patch_otel_java_contrib == 'true' }}
shell: bash

- name: Build opentelemetry-java-instrumentation with tests
uses: gradle/gradle-build-action@v2
if: ${{ env.patch_otel_java_instrumentation == 'true' && inputs.run_tests != 'false' }}
with:
arguments: check -x spotlessCheck publishToMavenLocal
build-root-directory: opentelemetry-java-instrumentation

- name: Build opentelemetry java instrumentation
uses: gradle/gradle-build-action@v2
if: ${{ env.patch_otel_java_instrumentation == 'true' && inputs.run_tests == 'false' }}
with:
arguments: publishToMavenLocal
build-root-directory: opentelemetry-java-instrumentation

- name: cleanup opentelmetry-java-instrumentation
run: rm -rf opentelemetry-java-instrumentation
if: ${{ env.patch_otel_java_instrumentation == 'true' }}
shell: bash
429 changes: 287 additions & 142 deletions .github/patches/opentelemetry-java-contrib.patch

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .github/patches/opentelemetry-java-instrumentation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/dependencyManagement/build.gradle.kts b/dependencyManagement/build.gradle.kts
index d020848503..88f0a60ac6 100644
--- a/dependencyManagement/build.gradle.kts
+++ b/dependencyManagement/build.gradle.kts
@@ -100,7 +100,7 @@ val DEPENDENCIES = listOf(
"commons-validator:commons-validator:1.9.0",
"io.netty:netty:3.10.6.Final",
"io.opentelemetry.contrib:opentelemetry-aws-resources:${otelContribVersion}",
- "io.opentelemetry.contrib:opentelemetry-aws-xray-propagator:${otelContribVersion}",
+ "io.opentelemetry.contrib:opentelemetry-aws-xray-propagator:1.39.0-alpha-adot1",
"io.opentelemetry.contrib:opentelemetry-gcp-resources:${otelContribVersion}",
"io.opentelemetry.contrib:opentelemetry-baggage-processor:${otelContribVersion}",
"io.opentelemetry.proto:opentelemetry-proto:1.4.0-alpha",
diff --git a/version.gradle.kts b/version.gradle.kts
index a1cae43b4b..c1520e9947 100644
--- a/version.gradle.kts
+++ b/version.gradle.kts
@@ -1,5 +1,5 @@
-val stableVersion = "2.11.0"
-val alphaVersion = "2.11.0-alpha"
+val stableVersion = "2.11.0-adot1"
+val alphaVersion = "2.11.0-adot1-alpha"

allprojects {
if (findProperty("otel.stable") != "true") {
--
2.45.1

13 changes: 13 additions & 0 deletions .github/scripts/patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,16 @@ if [[ -f "$OTEL_JAVA_CONTRIB_PATCH" ]]; then
else
echo "Skipping patching opentelemetry-java-contrib"
fi


OTEL_JAVA_INSTRUMENTATION_PATCH=".github/patches/opentelemetry-java-instrumentation.patch"
if [[ -f "$OTEL_JAVA_INSTRUMENTATION_PATCH" ]]; then
git clone https://github.com/open-telemetry/opentelemetry-java-instrumentation.git
cd opentelemetry-java-instrumentation
git checkout ${OTEL_JAVA_INSTRUMENTATION_VERSION} -b tag-${OTEL_JAVA_INSTRUMENTATION_VERSION}
patch -p1 < "../${OTEL_JAVA_INSTRUMENTATION_PATCH}"
git commit -a -m "ADOT Patch release"
cd -
else
echo "Skipping patching opentelemetry-java-instrumentation"
fi
2 changes: 1 addition & 1 deletion dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ data class DependencySet(val group: String, val version: String, val modules: Li
val testSnapshots = rootProject.findProperty("testUpstreamSnapshots") == "true"

// This is the version of the upstream instrumentation BOM
val otelVersion = "2.11.0"
val otelVersion = "2.11.0-adot1"
val otelSnapshotVersion = "2.12.0"
val otelAlphaVersion = if (!testSnapshots) "$otelVersion-alpha" else "$otelSnapshotVersion-alpha-SNAPSHOT"
val otelJavaAgentVersion = if (!testSnapshots) otelVersion else "$otelSnapshotVersion-SNAPSHOT"
Expand Down
3 changes: 3 additions & 0 deletions lambda-layer/build-layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ git clone https://github.com/open-telemetry/opentelemetry-java-instrumentation.g
pushd opentelemetry-java-instrumentation
git checkout v${version} -b tag-v${version}

# There is another patch in the .github/patches directory for other changes. We should apply them too for consistency.
patch -p1 < "$SOURCEDIR"/../.github/patches/opentelemetry-java-instrumentation.patch

# This patch is for Lambda related context propagation
patch -p1 < "$SOURCEDIR"/patches/opentelemetry-java-instrumentation.patch

Expand Down
2 changes: 1 addition & 1 deletion lambda-layer/patches/aws-otel-java-instrumentation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ index 9493189..6090207 100644
val testSnapshots = rootProject.findProperty("testUpstreamSnapshots") == "true"

// This is the version of the upstream instrumentation BOM
-val otelVersion = "2.11.0"
-val otelVersion = "2.11.0-adot1"
+val otelVersion = "2.11.0-adot-lambda1"
val otelSnapshotVersion = "2.12.0"
val otelAlphaVersion = if (!testSnapshots) "$otelVersion-alpha" else "$otelSnapshotVersion-alpha-SNAPSHOT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ index 7900c9a4d9..80383d7c22 100644
--- a/version.gradle.kts
+++ b/version.gradle.kts
@@ -1,5 +1,5 @@
-val stableVersion = "2.11.0"
-val alphaVersion = "2.11.0-alpha"
-val stableVersion = "2.11.0-adot1"
-val alphaVersion = "2.11.0-adot1-alpha"
+val stableVersion = "2.11.0-adot-lambda1"
+val alphaVersion = "2.11.0-adot-lambda1-alpha"

Expand Down
24 changes: 24 additions & 0 deletions scripts/local_patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,28 @@ if [[ -f "$OTEL_JAVA_CONTRIB_PATCH" ]]; then
rm -rf opentelemetry-java-contrib
else
echo "Skipping patching opentelemetry-java-contrib"
fi


# Patching opentelemetry-java-instrumentation
OTEL_JAVA_INSTRUMENTATION_PATCH=".github/patches/opentelemetry-java-instrumentation.patch"
if [[ -f "$OTEL_JAVA_INSTRUMENTATION_PATCH" ]]; then
echo "Patching opentelemetry-java-instrumentation"
git clone https://github.com/open-telemetry/opentelemetry-java-instrumentation.git
cd opentelemetry-java-instrumentation

echo "Checking out tag ${OTEL_JAVA_INSTRUMENTATION_VERSION}"
git checkout ${OTEL_JAVA_INSTRUMENTATION_VERSION} -b tag-${OTEL_JAVA_INSTRUMENTATION_VERSION}
patch -p1 < "../${OTEL_JAVA_INSTRUMENTATION_PATCH}"
git commit -a -m "ADOT Patch release"

echo "Building patched opentelemetry-java-instrumentation"
./gradlew clean assemble
./gradlew publishToMavenLocal
cd -

echo "Cleaning up opentelemetry-java-instrumentation"
rm -rf opentelemetry-java-instrumentation
else
echo "Skipping patching opentelemetry-java-instrumentation"
fi
Loading