Skip to content

Commit acffa97

Browse files
authored
Merge branch 'main' into add-option-withparent-to-annotation-withspan
2 parents 70531f5 + 4345a77 commit acffa97

File tree

503 files changed

+10826
-1235
lines changed

Some content is hidden

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

503 files changed

+10826
-1235
lines changed

.fossa.yml

+15-9
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ targets:
4949
- type: gradle
5050
path: ./
5151
target: ':testing:agent-for-testing'
52+
- type: gradle
53+
path: ./
54+
target: ':instrumentation:activej-http-6.0:javaagent'
5255
- type: gradle
5356
path: ./
5457
target: ':instrumentation:alibaba-druid-1.0:javaagent'
@@ -423,10 +426,10 @@ targets:
423426
target: ':instrumentation:elasticsearch:elasticsearch-rest-7.0:library'
424427
- type: gradle
425428
path: ./
426-
target: ':instrumentation:elasticsearch:elasticsearch-rest-common:javaagent'
429+
target: ':instrumentation:elasticsearch:elasticsearch-rest-common-5.0:javaagent'
427430
- type: gradle
428431
path: ./
429-
target: ':instrumentation:elasticsearch:elasticsearch-rest-common:library'
432+
target: ':instrumentation:elasticsearch:elasticsearch-rest-common-5.0:library'
430433
- type: gradle
431434
path: ./
432435
target: ':instrumentation:elasticsearch:elasticsearch-transport-5.0:javaagent'
@@ -691,12 +694,6 @@ targets:
691694
- type: gradle
692695
path: ./
693696
target: ':instrumentation:netty:netty-3.8:javaagent'
694-
- type: gradle
695-
path: ./
696-
target: ':instrumentation:netty:netty-4-common:javaagent'
697-
- type: gradle
698-
path: ./
699-
target: ':instrumentation:netty:netty-4-common:library'
700697
- type: gradle
701698
path: ./
702699
target: ':instrumentation:netty:netty-4.0:javaagent'
@@ -709,6 +706,12 @@ targets:
709706
- type: gradle
710707
path: ./
711708
target: ':instrumentation:netty:netty-common:library'
709+
- type: gradle
710+
path: ./
711+
target: ':instrumentation:netty:netty-common-4.0:javaagent'
712+
- type: gradle
713+
path: ./
714+
target: ':instrumentation:netty:netty-common-4.0:library'
712715
- type: gradle
713716
path: ./
714717
target: ':instrumentation:okhttp:okhttp-2.2:javaagent'
@@ -892,6 +895,9 @@ targets:
892895
- type: gradle
893896
path: ./
894897
target: ':instrumentation:spring:spring-kafka-2.7:library'
898+
- type: gradle
899+
path: ./
900+
target: ':instrumentation:spring:spring-pulsar-1.0:javaagent'
895901
- type: gradle
896902
path: ./
897903
target: ':instrumentation:spring:spring-rabbit-1.0:javaagent'
@@ -1008,7 +1014,7 @@ targets:
10081014
target: ':instrumentation:kafka:kafka-clients:kafka-clients-2.6:library'
10091015
- type: gradle
10101016
path: ./
1011-
target: ':instrumentation:kafka:kafka-clients:kafka-clients-common:library'
1017+
target: ':instrumentation:kafka:kafka-clients:kafka-clients-common-0.11:library'
10121018
- type: gradle
10131019
path: ./
10141020
target: ':instrumentation:log4j:log4j-context-data:log4j-context-data-2.17:javaagent'

.github/renovate.json5

