Skip to content

Commit 4fa1d92

Browse files
committed
Merge branch 'main' into feat/add-jvm-file-descriptors-to-runtime-instrumentation
2 parents 3eb98c8 + 814fbef commit 4fa1d92

File tree

68 files changed

+1904
-180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1904
-180
lines changed

.github/repository-settings.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ settings](https://github.com/open-telemetry/community/blob/main/docs/how-to-conf
132132

133133
- `FOSSA_API_KEY`
134134
- `OTELBOT_PRIVATE_KEY`
135+
- `OTELBOT_JAVA_INSTRUMENTATION_PRIVATE_KEY`
135136

136137
### Organization variables
137138

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Auto license report
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- synchronize
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
check:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
21+
- name: Free disk space
22+
run: .github/scripts/gha-free-disk-space.sh
23+
24+
- name: Set up JDK for running Gradle
25+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
26+
with:
27+
distribution: temurin
28+
java-version-file: .java-version
29+
30+
- name: Set up gradle
31+
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
32+
with:
33+
cache-read-only: true
34+
35+
- name: Check out PR branch
36+
env:
37+
GH_TOKEN: ${{ github.token }}
38+
run: gh pr checkout ${{ github.event.pull_request.number }}
39+
40+
- name: Update license report
41+
run: ./gradlew generateLicenseReport --no-build-cache
42+
43+
- id: create-patch
44+
name: Create patch file
45+
run: |
46+
git diff > patch
47+
if [ -s patch ]; then
48+
echo "exists=true" >> "$GITHUB_OUTPUT"
49+
fi
50+
51+
- name: Upload patch file
52+
if: steps.create-patch.outputs.exists == 'true'
53+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
54+
with:
55+
path: patch
56+
name: patch
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Auto spotless
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- synchronize
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
check:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
21+
- name: Free disk space
22+
run: .github/scripts/gha-free-disk-space.sh
23+
24+
- name: Set up JDK for running Gradle
25+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
26+
with:
27+
distribution: temurin
28+
java-version-file: .java-version
29+
30+
- name: Set up gradle
31+
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
32+
with:
33+
cache-read-only: true
34+
35+
- name: Check out PR branch
36+
env:
37+
GH_TOKEN: ${{ github.token }}
38+
run: gh pr checkout ${{ github.event.pull_request.number }}
39+
40+
- name: Spotless
41+
run: ./gradlew spotlessApply
42+
43+
- id: create-patch
44+
name: Create patch file
45+
run: |
46+
git diff > patch
47+
if [ -s patch ]; then
48+
echo "exists=true" >> "$GITHUB_OUTPUT"
49+
fi
50+
51+
- name: Upload patch file
52+
if: steps.create-patch.outputs.exists == 'true'
53+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
54+
with:
55+
path: patch
56+
name: patch
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Auto update pull request
2+
on:
3+
workflow_run:
4+
workflows:
5+
- "Auto spotless"
6+
- "Auto license report"
7+
types:
8+
- completed
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
apply:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
steps:
20+
- name: Download patch
21+
uses: actions/[email protected]
22+
with:
23+
run-id: ${{ github.event.workflow_run.id }}
24+
path: ${{ runner.temp }}
25+
merge-multiple: true
26+
github-token: ${{ github.token }}
27+
28+
- id: unzip-patch
29+
name: Unzip patch
30+
working-directory: ${{ runner.temp }}
31+
run: |
32+
if [ -f patch ]; then
33+
echo "exists=true" >> $GITHUB_OUTPUT
34+
fi
35+
36+
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
37+
if: steps.unzip-patch.outputs.exists == 'true'
38+
id: otelbot-token
39+
with:
40+
app-id: 1295839
41+
private-key: ${{ secrets.OTELBOT_JAVA_INSTRUMENTATION_PRIVATE_KEY }}
42+
43+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
44+
if: steps.unzip-patch.outputs.exists == 'true'
45+
with:
46+
token: ${{ steps.otelbot-token.outputs.token }}
47+
48+
- id: get-pr
49+
if: steps.unzip-patch.outputs.exists == 'true'
50+
name: Get PR
51+
env:
52+
PR_BRANCH: |-
53+
${{
54+
(github.event.workflow_run.head_repository.owner.login != github.event.workflow_run.repository.owner.login)
55+
&& format('{0}:{1}', github.event.workflow_run.head_repository.owner.login, github.event.workflow_run.head_branch)
56+
|| github.event.workflow_run.head_branch
57+
}}
58+
GH_TOKEN: ${{ github.token }}
59+
run: |
60+
echo gh pr view "${PR_BRANCH}" --json number --jq .number
61+
number=$(gh pr view "${PR_BRANCH}" --json number --jq .number)
62+
echo $number
63+
echo "number=$number" >> $GITHUB_OUTPUT
64+
65+
- name: Check out PR branch
66+
if: steps.unzip-patch.outputs.exists == 'true'
67+
env:
68+
GH_TOKEN: ${{ github.token }}
69+
run: gh pr checkout ${{ steps.get-pr.outputs.number }}
70+
71+
- name: Use CLA approved github bot
72+
if: steps.unzip-patch.outputs.exists == 'true'
73+
# IMPORTANT do not call the .github/scripts/use-cla-approved-bot.sh
74+
# since that script could have been compromised in the PR branch
75+
run: |
76+
git config user.name otelbot
77+
git config user.email [email protected]
78+
79+
- name: Apply patch and push
80+
if: steps.unzip-patch.outputs.exists == 'true'
81+
run: |
82+
git apply "${{ runner.temp }}/patch"
83+
git commit -a -m "./gradlew spotlessApply"
84+
git push
85+
86+
- if: steps.unzip-patch.outputs.exists == 'true' && success()
87+
env:
88+
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
89+
run: |
90+
gh pr comment ${{ steps.get-pr.outputs.number }} --body "🔧 The result from spotlessApply was committed to the PR branch."
91+
92+
- if: steps.unzip-patch.outputs.exists == 'true' && failure()
93+
env:
94+
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
95+
run: |
96+
gh pr comment ${{ steps.get-pr.outputs.number }} --body "❌ The result from spotlessApply could not be committed to the PR branch, see logs: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID."

.github/workflows/reusable-markdown-lint-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414

1515
- name: Run markdownlint
1616
run: |
17-
npx markdownlint-cli@0.44.0 -c .github/config/markdownlint.yml -p .gitignore **/*.md -i licenses/licenses.md
17+
npx markdownlint-cli@0.45.0 -c .github/config/markdownlint.yml -p .gitignore **/*.md -i licenses/licenses.md

benchmark-overhead-jmh/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ otelJava {
1313
}
1414

1515
dependencies {
16-
jmhImplementation("org.springframework.boot:spring-boot-starter-web:3.4.5")
16+
jmhImplementation("org.springframework.boot:spring-boot-starter-web:3.4.6")
1717
}
1818

1919
tasks {

conventions/src/main/kotlin/otel.java-conventions.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ codenarc {
431431
checkstyle {
432432
configFile = rootProject.file("buildscripts/checkstyle.xml")
433433
// this version should match the version of google_checks.xml used as basis for above configuration
434-
toolVersion = "10.23.1"
434+
toolVersion = "10.24.0"
435435
maxWarnings = 0
436436
}
437437

dependencyManagement/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ val DEPENDENCIES = listOf(
108108
"io.opentelemetry.contrib:opentelemetry-gcp-resources:${otelContribVersion}",
109109
"io.opentelemetry.contrib:opentelemetry-cloudfoundry-resources:${otelContribVersion}",
110110
"io.opentelemetry.contrib:opentelemetry-baggage-processor:${otelContribVersion}",
111-
"io.opentelemetry.proto:opentelemetry-proto:1.5.0-alpha",
111+
"io.opentelemetry.proto:opentelemetry-proto:1.7.0-alpha",
112112
"io.opentelemetry:opentelemetry-extension-annotations:1.18.0", // deprecated, no longer part of bom
113113
"org.assertj:assertj-core:3.27.3",
114114
"org.awaitility:awaitility:4.3.0",

docs/contributing/running-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Java versions
44

5-
Open Telemetry Auto Instrumentation's minimal supported version is java 8.
5+
OpenTelemetry Auto Instrumentation's minimal supported version is java 8.
66
All jar files that we produce, unless noted otherwise, have bytecode
77
compatibility with the java 8 runtime. Our test suite is executed against
88
java 8, all LTS versions and the latest non-LTS version.

docs/safety-mechanisms.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ of the agent.
2929
## Muzzle compile time checks
3030

3131
Muzzle is the tool we use to ensure we do not apply agent instrumentation if it would break the
32-
user's app. Details on its implementation can be found [here](./contributing/muzzle.md).
32+
user's app. Details on its implementation can be found in [muzzle](./contributing/muzzle.md).
3333

3434
Continuous build runs a muzzle compile time check for every library. This check will select random
3535
versions of the library available in Maven and check if our agent will cleanly apply to it. The
@@ -51,7 +51,7 @@ potentially cause linkage errors.
5151

5252
## Classloader separation
5353

54-
See more detail about the class loader separation [here](./contributing/javaagent-structure.md).
54+
See more details about the class loader separation in [javaagent structure](./contributing/javaagent-structure.md).
5555

5656
The Java agent makes sure to include as little code as possible in the user app's class loader, and
5757
all code that is included is either unique to the agent itself or shaded in the agent build. This is

0 commit comments

Comments
 (0)