Skip to content

Commit 0c7123f

Browse files
authored
Merge branch 'main' into declarative-config-thread-details-provider2
2 parents d104fa6 + bea3bd7 commit 0c7123f

File tree

950 files changed

+15341
-7028
lines changed

Some content is hidden

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

950 files changed

+15341
-7028
lines changed

.fossa.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ targets:
157157
- type: gradle
158158
path: ./
159159
target: ':instrumentation:hystrix-1.4:javaagent'
160+
- type: gradle
161+
path: ./
162+
target: ':instrumentation:iceberg-1.8:library'
160163
- type: gradle
161164
path: ./
162165
target: ':instrumentation:influxdb-2.4:javaagent'
@@ -835,6 +838,9 @@ targets:
835838
- type: gradle
836839
path: ./
837840
target: ':instrumentation:opentelemetry-api:opentelemetry-api-1.56:javaagent'
841+
- type: gradle
842+
path: ./
843+
target: ':instrumentation:opentelemetry-api:opentelemetry-api-1.57:javaagent'
838844
- type: gradle
839845
path: ./
840846
target: ':instrumentation:pekko:pekko-actor-1.0:javaagent'
@@ -886,6 +892,15 @@ targets:
886892
- type: gradle
887893
path: ./
888894
target: ':instrumentation:restlet:restlet-2.0:library'
895+
- type: gradle
896+
path: ./
897+
target: ':instrumentation:rocketmq:rocketmq-client-4.8:javaagent'
898+
- type: gradle
899+
path: ./
900+
target: ':instrumentation:rocketmq:rocketmq-client-4.8:library'
901+
- type: gradle
902+
path: ./
903+
target: ':instrumentation:rocketmq:rocketmq-client-5.0:javaagent'
889904
- type: gradle
890905
path: ./
891906
target: ':instrumentation:runtime-telemetry:runtime-telemetry-java17:javaagent'
@@ -1128,16 +1143,13 @@ targets:
11281143
target: ':instrumentation:reactor:reactor-netty:reactor-netty-1.0:javaagent'
11291144
- type: gradle
11301145
path: ./
1131-
target: ':instrumentation:rocketmq:rocketmq-client:rocketmq-client-4.8:javaagent'
1132-
- type: gradle
1133-
path: ./
1134-
target: ':instrumentation:rocketmq:rocketmq-client:rocketmq-client-4.8:library'
1146+
target: ':instrumentation:spring:spring-cloud-gateway:spring-cloud-gateway-2.0:javaagent'
11351147
- type: gradle
11361148
path: ./
1137-
target: ':instrumentation:rocketmq:rocketmq-client:rocketmq-client-5.0:javaagent'
1149+
target: ':instrumentation:spring:spring-cloud-gateway:spring-cloud-gateway-common:javaagent'
11381150
- type: gradle
11391151
path: ./
1140-
target: ':instrumentation:spring:spring-cloud-gateway:spring-cloud-gateway-2.0:javaagent'
1152+
target: ':instrumentation:spring:spring-cloud-gateway:spring-cloud-gateway-webmvc-4.3:javaagent'
11411153
- type: gradle
11421154
path: ./
11431155
target: ':instrumentation:spring:spring-data:spring-data-1.8:javaagent'

.github/config/lychee.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@ exclude = [
2626
'^https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/io/opentelemetry/$',
2727
# new artifact, remove after 2.21.0 release
2828
'^https://central.sonatype.com/artifact/io.opentelemetry.instrumentation/opentelemetry-helidon-4.3$',
29+
# flaky link
30+
'^http://www.slf4j.org.*',
31+
'^https://logback.qos.ch/.*'
2932
]

.github/graal-native-docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ services:
55
- "27017:27017"
66

77
zookeeper:
8-
image: confluentinc/cp-zookeeper:6.2.10
8+
image: confluentinc/cp-zookeeper:7.7.7
99
environment:
1010
ZOOKEEPER_CLIENT_PORT: 2181
1111
ZOOKEEPER_TICK_TIME: 2000
1212
ports:
1313
- "22181:2181"
1414

