Skip to content

Commit 555b8d4

Browse files
authored
Merge branch 'master' into sarahchen6/move-macrobenchmarks
2 parents 9f9a624 + 7f66c79 commit 555b8d4

1,613 files changed

Lines changed: 39721 additions & 17391 deletions

File tree

Some content is hidden

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

.claude/CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@../AGENTS.md
2+
3+
## Claude Code workflow
4+
5+
- Before creating a pull request, run `/techdebt` to check for technical debt, code duplication, and unnecessary complexity in the branch changes.

.claude/skills/techdebt/SKILL.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
name: techdebt
3+
description: Analyze branch changes for technical debt, code duplication, and unnecessary complexity
4+
user-invocable: true
5+
context: fork
6+
allowed-tools:
7+
- Bash
8+
- Read
9+
- Grep
10+
- Glob
11+
---
12+
13+
# Techdebt Cleanup Skill
14+
15+
Analyze changes on the current branch to identify and fix technical debt, code duplication, and unnecessary complexity.
16+
17+
## Instructions
18+
19+
### Step 1: Get Branch Changes
20+
21+
Find the merge-base (where this branch diverged from master) and compare against it:
22+
23+
```bash
24+
# Find upstream (DataDog org repo)
25+
UPSTREAM=$(git remote -v | grep -E 'DataDog/[^/]+(.git)?\s' | head -1 | awk '{print $1}')
26+
if [ -z "$UPSTREAM" ]; then
27+
echo "No DataDog upstream found, using origin"
28+
UPSTREAM="origin"
29+
fi
30+
31+
# Find the merge-base (commit where this branch diverged from master)
32+
MERGE_BASE=$(git merge-base HEAD ${UPSTREAM}/master)
33+
echo "Comparing changes introduced on this branch since diverging from master using base commit: $MERGE_BASE"
34+
35+
git diff $MERGE_BASE --stat
36+
git diff $MERGE_BASE --name-status
37+
```
38+
39+
If no changes exist, inform the user and stop.
40+
41+
If changes exist, read the diff and the full content of modified source files (not test files) to understand context.
42+
43+
### Step 2: Analyze for Issues
44+
45+
Look for:
46+
47+
**Code Duplication**
48+
- Similar code blocks that should be extracted into shared functions
49+
- Copy-pasted logic with minor variations
50+
51+
**Unnecessary Complexity**
52+
- Over-engineered solutions (abstractions used only once)
53+
- Excessive indirection or layers
54+
- Backward compatibility shims that aren't needed
55+
56+
**Redundant Code**
57+
- Dead code paths
58+
- Overly defensive checks for impossible scenarios
59+
60+
### Step 3: Report and Fix
61+
62+
Present a concise summary of issues found with file:line references.
63+
64+
Then ask the user if they want you to fix the issues. When fixing:
65+
- Make one logical change at a time
66+
- Do NOT change behavior, only refactor
67+
- Skip trivial or stylistic issues

.github/CODEOWNERS

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -98,26 +98,26 @@
9898
**/*Waf*.java @DataDog/asm-java
9999
**/*Waf*.groovy @DataDog/asm-java
100100

101-
# @DataDog/ci-app-libraries-java
102-
/dd-java-agent/agent-ci-visibility/ @DataDog/ci-app-libraries-java
103-
/dd-java-agent/instrumentation/cucumber-5.4/ @DataDog/ci-app-libraries-java
104-
/dd-java-agent/instrumentation/jacoco-0.8.9/ @DataDog/ci-app-libraries-java
105-
/dd-java-agent/instrumentation/junit @DataDog/ci-app-libraries-java
106-
/dd-java-agent/instrumentation/karate/ @DataDog/ci-app-libraries-java
107-
/dd-java-agent/instrumentation/scalatest-3.0.8/ @DataDog/ci-app-libraries-java
108-
/dd-java-agent/instrumentation/selenium/ @DataDog/ci-app-libraries-java
109-
/dd-java-agent/instrumentation/testng/ @DataDog/ci-app-libraries-java
110-
/dd-java-agent/instrumentation/gradle/ @DataDog/ci-app-libraries-java
111-
/dd-java-agent/instrumentation/gradle-testing/ @DataDog/ci-app-libraries-java
112-
/dd-java-agent/instrumentation/maven @DataDog/ci-app-libraries-java
113-
/dd-java-agent/instrumentation/weaver-0.9/ @DataDog/ci-app-libraries-java
114-
/dd-smoke-tests/gradle/ @DataDog/ci-app-libraries-java
115-
/dd-smoke-tests/junit-console/ @DataDog/ci-app-libraries-java
116-
/dd-smoke-tests/maven/ @DataDog/ci-app-libraries-java
117-
/internal-api/src/main/java/datadog/trace/api/git/ @DataDog/ci-app-libraries-java
118-
**/civisibility/ @DataDog/ci-app-libraries-java
119-
**/CiVisibility*.java @DataDog/ci-app-libraries-java
120-
**/CiVisibility*.groovy @DataDog/ci-app-libraries-java
101+
# @DataDog/ci-app-libraries
102+
/dd-java-agent/agent-ci-visibility/ @DataDog/ci-app-libraries
103+
/dd-java-agent/instrumentation/cucumber-5.4/ @DataDog/ci-app-libraries
104+
/dd-java-agent/instrumentation/jacoco-0.8.9/ @DataDog/ci-app-libraries
105+
/dd-java-agent/instrumentation/junit @DataDog/ci-app-libraries
106+
/dd-java-agent/instrumentation/karate/ @DataDog/ci-app-libraries
107+
/dd-java-agent/instrumentation/scalatest-3.0.8/ @DataDog/ci-app-libraries
108+
/dd-java-agent/instrumentation/selenium/ @DataDog/ci-app-libraries
109+
/dd-java-agent/instrumentation/testng/ @DataDog/ci-app-libraries
110+
/dd-java-agent/instrumentation/gradle/ @DataDog/ci-app-libraries
111+
/dd-java-agent/instrumentation/gradle-testing/ @DataDog/ci-app-libraries
112+
/dd-java-agent/instrumentation/maven @DataDog/ci-app-libraries
113+
/dd-java-agent/instrumentation/weaver-0.9/ @DataDog/ci-app-libraries
114+
/dd-smoke-tests/gradle/ @DataDog/ci-app-libraries
115+
/dd-smoke-tests/junit-console/ @DataDog/ci-app-libraries
116+
/dd-smoke-tests/maven/ @DataDog/ci-app-libraries
117+
/internal-api/src/main/java/datadog/trace/api/git/ @DataDog/ci-app-libraries
118+
**/civisibility/ @DataDog/ci-app-libraries
119+
**/CiVisibility*.java @DataDog/ci-app-libraries
120+
**/CiVisibility*.groovy @DataDog/ci-app-libraries
121121

