Skip to content

Commit ab574be

Browse files
authored
Merge branch 'master' into mhlidd/config_inversion_telemetry
2 parents e254dd1 + 2f4f626 commit ab574be

File tree

649 files changed

+5325
-2810
lines changed

Some content is hidden

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

649 files changed

+5325
-2810
lines changed

.github/CODEOWNERS

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,19 @@
1313
/.gitlab-ci.yml @DataDog/apm-release-platform
1414

1515
# @DataDog/apm-sdk-api-java
16-
/dd-trace-ot/ @DataDog/apm-sdk-api-java
16+
/dd-java-agent/agent-otel @DataDog/apm-sdk-api-java
17+
/dd-smoke-tests/sample-trace @DataDog/apm-sdk-api-java
18+
/dd-trace-core/src/main/java/datadog/trace/core/baggage @DataDog/apm-sdk-api-java
19+
/dd-trace-core/src/test/groovy/datadog/trace/core/baggage @DataDog/apm-sdk-api-java
20+
/dd-trace-core/src/main/java/datadog/trace/core/propagation @DataDog/apm-sdk-api-java
21+
/dd-trace-core/src/test/groovy/datadog/trace/core/propagation @DataDog/apm-sdk-api-java
22+
/dd-trace-core/src/main/java/datadog/trace/core/scopemanager @DataDog/apm-sdk-api-java
23+
/dd-trace-core/src/test/groovy/datadog/trace/core/scopemanager @DataDog/apm-sdk-api-java
24+
/dd-trace-ot/ @DataDog/apm-sdk-api-java
25+
/internal-api/src/main/java/datadog/trace/bootstrap @DataDog/apm-sdk-api-java
26+
/internal-api/src/test/groovy/datadog/trace/bootstrap @DataDog/apm-sdk-api-java
27+
/internal-api/src/main/java/datadog/trace/api/sampling @DataDog/apm-sdk-api-java
28+
/internal-api/src/test/groovy/datadog/trace/api/sampling @DataDog/apm-sdk-api-java
1729

1830
# @DataDog/apm-serverless
1931
/dd-trace-core/src/main/java/datadog/trace/lambda/ @DataDog/apm-serverless
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
issuer: https://token.actions.githubusercontent.com
2+
3+
subject: repo:DataDog/dd-trace-java:ref:refs/heads/master
4+
5+
claim_pattern:
6+
event_name: (schedule|workflow_dispatch)
7+
ref: refs/heads/master
8+
ref_protected: "true"
9+
job_workflow_ref: DataDog/dd-trace-java/\.github/workflows/update-docker-build-image\.yaml@refs/heads/master
10+
11+
permissions:
12+
contents: write
13+
pull_requests: write
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
issuer: https://token.actions.githubusercontent.com
2+
3+
subject: repo:DataDog/dd-trace-java:ref:refs/heads/master
4+
5+
claim_pattern:
6+
event_name: (schedule|workflow_dispatch)
7+
ref: refs/heads/master
8+
ref_protected: "true"
9+
job_workflow_ref: DataDog/dd-trace-java/\.github/workflows/update-gradle-dependencies\.yaml@refs/heads/master
10+
11+
permissions:
12+
contents: write
13+
pull_requests: write
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
issuer: https://token.actions.githubusercontent.com
2+
3+
subject: repo:DataDog/dd-trace-java:ref:refs/heads/master
4+
5+
claim_pattern:
6+
event_name: (schedule|workflow_dispatch)
7+
ref: refs/heads/master
8+
ref_protected: "true"
9+
job_workflow_ref: DataDog/dd-trace-java/\.github/workflows/update-jmxfetch-submodule\.yaml@refs/heads/master
10+
11+
permissions:
12+
contents: write
13+
pull_requests: write

.github/workflows/add-release-to-cloudfoundry.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
run: |
4444
echo "${{ steps.get-release-version.outputs.VERSION }}: ${{ steps.get-release-url.outputs.URL }}" >> index.yml
4545
- name: Commit and push changes
46-
uses: planetscale/ghcommit-action@7c35caed9937939812c7d4242ffab823e9b3b1fa # v0.2.16
46+
uses: planetscale/ghcommit-action@322be9669498a4be9ce66efc1169f8f43f6bd883 # v0.2.17
4747
with:
4848
commit_message: "chore: Add version ${{ steps.get-release-version.outputs.VERSION }} to Cloud Foundry"
4949
repo: ${{ github.repository }}