1515
kafka:
16-
image: confluentinc/cp-kafka:6.2.10
16+
image: confluentinc/cp-kafka:7.7.7
1717
ports:
1818
- 9094:9094
1919
depends_on:
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
mode: agent
3+
---
4+
5+
# Fix PR CI failures
6+
7+
Analyze the CI failures in the PR for the current branch and fix them, following the structured plan below.
8+
9+
Each time this prompt is triggered, assume you are starting fresh from the beginning of the process.
10+
11+
Do not stop a given execution until you have worked through all phases below.
12+
13+
## Phase 0: Validate
14+
15+
1. Verify we're not on a protected branch: `git branch --show-current` should not be `main`
16+
2. Check that the branch is up-to-date with remote: `git fetch && git status` - exit and warn if behind
17+
3. Get the current branch name using `git branch --show-current`
18+
4. Find the PR for this branch using `gh pr list --head <branch-name> --json number,title` and extract the PR number
19+
5. Use `gh pr view <pr-number> --json statusCheckRollup --jq '.statusCheckRollup[] | select(.conclusion == "FAILURE") | {name: .name, detailsUrl: .detailsUrl}'` to get the list of all failed CI jobs
20+
6. Check if there are actually CI failures to fix - if all jobs passed, exit early
21+
22+
## Phase 1: Gather Information
23+
24+
**Phase 1 is for gathering information ONLY. Do NOT analyze failures or look at any code during this phase.**
25+
**Your only goal in Phase 1 is to collect: job names, job IDs, log files, and failed task names.**
26+
27+
1. Delete any existing CI-PLAN.md file: `rm -f CI-PLAN.md`
28+
2. Get repository info: `gh repo view --json owner,name`
29+
3. For unique job type that failed
30+
- **Important**: Ignore duplicate jobs that only differ by parameters inside of parenthesis. For example:
31+
- In `abc / def (x, y, z)`, the job is `abc / def` while x, y, and z are parameters
32+
- **Strategy**: Download logs for 1-2 representative jobs first to identify patterns (e.g., one "build" job, one "test0" job)
33+
- Compilation failures typically repeat across all jobs, so you don't need every log file
34+
- Retrieve logs for selected representative jobs:
35+
- Get the job ID from the failed run by examining the PR status checks JSON
36+
- Download logs using: `cd /tmp && gh auth token | xargs -I {} curl -sSfL -H "Authorization: token {}" -o <job-name>.log "https://api.github.com/repos/<owner>/<repo>/actions/jobs/<job-id>/logs"`
37+
- Example: `cd /tmp && gh auth token | xargs -I {} curl -sSfL -H "Authorization: token {}" -o test0-java8-indy-false.log "https://api.github.com/repos/open-telemetry/opentelemetry-java-instrumentation/actions/jobs/53713949850/logs"`
38+
- The GitHub API responds with an HTTP 302 redirect to blob storage; `-L` (already included) ensures the download follows the redirect and saves the final log contents.
39+
- Find all gradle tasks that failed:
40+
- Search for failed tasks: `grep "Task.*FAILED" /tmp/<job-name>.log`
41+
- Look for test failures: `grep "FAILED" /tmp/<job-name>.log | grep -E "(Test|test)"`
42+
- Example output: `> Task :instrumentation:cassandra:cassandra-4.0:javaagent:test FAILED`
43+
- Extract error context:
44+
- For compilation errors: `grep -B 5 -A 20 "error:" /tmp/<job-name>.log`
45+
- For task failures: `grep -B 2 -A 15 "Task.*FAILED" /tmp/<job-name>.log`
46+
47+
## Phase 2: Create CI-PLAN.md
48+
49+
**ONLY:** Create the CI-PLAN.md file in the repository root with the following structure:
50+
51+
```markdown
52+
# CI Failure Analysis Plan
53+
54+
## Failed Jobs Summary
55+
- Job 1: <job-name> (job ID: <id>)
56+
- Job 2: <job-name> (job ID: <id>)
57+
...
58+
59+
## Unique Failed Gradle Tasks
60+
61+
- [ ] Task: <gradle-task-path>
62+
- Seen in: <job-name-1>, <job-name-2>, ...
63+
- Log files: /tmp/<file1>.log, /tmp/<file2>.log
64+
65+
- [ ] Task: <gradle-task-path>
66+
- Seen in: <job-name-1>, <job-name-2>, ...
67+
- Log files: /tmp/<file1>.log, /tmp/<file2>.log
68+
69+
## Notes
70+
[Any patterns or observations about the failures]
71+
```
72+
73+
## Phase 3: Fix Issues
74+
75+
**Important**: Do not commit CI-PLAN.md - it's only for tracking work during the session
76+
77+
- Work through the CI-PLAN.md, checking items off as you complete them
78+
- For each failed task:
79+
- Analyze the failure
80+
- Implement the fix
81+
- To fix spotless failures: Run `./gradlew :<failed-module-path>:spotlessApply`
82+
- **Test locally before committing**:
83+
- For markdown lint failures: `mise run lint:markdown`
84+
- For compilation errors: `./gradlew <failed-task-path>`
85+
- For test failures: `./gradlew <failed-test-task>`
86+
- Verify the fix resolves the issue
87+
- Update the checkbox in CI-PLAN.md
88+
- Commit each logical fix as a separate commit
89+
- Reminder: do not commit CI-PLAN.md
90+
- Do not git push in this phase
91+
92+
## Phase 4: Validate and Push
93+
94+
- Once all fixes are committed, push the changes: `git push` (or `git push -f` if needed)
95+
- Provide a summary of:
96+
- What failures were found
97+
- What fixes were applied
98+
- Which commits were created

