Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force inlining of classloading instrumentations to prevent indy recursions #13282

Merged
merged 17 commits into from
Mar 5, 2025
Merged
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
Prev Previous commit
merge
laurit committed Mar 5, 2025
commit efd749f164ed39ddf4e8a748cc9902794e26730b
3 changes: 3 additions & 0 deletions .fossa.yml
Original file line number Diff line number Diff line change
@@ -49,6 +49,9 @@ targets:
- type: gradle
path: ./
target: ':testing:agent-for-testing'
- type: gradle
path: ./
target: ':instrumentation:activej-http-6.0:javaagent'
- type: gradle
path: ./
target: ':instrumentation:alibaba-druid-1.0:javaagent'
6 changes: 6 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -78,6 +78,12 @@
'com.gradleup.shadow{/,}**',
],
},
{
groupName: 'jackson packages',
matchPackageNames: [
'com.fasterxml.jackson{/,}**',
],
},
{
// prevent update to 2.4-groovy-4.0-SNAPSHOT
allowedVersions: '!/\\-SNAPSHOT$/',
2 changes: 1 addition & 1 deletion .github/scripts/check-latest-dep-test-overrides.sh
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
# all missing version coverage should be documented in supported-libraries.md

if grep -r --include build.gradle.kts latestDepTestLibrary instrumentation \
| grep -v :+\" \
| grep -v -e :+\" -e :latest.release\" \
| grep -v "// see .* module" \
| grep -v "// see test suite below" \
| grep -v "// no longer applicable" \
2 changes: 1 addition & 1 deletion .github/workflows/auto-update-otel-sdk.yml
Original file line number Diff line number Diff line change
@@ -84,7 +84,7 @@ jobs:
- name: Use CLA approved bot
run: .github/scripts/use-cla-approved-bot.sh

- uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
- uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
9 changes: 8 additions & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ jobs:
- name: Use CLA approved bot
run: .github/scripts/use-cla-approved-bot.sh

- uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
- uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
@@ -48,7 +48,14 @@ jobs:

git checkout -b $branch
git cherry-pick $commit

# note this push will fail if the backport contains any workflow files
# because secrets.GITHUB_TOKEN doesn't have this permission
# supporting this would require another access token with content write
# and workflow write permissions
# so for now at least PRs that update workflow files need to be backported manually
git push --set-upstream origin $branch

gh pr create --title "[$GITHUB_REF_NAME] $title" \
--body "Clean cherry-pick of #$NUMBER to the \`$GITHUB_REF_NAME\` branch." \
--base $GITHUB_REF_NAME
22 changes: 13 additions & 9 deletions .github/workflows/build-common.yml
Original file line number Diff line number Diff line change
@@ -205,7 +205,7 @@ jobs:
fi

- name: Upload agent jar
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: opentelemetry-javaagent.jar
path: javaagent/build/libs/opentelemetry-javaagent-*-SNAPSHOT.jar
@@ -216,7 +216,7 @@ jobs:
mkdir sboms
cp javaagent/build/spdx/*.spdx.json sboms

- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
name: Upload SBOMs
with:
name: opentelemetry-java-instrumentation-SBOM.zip
@@ -275,7 +275,7 @@ jobs:

# vaadin tests use pnpm
- name: Cache pnpm modules
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-test-cache-pnpm-modules
@@ -358,15 +358,15 @@ jobs:

- name: Upload deadlock detector artifacts if any
if: failure()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: deadlock-detector-test-${{ matrix.test-java-version }}-${{ matrix.vm }}-${{ matrix.test-partition }}-indy-${{ matrix.test-indy }}
path: /tmp/deadlock-detector-*
if-no-files-found: ignore

- name: Upload jvm crash dump files if any
if: failure()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: javacore-test-${{ matrix.test-java-version }}-${{ matrix.test-partition }}
path: |
@@ -426,11 +426,11 @@ jobs:
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=none --no-daemon ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}

- name: Test
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }}${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }} ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}

- name: Upload jvm crash dump files if any
if: failure()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: javacore-smoke-test-${{ matrix.smoke-test-suite }}-${{ matrix.os }}
# we expect crash dumps either in root director or in smoke-tests
@@ -500,13 +500,17 @@ jobs:
working-directory: gradle-plugins

- name: Build distro
run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
working-directory: examples/distro

- name: Build extension
run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
working-directory: examples/extension

- name: Build benchmark-overhead
run: ./gradlew assemble ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
working-directory: benchmark-overhead

- name: Run muzzle check against extension
run: ./gradlew muzzle --init-script ../../.github/scripts/local.init.gradle.kts
working-directory: examples/extension
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ jobs:
cache-read-only: ${{ github.event_name == 'pull_request' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
with:
languages: java, actions
# using "latest" helps to keep up with the latest Kotlin support
@@ -65,4 +65,4 @@ jobs:
run: ./gradlew assemble -x javadoc -x :instrumentation:quarkus-resteasy-reactive:quarkus3-testing:quarkusGenerateCodeDev -x :instrumentation:quarkus-resteasy-reactive:quarkus2-testing:quarkusGenerateCodeDev --no-build-cache --no-daemon

- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
6 changes: 3 additions & 3 deletions .github/workflows/ossf-scorecard.yml
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ jobs:
with:
persist-credentials: false

- uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
- uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
with:
results_file: results.sarif
results_format: sarif
@@ -33,7 +33,7 @@ jobs:
# uploads of run results in SARIF format to the repository Actions tab.
# https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
- name: "Upload artifact"
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: SARIF file
path: results.sarif
@@ -42,6 +42,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/owasp-dependency-check-daily.yml
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ jobs:

- name: Upload report
if: always()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
path: javaagent/build/reports

2 changes: 1 addition & 1 deletion .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ jobs:
- name: Use CLA approved bot
run: .github/scripts/use-cla-approved-bot.sh

- uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
- uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
4 changes: 2 additions & 2 deletions .github/workflows/prepare-release-branch.yml
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ jobs:
- name: Use CLA approved bot
run: .github/scripts/use-cla-approved-bot.sh

- uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
- uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
@@ -120,7 +120,7 @@ jobs:
- name: Use CLA approved bot
run: .github/scripts/use-cla-approved-bot.sh

- uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
- uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
4 changes: 2 additions & 2 deletions .github/workflows/publish-petclinic-benchmark-image.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
- uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0

- name: Login to GitHub container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
@@ -32,7 +32,7 @@ jobs:
run: echo "TS=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV

- name: Push to GitHub packages
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
push: true
file: benchmark-overhead/Dockerfile.petclinic
2 changes: 1 addition & 1 deletion .github/workflows/release-update-cloudfoundry-index.yml
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ jobs:
- name: display changes
run: git diff

- uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
- uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ jobs:
cp javaagent/build/spdx/*.spdx.json sboms
zip opentelemetry-java-instrumentation-SBOM.zip sboms/*

- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
name: Upload SBOMs
with:
name: opentelemetry-java-instrumentation-SBOM
@@ -219,7 +219,7 @@ jobs:
- name: Use CLA approved bot
run: .github/scripts/use-cla-approved-bot.sh

- uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
- uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
@@ -288,7 +288,7 @@ jobs:
- name: Use CLA approved bot
run: .github/scripts/use-cla-approved-bot.sh

- uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
- uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
@@ -301,7 +301,7 @@ jobs:
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
message="Update apidiff baseline to released version $VERSION"
body="Update apidiff baseline to released version \`$version\`."
body="Update apidiff baseline to released version \`$VERSION\`."
branch="otelbot/update-apidiff-baseline-to-released-version-${VERSION}"

git checkout -b $branch
2 changes: 1 addition & 1 deletion .github/workflows/reusable-native-tests.yml
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- id: read-java
run: echo "version=$(cat .java-version)" >> "$GITHUB_OUTPUT"
- uses: graalvm/setup-graalvm@aafbedb8d382ed0ca6167d3a051415f20c859274 # v1.2.8.1
- uses: graalvm/setup-graalvm@b0cb26a8da53cb3e97cdc0c827d8e3071240e730 # v1.3.1.1
with:
version: "latest"
java-version: "${{ steps.read-java.outputs.version }}"
6 changes: 3 additions & 3 deletions .github/workflows/reusable-test-latest-deps.yml
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ jobs:

# vaadin tests use pnpm
- name: Cache pnpm modules
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-test-latest-cache-pnpm-modules
@@ -114,15 +114,15 @@ jobs:

- name: Upload deadlock detector artifacts if any
if: failure()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: deadlock-detector-test-latest-${{ matrix.test-java-version }}-${{ matrix.vm }}-${{ matrix.test-partition }}
path: /tmp/deadlock-detector-*
if-no-files-found: ignore

- name: Upload jvm crash dump files if any
if: failure()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: javacore-test-latest-${{ matrix.test-java-version }}-${{ matrix.test-partition }}
path: |
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,33 @@

## Unreleased

### Migration notes

- The `java.net.http.HttpClient` instrumentation package
`io.opentelemetry.instrumentation.httpclient` was deprecated in favor of the new package name
`io.opentelemetry.instrumentation.javahttpclient`

## Version 2.13.3 (2025-02-28)

### 🛠️ Bug fixes

- Backport: Fix failure to start when AWS Resource Provider is enabled
([#13420](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/13420))

## Version 2.13.2 (2025-02-27)

### 🛠️ Bug fixes

- Backport: Fix Spring boot starter dependency resolution failure with Gradle and Java 11
([#13402](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/13402))

## Version 2.13.1 (2025-02-18)

### 🛠️ Bug fixes

- Backport: Fix double instrumentation of Java runtime metrics
([#13339](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/13339))

## Version 2.13.0 (2025-02-17)

### Migration notes
2 changes: 1 addition & 1 deletion benchmark-overhead-jmh/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ otelJava {
}

dependencies {
jmhImplementation("org.springframework.boot:spring-boot-starter-web:3.4.2")
jmhImplementation("org.springframework.boot:spring-boot-starter-web:3.4.3")
}

tasks {
4 changes: 2 additions & 2 deletions benchmark-overhead/Dockerfile.petclinic
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:11.0.26_4-jdk@sha256:88ffb69a9a26d1b6c56897cb2e34aecf31d67f575d50620a00b54c543eae271e as app-build
FROM eclipse-temurin:11.0.26_4-jdk@sha256:be923b4c9abb99b97b8aa18169bf4598ab570e9b6dc3ca0ecaef433bd2011dcc as app-build

# This is the base image that will contain a built version of the spring-petclinic-rest
# application. Installing the dependencies and maven compiling the application is time
@@ -13,7 +13,7 @@ RUN git checkout 8aa4d49
RUN ./mvnw package -Dmaven.test.skip=true
RUN cp target/spring-petclinic-rest*.jar /app/spring-petclinic-rest.jar

FROM bellsoft/liberica-openjdk-alpine:21.0.6@sha256:fab34f9e4ff5676582c2ed7d23f9a3a63cf7da0b2f9b5285885b849a88862aaf
FROM bellsoft/liberica-openjdk-alpine:21.0.6@sha256:5f23f8082baea518a1657b420dbe19c181483255209b70af836543d6068fed8c
COPY --from=app-build /app/spring-petclinic-rest.jar /app/spring-petclinic-rest.jar
WORKDIR /app
EXPOSE 9966
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.