.github/workflows/analyze-changes.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
${{ runner.os }}-gradle-
4141
4242
- name: Initialize CodeQL
43-
uses: github/codeql-action/init@d6bbdef45e766d081b84a2def353b0055f728d3e # v3.29.3
43+
uses: github/codeql-action/init@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
4444
with:
4545
languages: 'java'
4646
build-mode: 'manual'
@@ -57,7 +57,7 @@ jobs:
5757
--build-cache --parallel --stacktrace --no-daemon --max-workers=4
5858
5959
- name: Perform CodeQL Analysis and upload results to GitHub Security tab
60-
uses: github/codeql-action/analyze@d6bbdef45e766d081b84a2def353b0055f728d3e # v3.29.3
60+
uses: github/codeql-action/analyze@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
6161

6262
trivy:
6363
name: Analyze changes with Trivy
@@ -122,7 +122,7 @@ jobs:
122122
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
123123

124124
- name: Upload Trivy scan results to GitHub Security tab
125-
uses: github/codeql-action/upload-sarif@d6bbdef45e766d081b84a2def353b0055f728d3e # v3.29.3
125+
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
126126
if: always()
127127
with:
128128
sarif_file: 'trivy-results.sarif'

.github/workflows/update-docker-build-image.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,27 @@ name: Update Docker Build Image
33
on:
44
schedule:
55
# A day after creating the tag from https://github.com/DataDog/dd-trace-java-docker-build/blob/master/.github/workflows/docker-tag.yml
6-
- cron: '0 0 1 2,5,8,11 *'
6+
- cron: "0 0 1 2,5,8,11 *"
77
workflow_dispatch:
88
inputs:
99
tag:
10-
description: 'The tag to use for the Docker build image'
10+
description: "The tag to use for the Docker build image"
1111
required: true
12-
default: 'vYY.MM'
13-
12+
default: "vYY.MM"
13+
1414
jobs:
1515
update-docker-build-image:
1616
runs-on: ubuntu-latest
1717
permissions:
18-
contents: write # Required to commit and push changes to a new branch
19-
pull-requests: write # Required to create a pull request
18+
contents: write # Required to create and push branch
19+
id-token: write # Required for OIDC token federation
2020
steps:
21+
- uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
22+
id: octo-sts
23+
with:
24+
scope: DataDog/dd-trace-java
25+
policy: self.update-docker-build-image.create-pr
26+
2127
- name: Checkout the repository
2228
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2329
- name: Download ghcommit CLI
@@ -52,15 +58,15 @@ jobs:
5258
echo "::notice::Using Docker build image tag: ${TAG}"
5359
- name: Update the Docker build image in GitLab CI config
5460
run: |
55-
sed -i '' -E 's|(BUILDER_IMAGE_VERSION_PREFIX:)[^#]*([#].*)|\1 "${{ steps.define-tag.outputs.tag }}-" \2|' .gitlab-ci.yml
61+
sed -i -E 's|(BUILDER_IMAGE_VERSION_PREFIX:)[^#]*([#].*)|\1 "${{ steps.define-tag.outputs.tag }}-" \2|' .gitlab-ci.yml
5662
- name: Commit and push changes
5763
env:
58-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
64+
GITHUB_TOKEN: ${{ steps.octo-sts.outputs.token }}
5965
run: |
6066
ghcommit --repository ${{ github.repository }} --branch ${{ steps.define-branch.outputs.branch }} --add .gitlab-ci.yml --message "feat(ci): Update Docker build image"
6167
- name: Create pull request
6268
env:
63-
GH_TOKEN: ${{ github.token }}
69+
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
6470
run: |
6571
gh pr create --title "Update Docker build image" \
6672
--base master \

.github/workflows/update-gradle-dependencies.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
name: Update Gradle dependencies
22
on:
33
schedule:
4-
- cron: '0 4 * * 0'
4+
- cron: "0 4 * * 0"
55
workflow_dispatch:
66

77
jobs:
88
update-gradle-dependencies:
99
runs-on: ubuntu-latest
1010
name: Update Gradle dependencies
1111
permissions:
12-
contents: write # Required to commit and push changes to a new branch
13-
pull-requests: write # Required to create a pull request
12+
contents: write # Required to create new branch
13+
id-token: write # Required for OIDC token federation
1414
steps:
15+
- uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
16+
id: octo-sts
17+
with:
18+
scope: DataDog/dd-trace-java
19+
policy: self.update-gradle-dependencies.create-pr
20+
1521
- name: Checkout repository
1622
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
1723
with:
18-
submodules: 'recursive'
24+
submodules: "recursive"
1925
- name: Download ghcommit CLI
2026
run: |
2127
curl https://github.com/planetscale/ghcommit/releases/download/v0.1.48/ghcommit_linux_amd64 -o /usr/local/bin/ghcommit -L
@@ -37,7 +43,7 @@ jobs:
3743
./gradlew resolveAndLockAll --write-locks --parallel --stacktrace --no-daemon --max-workers=4
3844
- name: Commit changes
3945
env:
40-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
46+
GITHUB_TOKEN: ${{ steps.octo-sts.outputs.token }}
4147
run: |
4248
GH_ADD_ARGS=""
4349
COUNT=0
@@ -69,7 +75,7 @@ jobs:
6975
fi
7076
- name: Create pull request
7177
env:
72-
GH_TOKEN: ${{ github.token }}
78+
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
7379
run: |
7480
# use echo to set a multiline body for the PR
7581
echo -e "This PR updates the Gradle dependencies. ⚠️ Don't forget to squash commits before merging. ⚠️\n\n- [ ] Update PR title if a code change is needed to support one of those new dependencies" | \