122122
# @DataDog/debugger-java (Live Debugger)
123123
/dd-java-agent/agent-debugger/ @DataDog/debugger-java

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,19 @@ updates:
1919
gh-actions-packages:
2020
patterns:
2121
- "*"
22+
23+
- package-ecosystem: "gradle"
24+
directory: "/"
25+
schedule:
26+
interval: "weekly"
27+
allow:
28+
- dependency-name: "gradle"
29+
ignore:
30+
- dependency-name: "gradle"
31+
update-types: ["version-update:semver-major"]
32+
labels:
33+
- "comp: tooling"
34+
- "tag: dependencies"
35+
- "tag: no release notes"
36+
commit-message:
37+
prefix: "chore(build): "

.github/pull_request_template.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@
66

77
# Contributor Checklist
88

9-
- Format the title [according the contribution guidelines](https://github.com/DataDog/dd-trace-java/blob/master/CONTRIBUTING.md#title-format)
10-
- Assign the `type:` and (`comp:` or `inst:`) labels in addition to [any useful labels](https://github.com/DataDog/dd-trace-java/blob/master/CONTRIBUTING.md#labels)
11-
- Don't use `close`, `fix` or any [linking keywords](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) when referencing an issue.
9+
- Format the title according to [the contribution guidelines](https://github.com/DataDog/dd-trace-java/blob/master/CONTRIBUTING.md#title-format)
10+
- Assign the `type:` and (`comp:` or `inst:`) labels in addition to [any other useful labels](https://github.com/DataDog/dd-trace-java/blob/master/CONTRIBUTING.md#labels)
11+
- Avoid using `close`, `fix`, or [any linking keywords](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) when referencing an issue
1212
Use `solves` instead, and assign the PR [milestone](https://github.com/DataDog/dd-trace-java/milestones) to the issue
13-
- Update the [CODEOWNERS](https://github.com/DataDog/dd-trace-java/blob/master/.github/CODEOWNERS) file on source file addition, move, or deletion
14-
- Update the [public documentation](https://docs.datadoghq.com/tracing/trace_collection/library_config/java/) in case of new configuration flag or behavior
13+
- Update the [CODEOWNERS](https://github.com/DataDog/dd-trace-java/blob/master/.github/CODEOWNERS) file on source file addition, migration, or deletion
14+
- Update [public documentation](https://docs.datadoghq.com/tracing/trace_collection/library_config/java/) with any new configuration flags or behaviors
1515

1616
Jira ticket: [PROJ-IDENT]
1717

18+
***Note:*** **Once your PR is ready to merge, add it to the merge queue by commenting `/merge`.** `/merge -c` cancels the queue request. `/merge -f --reason "reason"` skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see [this doc](https://datadoghq.atlassian.net/wiki/spaces/DEVX/pages/3121612126/MergeQueue).
19+
1820
<!--
1921
# Opening vs Drafting a PR:
2022
When opening a pull request, please open it as a draft to not auto assign reviewers before you feel the pull request is in a reviewable state.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout "cloudfoundry" branch
13-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
13+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
1414
with:
1515
ref: cloudfoundry
1616
- name: Get release version
@@ -57,7 +57,7 @@ jobs:
5757
git commit -m "chore: Add version ${{ steps.get-release-version.outputs.VERSION }} to Cloud Foundry"
5858
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
5959
- name: Push changes
60-
uses: DataDog/commit-headless@583489e08d78037e7fa256c14adf998d5463f6a0 # action/v2.0.2
60+
uses: DataDog/commit-headless@05d7b7ee023e2c7d01c47832d420c2503cd416f3 # action/v2.0.3
6161
if: ${{ steps.create-commit.outputs.commit != '' }}
6262
with:
6363
branch: cloudfoundry

.github/workflows/analyze-changes.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616

1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
2020
with:
2121
submodules: 'recursive'
2222
- name: Cache Gradle dependencies
23-
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
23+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
2424
with:
2525
path: |
2626
~/.gradle/caches
@@ -30,7 +30,7 @@ jobs:
3030
${{ runner.os }}-gradle-
3131
3232
- name: Initialize CodeQL
33-
uses: github/codeql-action/init@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
33+
uses: github/codeql-action/init@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
3434
with:
3535
languages: 'java'
3636
build-mode: 'manual'
@@ -49,7 +49,7 @@ jobs:
4949
--build-cache --parallel --stacktrace --no-daemon --max-workers=4
5050
5151
- name: Perform CodeQL Analysis and upload results to GitHub Security tab
52-
uses: github/codeql-action/analyze@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
52+
uses: github/codeql-action/analyze@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
5353

5454
trivy:
5555
name: Analyze changes with Trivy
@@ -61,12 +61,12 @@ jobs:
6161

6262
steps:
6363
- name: Checkout repository
64-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
64+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
6565
with:
6666
submodules: 'recursive'
6767

6868
- name: Cache Gradle dependencies
69-
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
69+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
7070
with:
7171
path: |
7272
~/.gradle/caches
@@ -101,7 +101,7 @@ jobs:
101101
ls -laR "./workspace/.trivy"
102102
103103
- name: Run Trivy security scanner
104-
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # v0.33.1
104+
uses: aquasecurity/trivy-action@c1824fd6edce30d7ab345a9989de00bbd46ef284 # v0.34.0
105105
with:
106106
scan-type: rootfs
107107
scan-ref: './workspace/.trivy/'
@@ -114,7 +114,7 @@ jobs:
114114
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
115115

116116
- name: Upload Trivy scan results to GitHub Security tab
117-
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
117+
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
118118
if: always()
119119
with:
120120
sarif_file: 'trivy-results.sarif'

.github/workflows/check-pull-request-labels.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
'comp:',
3131
'inst:',
3232
'tag:',
33+
'mergequeue-status:',
34+
'team:',
3335
'performance:', // To refactor to 'ci: ' in the future
3436
'run-tests:' // Unused since GitLab migration
3537
]
@@ -54,7 +56,7 @@ jobs:
5456
'**This PR is blocked until:**\n' +
5557
'1. The invalid labels are deleted, and\n' +
5658
'2. A maintainer deletes this comment to unblock the PR\n\n' +
57-
'**Note:** Simply removing labels from the pull request is not enough - a maintainer must remove the label and delete this comment to remove the block.\n\n' +
59+
'**Note:** Simply removing labels from the pull request is not enough - a maintainer must delete this comment then remove the label to remove the block.\n\n' +
5860
commentMarker
5961
6062
if (blockingComment) {
@@ -78,5 +80,9 @@ jobs:
7880
}
7981
if (blockingComment) {
8082
// Block the PR by failing the workflow
81-
core.setFailed(`PR blocked: Invalid labels detected: (${invalidLabels.join(', ')}). A maintainer must delete the blocking comment after fixing the labels to allow merging.`)
83+
if (hasInvalidLabels) {
84+
core.setFailed(`PR blocked: Invalid labels detected: (${invalidLabels.join(', ')}). A maintainer must delete the blocking comment after fixing the labels to allow merging.`)
85+
} else {
86+
core.setFailed(`PR blocked: A previous blocking comment still exists. A maintainer must delete it to allow merging.`)
87+
}
8288
}

.github/workflows/create-release-branch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
echo "branch=release/${TAG%.0}.x" >> "$GITHUB_OUTPUT"
3939
4040
- name: Checkout dd-trace-java at tag
41-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
41+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
4242
with:
4343
ref: ${{ steps.determine-tag.outputs.tag }}
4444

.github/workflows/pin-system-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
echo "base_branch=${BASE_BRANCH}" >> $GITHUB_OUTPUT
4646
4747
- name: Checkout the repository
48-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
48+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4949
with:
5050
ref: ${{ steps.define-base-branch.outputs.base_branch }}
5151

@@ -92,7 +92,7 @@ jobs:
9292
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
9393
9494
- name: Push changes
95-
uses: DataDog/commit-headless@583489e08d78037e7fa256c14adf998d5463f6a0 # action/v2.0.2
95+
uses: DataDog/commit-headless@05d7b7ee023e2c7d01c47832d420c2503cd416f3 # action/v2.0.3
9696
with:
9797
token: "${{ steps.octo-sts.outputs.token }}"
9898
branch: "${{ steps.define-branch.outputs.branch }}"

0 commit comments

Comments
 (0)