.github/repository-settings.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ private admin repo.
2929
### Organization variables
3030

3131
- `OTELBOT_APP_ID`
32+
- `OTELBOT_JAVA_INSTRUMENTATION_APP_ID` (scoped only to this repo)

.github/scripts/check-javaagent-suppression-keys.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ for file in $(find instrumentation -name "*Module.java"); do
3333
# TODO module is missing a base version
3434
continue
3535
fi
36+
if [[ "$simple_module_name" == spring-cloud-gateway-webmvc ]]; then
37+
# webmvc variant uses spring-cloud-gateway as base name
38+
simple_module_name="spring-cloud-gateway"
39+
fi
3640

3741
if [ "$module_name" == "$simple_module_name" ]; then
3842
expected="super\(\n? *\"$simple_module_name\""

.github/scripts/draft-change-log-entries.sh

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,51 @@ echo
4141
echo "### 🧰 Tooling"
4242
echo
4343

44-
git log --reverse \
45-
--perl-regexp \
46-
--author='^(?!renovate\[bot\] )' \
47-
--pretty=format:"- %s" \
48-
"$range" \
49-
| sed -E 's, *\(#([0-9]+)\)$,\n ([#\1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/\1)),'
50-
echo
44+
# Group commits by file type
45+
declare -A src_main_commits
46+
declare -A no_src_main_commits
47+
48+
while IFS= read -r commit_hash; do
49+
files=$(git diff-tree --no-commit-id --name-only -r "$commit_hash")
50+
51+
has_src_main=false
52+
53+
while IFS= read -r file; do
54+
if [[ $file =~ /src/main/ ]] && [[ ! $file =~ ^smoke-tests/ ]] && [[ ! $file =~ ^smoke-tests-otel-starter/ ]] && [[ ! $file =~ /testing/ ]]; then
55+
has_src_main=true
56+
break
57+
fi
58+
done <<< "$files"
59+
60+
commit_msg=$(git log --format=%s -n 1 "$commit_hash" | sed -E 's, *\(#([0-9]+)\)$,\n ([#\1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/\1)),')
61+
62+
# Categorize commit
63+
if [[ $has_src_main == true ]]; then
64+
src_main_commits["$commit_hash"]="$commit_msg"
65+
else
66+
no_src_main_commits["$commit_hash"]="$commit_msg"
67+
fi
68+
done < <(git log --reverse --perl-regexp --author='^(?!renovate\[bot\] )' --pretty=format:"%H" "$range")
69+
70+
# Output grouped commits
71+
if [[ ${#src_main_commits[@]} -gt 0 ]]; then
72+
echo "#### Changes with src/main updates"
73+
echo
74+
for commit_hash in $(git log --reverse --perl-regexp --author='^(?!renovate\[bot\] )' --pretty=format:"%H" "$range"); do
75+
if [[ -n ${src_main_commits[$commit_hash]} ]]; then
76+
echo "- $(git log --format=%s -n 1 "$commit_hash" | sed -E 's, *\(#([0-9]+)\)$, ([#\1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/\1)),')"
77+
fi
78+
done
79+
echo
80+
fi
81+
82+
if [[ ${#no_src_main_commits[@]} -gt 0 ]]; then
83+
echo "#### Changes without src/main updates"
84+
echo
85+
for commit_hash in $(git log --reverse --perl-regexp --author='^(?!renovate\[bot\] )' --pretty=format:"%H" "$range"); do
86+
if [[ -n ${no_src_main_commits[$commit_hash]} ]]; then
87+
echo "- $(git log --format=%s -n 1 "$commit_hash" | sed -E 's, *\(#([0-9]+)\)$, ([#\1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/\1)),')"
88+
fi
89+
done
90+
echo
91+
fi

.github/scripts/gha-free-disk-space.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@
66
df -h
77
sudo rm -rf /usr/local/lib/android
88
sudo rm -rf /usr/share/dotnet
9+
sudo rm -rf /usr/local/julia*
10+
sudo rm -rf /usr/share/swift
11+
sudo rm -rf /usr/local/.ghcup
912
df -h

.github/workflows/auto-license-report.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
generate:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
18+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1919

2020
- name: Free disk space
2121
run: .github/scripts/gha-free-disk-space.sh
2222

2323
- name: Set up JDK for running Gradle
24-
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
24+
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
2525
with:
2626
distribution: temurin
2727
java-version-file: .java-version
@@ -44,7 +44,7 @@ jobs:
4444
4545
- name: Upload patch file
4646
if: steps.create-patch.outputs.exists == 'true'
47-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
47+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
4848
with:
4949
path: patch
5050
name: patch
@@ -55,7 +55,7 @@ jobs:
5555
needs: generate
5656
steps:
5757
- name: Download patch
58-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
58+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
5959
with:
6060
path: ${{ runner.temp }}
6161

@@ -67,14 +67,14 @@ jobs:
6767
echo "exists=true" >> $GITHUB_OUTPUT
6868
fi
6969
70-
- uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0
70+
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
7171
if: steps.check-patch.outputs.exists == 'true'
7272
id: otelbot-token
7373
with:
74-
app-id: ${{ secrets.OTELBOT_JAVA_INSTRUMENTATION_APP_ID }}
74+
app-id: ${{ vars.OTELBOT_JAVA_INSTRUMENTATION_APP_ID }}
7575
private-key: ${{ secrets.OTELBOT_JAVA_INSTRUMENTATION_PRIVATE_KEY }}
7676

77-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
77+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
7878
if: steps.check-patch.outputs.exists == 'true'
7979
with:
8080
token: ${{ steps.otelbot-token.outputs.token }}

.github/workflows/auto-update-otel-sdk.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
latest-version: ${{ steps.check-versions.outputs.latest-version }}
1818
already-opened: ${{ steps.check-versions.outputs.already-opened }}
1919
steps:
20-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
20+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2121

2222
- id: check-versions
2323
name: Check versions
@@ -55,7 +55,7 @@ jobs:
5555
needs:
5656
- check-versions
5757
steps:
58-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
58+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
5959

6060
- name: Update version
6161
env:
@@ -66,7 +66,7 @@ jobs:
6666
run: .github/scripts/gha-free-disk-space.sh
6767

6868
- name: Set up JDK for running Gradle
69-
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
69+
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
7070
with:
7171
distribution: temurin
7272
java-version-file: .java-version
@@ -75,7 +75,8 @@ jobs:
7575
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
7676

7777
- name: Update license report
78-
run: ./gradlew generateLicenseReport
78+
# with the build cache enabled occasionally produces outdated results
79+
run: ./gradlew generateLicenseReport --no-build-cache
7980

8081
- name: Undo license report clean
8182
if: failure()
@@ -84,7 +85,7 @@ jobs:
8485
- name: Use CLA approved bot
8586
run: .github/scripts/use-cla-approved-bot.sh
8687

87-
- uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0
88+
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
8889
id: otelbot-token
8990
with:
9091
app-id: ${{ vars.OTELBOT_APP_ID }}

0 commit comments

Comments
 (0)