.github/workflows/update-jmxfetch-submodule.yaml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,22 @@ on:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write # Required to create and push branch
13+
id-token: write # Required for OIDC token federation
1114
steps:
15+
- uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
16+
id: octo-sts
17+
with:
18+
scope: DataDog/dd-trace-java
19+
policy: self.update-jmxfetch-submodule.create-pr
20+
1221
- name: Checkout repository
1322
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
1423

1524
- name: Update Submodule
1625
run: |
1726
git submodule update --remote -- dd-java-agent/agent-jmxfetch/integrations-core
18-
- name: Download ghcommit CLI
19-
run: |
20-
curl https://github.com/planetscale/ghcommit/releases/download/v0.1.48/ghcommit_linux_amd64 -o /usr/local/bin/ghcommit -L
21-
chmod +x /usr/local/bin/ghcommit
2227
- name: Pick a branch name
2328
id: define-branch
2429
run: echo "branch=ci/update-jmxfetch-submodule-$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
@@ -28,12 +33,21 @@ jobs:
2833
git push -u origin ${{ steps.define-branch.outputs.branch }} --force
2934
- name: Commit and push changes
3035
env:
31-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
36+
GITHUB_TOKEN: ${{ steps.octo-sts.outputs.token }}
3237
run: |
33-
ghcommit --repository ${{ github.repository }} --branch ${{ steps.define-branch.outputs.branch }} --add dd-java-agent/agent-jmxfetch/integrations-core --message "Update agent-jmxfetch submodule"
38+
git config user.name "github-actions[bot]"
39+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
40+
if [[ -z "$(git status -s)" ]]; then
41+
echo "No changes to commit, exiting."
42+
exit 0;
43+
fi
44+
git checkout -b ${{ steps.define-branch.outputs.branch }}
45+
git add dd-java-agent/agent-jmxfetch/integrations-core
46+
git commit -m "Update agent-jmxfetch submodule"
47+
git push origin ${{ steps.define-branch.outputs.branch }}
3448
- name: Create pull request
3549
env:
36-
GH_TOKEN: ${{ github.token }}
50+
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
3751
run: |
3852
gh pr create --title "Update agent-jmxfetch submodule" \
3953
--base master \

.gitlab-ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ workflow:
6060
- "11"
6161
- "17"
6262
- "21"
63+
- "25"
6364
- "stable"
6465
- "semeru11"
6566
- "oracle8"
@@ -254,7 +255,7 @@ build:
254255
CACHE_TYPE: lib
255256
DEPENDENCY_CACHE_POLICY: pull
256257
script:
257-
- if [ $CI_PIPELINE_SOURCE == "schedule" ] ; then ./gradlew resolveAndLockAll --write-locks; fi
258+
- if [ $CI_PIPELINE_SOURCE == "schedule" ] ; then ./gradlew resolveAndLockAll --write-locks $GRADLE_ARGS; fi
258259
- ./gradlew clean :dd-java-agent:shadowJar :dd-trace-api:jar :dd-trace-ot:shadowJar -PskipTests $GRADLE_ARGS
259260
- echo UPSTREAM_TRACER_VERSION=$(java -jar workspace/dd-java-agent/build/libs/*.jar) >> upstream.env
260261
- echo "BUILD_JOB_NAME=$CI_JOB_NAME" >> build.env
@@ -601,11 +602,12 @@ agent_integration_tests:
601602
GRADLE_TARGET: "traceAgentTest"
602603
CACHE_TYPE: "base"
603604
services:
604-
- name: datadog/agent:7.34.0
605+
- name: registry.ddbuild.io/images/mirror/datadog/agent:7.40.1
605606
alias: local-agent
606607
variables:
607608
DD_APM_ENABLED: "true"
608609
DD_BIND_HOST: "0.0.0.0"
610+
DD_HOSTNAME: "local-agent"
609611
DD_API_KEY: "invalid_key_but_this_is_fine"
610612

611613
test_base:

0 commit comments

Comments
 (0)