+6
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@
7878
'com.gradleup.shadow{/,}**',
7979
],
8080
},
81+
{
82+
groupName: 'jackson packages',
83+
matchPackageNames: [
84+
'com.fasterxml.jackson{/,}**',
85+
],
86+
},
8187
{
8288
// prevent update to 2.4-groovy-4.0-SNAPSHOT
8389
allowedVersions: '!/\\-SNAPSHOT$/',

.github/scripts/check-latest-dep-test-overrides.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# all missing version coverage should be documented in supported-libraries.md
44

55
if grep -r --include build.gradle.kts latestDepTestLibrary instrumentation \
6-
| grep -v :+\" \
6+
| grep -v -e :+\" -e :latest.release\" \
77
| grep -v "// see .* module" \
88
| grep -v "// see test suite below" \
99
| grep -v "// no longer applicable" \
+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/bash -e
2+
3+
# shellcheck disable=SC2001
4+
5+
for dir in $(find instrumentation -name "*.java" | grep library/src/main/java | sed 's#/[^/]*$##' | sort -u); do
6+
7+
module_name=$(echo "$dir" | sed 's#.*/\([^/]*\)/library/src/main/java/.*#\1#')
8+
9+
if [[ "$module_name" =~ java-* ]]; then
10+
continue
11+
fi
12+
if [[ "$module_name" == "jdbc" ]]; then
13+
continue
14+
fi
15+
if [[ "$module_name" == "jmx-metrics" ]]; then
16+
continue
17+
fi
18+
if [[ "$module_name" == "resources" ]]; then
19+
continue
20+
fi
21+
if [[ "$module_name" == "oshi" ]]; then
22+
continue
23+
fi
24+
25+
# these are possibly problematic
26+
if [[ "$dir" == "instrumentation/grpc-1.6/library/src/main/java/io/grpc/override" ]]; then
27+
continue
28+
fi
29+
if [[ "$dir" == "instrumentation/lettuce/lettuce-5.1/library/src/main/java/io/lettuce/core/protocol" ]]; then
30+
continue
31+
fi
32+
33+
# some common modules don't have any base version
34+
# - lettuce-common
35+
# - netty-common
36+
if [[ ! "$module_name" =~ [0-9]$ && "$module_name" != "lettuce-common" && "$module_name" != "netty-common" ]]; then
37+
echo "module name doesn't have a base version: $dir"
38+
exit 1
39+
fi
40+
41+
simple_module_name=$(echo "$module_name" | sed 's/-[0-9.]*$//' | sed 's/-//g')
42+
base_version=$(echo "$module_name" | sed 's/.*-\([0-9.]*\)$/\1/' | sed 's/\./_/')
43+
44+
if [[ ! "$module_name" =~ [0-9]$ && "$module_name" != "lettuce-common" && "$module_name" != "netty-common" ]]; then
45+
expected_package_name="io/opentelemetry/instrumentation/$simple_module_name/v$base_version"
46+
else
47+
expected_package_name="io/opentelemetry/instrumentation/$simple_module_name"
48+
fi
49+
50+
package_name=$(echo "$dir" | sed 's#.*/src/main/java/##')
51+
52+
# deal with differences like module name elasticsearch-rest and package name elasticsearch.rest
53+
expected_package_name_normalized=$(echo "$expected_package_name" | sed 's#/##g')
54+
package_name_normalized=$(echo "$package_name" | sed 's#/##g')
55+
56+
if [[ "$package_name_normalized" != "$expected_package_name_normalized"* ]]; then
57+
echo "ERROR: $dir"
58+
exit 1
59+
fi
60+
61+
done
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash -e
22

3-
grep -Pohr --include '*.java' --exclude-dir=test \"otel.instrumentation.[^\"]+\" \
3+
grep -Eohr --include '*.java' --exclude-dir="test*" \"otel.instrumentation.[^\"]+\" \
44
| grep -v otel.instrumentation.internal \
55
| sort -u

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
- name: Use CLA approved bot
8585
run: .github/scripts/use-cla-approved-bot.sh
8686

87-
- uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
87+
- uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
8888
id: otelbot-token
8989
with:
9090
app-id: ${{ vars.OTELBOT_APP_ID }}

.github/workflows/backport.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Use CLA approved bot
3030
run: .github/scripts/use-cla-approved-bot.sh
3131

32-
- uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
32+
- uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
3333
id: otelbot-token
3434
with:
3535
app-id: ${{ vars.OTELBOT_APP_ID }}

.github/workflows/build-common.yml

+44-19
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,13 @@ jobs:
163163

164164
- run: .github/scripts/check-latest-dep-test-overrides.sh
165165

166+
check-package-names:
167+
runs-on: ubuntu-latest
168+
steps:
169+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
170+
171+
- run: .github/scripts/check-package-names.sh
172+
166173
build:
167174
runs-on: ubuntu-latest
168175
steps:
@@ -205,7 +212,7 @@ jobs:
205212
fi
206213
207214
- name: Upload agent jar
208-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
215+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
209216
with:
210217
name: opentelemetry-javaagent.jar
211218
path: javaagent/build/libs/opentelemetry-javaagent-*-SNAPSHOT.jar
@@ -216,14 +223,14 @@ jobs:
216223
mkdir sboms
217224
cp javaagent/build/spdx/*.spdx.json sboms
218225
219-
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
226+
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
220227
name: Upload SBOMs
221228
with:
222229
name: opentelemetry-java-instrumentation-SBOM.zip
223230
path: "sboms/*.json"
224231

225232
test:
226-
name: test${{ matrix.test-partition }} (${{ matrix.test-java-version }}, ${{ matrix.vm }})
233+
name: test${{ matrix.test-partition }} (${{ matrix.test-java-version }}, ${{ matrix.vm }}, indy ${{ matrix.test-indy }})
227234
runs-on: ubuntu-latest
228235
strategy:
229236
matrix:
@@ -233,6 +240,7 @@ jobs:
233240
- 17
234241
- 21
235242
- 23
243+
- 24-ea
236244
vm:
237245
- hotspot
238246
- openj9
@@ -241,8 +249,13 @@ jobs:
241249
- 1
242250
- 2
243251
- 3
252+
test-indy:
253+
- false
254+
- true
244255
exclude:
245256
- vm: ${{ inputs.skip-openj9-tests && 'openj9' || '' }}
257+
- test-java-version: 24-ea
258+
vm: openj9
246259
fail-fast: false
247260
steps:
248261
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -272,7 +285,7 @@ jobs:
272285

273286
# vaadin tests use pnpm
274287
- name: Cache pnpm modules
275-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
288+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
276289
with:
277290
path: ~/.pnpm-store
278291
key: ${{ runner.os }}-test-cache-pnpm-modules
@@ -307,6 +320,7 @@ jobs:
307320
${{ env.test-tasks }}
308321
-PtestJavaVersion=${{ matrix.test-java-version }}
309322
-PtestJavaVM=${{ matrix.vm }}
323+
-PtestIndy=${{ matrix.test-indy }}
310324
-Porg.gradle.java.installations.paths=${{ steps.setup-test-java.outputs.path }}
311325
-Porg.gradle.java.installations.auto-download=false
312326
${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
@@ -324,15 +338,22 @@ jobs:
324338
with:
325339
result-encoding: string
326340
script: |
327-
const { data: workflow_run } = await github.rest.actions.listJobsForWorkflowRun({
328-
owner: context.repo.owner,
329-
repo: context.repo.repo,
330-
run_id: context.runId,
331-
per_page: 100
332-
});
333341
const matrix = JSON.parse(process.env.matrix);
334-
const job_name = `common / test${ matrix['test-partition'] } (${ matrix['test-java-version'] }, ${ matrix.vm })`;
335-
return workflow_run.jobs.find((job) => job.name === job_name).html_url;
342+
const job_name = `common / test${ matrix['test-partition'] } (${ matrix['test-java-version'] }, ${ matrix.vm }, indy ${ matrix['test-indy'] })`;
343+
344+
const workflow_jobs_nested = await github.paginate(
345+
github.rest.actions.listJobsForWorkflowRun,
346+
{
347+
owner: context.repo.owner,
348+
repo: context.repo.repo,
349+
run_id: context.runId,
350+
per_page: 100
351+
},
352+
(response) => {
353+
return response.data;
354+
},
355+
);
356+
return workflow_jobs_nested.flat().find((job) => job.name === job_name).html_url;
336357
337358
- name: Flaky test report
338359
if: ${{ !cancelled() }}
@@ -347,15 +368,15 @@ jobs:
347368
348369
- name: Upload deadlock detector artifacts if any
349370
if: failure()
350-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
371+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
351372
with:
352-
name: deadlock-detector-test-${{ matrix.test-java-version }}-${{ matrix.vm }}-${{ matrix.test-partition }}
373+
name: deadlock-detector-test-${{ matrix.test-java-version }}-${{ matrix.vm }}-${{ matrix.test-partition }}-indy-${{ matrix.test-indy }}
353374
path: /tmp/deadlock-detector-*
354375
if-no-files-found: ignore
355376

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

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

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

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

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

520+
- name: Build benchmark-overhead
521+
run: ./gradlew assemble ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
522+
working-directory: benchmark-overhead
523+
499524
- name: Run muzzle check against extension
500525
run: ./gradlew muzzle --init-script ../../.github/scripts/local.init.gradle.kts
501526
working-directory: examples/extension

.github/workflows/build-daily-no-build-cache.yml

-7
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ jobs:
2424
secrets:
2525
FLAKY_TEST_REPORTER_ACCESS_KEY: ${{ secrets.FLAKY_TEST_REPORTER_ACCESS_KEY }}
2626

27-
test-indy:
28-
uses: ./.github/workflows/reusable-test-indy.yml
29-
with:
30-
no-build-cache: true
31-
secrets:
32-
FLAKY_TEST_REPORTER_ACCESS_KEY: ${{ secrets.FLAKY_TEST_REPORTER_ACCESS_KEY }}
33-
3427
# muzzle is not included here because it doesn't use gradle cache anyway and so is already covered
3528
# by the normal daily build
3629

.github/workflows/build-daily.yml

-5
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ jobs:
2020
secrets:
2121
FLAKY_TEST_REPORTER_ACCESS_KEY: ${{ secrets.FLAKY_TEST_REPORTER_ACCESS_KEY }}
2222

23-
test-indy:
24-
uses: ./.github/workflows/reusable-test-indy.yml
25-
secrets:
26-
FLAKY_TEST_REPORTER_ACCESS_KEY: ${{ secrets.FLAKY_TEST_REPORTER_ACCESS_KEY }}
27-
2823
muzzle:
2924
uses: ./.github/workflows/reusable-muzzle.yml
3025

.github/workflows/build-pull-request.yml

-5
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ jobs:
2929
with:
3030
cache-read-only: true
3131

32-
test-indy:
33-
uses: ./.github/workflows/reusable-test-indy.yml
34-
with:
35-
cache-read-only: true
36-
3732
test-native:
3833
uses: ./.github/workflows/reusable-native-tests.yml
3934
with:

0 commit comments

Comments
 (0)