Skip to content

Commit cb54ef7

Browse files
authored
Merge branch 'master' into appsec-57809-make-http-route-available-within-request
2 parents 56643b3 + c3882d5 commit cb54ef7

File tree

780 files changed

+5101
-4014
lines changed

Some content is hidden

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

780 files changed

+5101
-4014
lines changed

.github/scripts/update_reference.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
3+
# This script updates the reference in a YAML file.
4+
5+
# Check if required environment variables are set
6+
if [ -z "$TARGET" ]; then
7+
echo "Error: TARGET environment variable is not set"
8+
exit 1
9+
fi
10+
11+
if [ -z "$REF" ]; then
12+
echo "Error: REF environment variable is not set"
13+
exit 1
14+
fi
15+
16+
if [ -z "$PATTERN" ]; then
17+
echo "Error: PATTERN environment variable is not set"
18+
exit 1
19+
fi
20+
21+
echo "Target: $TARGET"
22+
echo "Ref: $REF"
23+
24+
# Remove leading and trailing forward slashes from pattern
25+
CLEAN_PATTERN=$(echo "$PATTERN" | sed 's/^\///;s/\/$//')
26+
echo "Pattern: $CLEAN_PATTERN"
27+
28+
# Create a temporary file
29+
TEMP_FILE=$(mktemp)
30+
31+
# Set trap to cleanup on script exit
32+
trap 'rm -f "$TEMP_FILE"' EXIT
33+
34+
# Read the file and perform the substitution
35+
if [ -f "$TARGET" ]; then
36+
# Perform the substitution and save to temporary file
37+
# We use perl here because sed's regex support varies across platforms
38+
perl -pe "s/$CLEAN_PATTERN/\${1}$REF\${3}/g" "$TARGET" > "$TEMP_FILE"
39+
40+
# Compare files to check if any changes were made
41+
if cmp -s "$TARGET" "$TEMP_FILE"; then
42+
echo "No references found in $TARGET"
43+
else
44+
# Copy the temp file back to the target
45+
cp "$TEMP_FILE" "$TARGET"
46+
echo "✓ Updated references in $TARGET"
47+
fi
48+
else
49+
echo "Error: Target file $TARGET does not exist"
50+
exit 1
51+
fi

.github/workflows/generate-supported-versions.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,25 @@ jobs:
2828

2929
- run: git diff
3030

31+
- name: Generate GitHub App Token
32+
id: generate-token
33+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
34+
with:
35+
app-id: ${{ secrets.APP_ID }}
36+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
37+
3138
- name: Create Pull Request
3239
id: cpr
3340
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
3441
with:
35-
token: ${{ secrets.GHA_PAT }}
42+
token: ${{ steps.generate-token.outputs.token }}
3643
branch: auto-generate/update-supported-versions
3744
title: '[🤖] Update Supported Versions'
3845
base: master
3946
labels: dev/internal, integrations
4047
commit-message: "Test creating supported versions"
4148
delete-branch: true
49+
sign-commits: true
4250
body: |
4351
This is a PR to update the table for supported integration versions.
4452
The supported versions markdown is generated from the minimum and maximum tested versions of each integration,

.github/workflows/lock-dependency.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Lock Dependencies
22

3-
# TODO: Make this job mandatory
4-
# TODO: Make this on workflow_dispatch
5-
63
on: # yamllint disable-line rule:truthy
74
pull_request:
85
branches:
@@ -18,7 +15,7 @@ permissions: {}
1815
jobs:
1916
dependency:
2017
name: Dependency changes
21-
runs-on: ubuntu-22.04
18+
runs-on: ubuntu-24.04
2219
outputs:
2320
changes: ${{ steps.changes.outputs.dependencies }}
2421
steps:
@@ -31,7 +28,7 @@ jobs:
3128
filters: .github/dependency_filters.yml
3229

3330
lock:
34-
runs-on: ubuntu-22.04
31+
runs-on: ubuntu-24.04
3532
needs: dependency
3633
if: ${{ needs.dependency.outputs.changes == 'true' }}
3734
strategy:
@@ -82,26 +79,36 @@ jobs:
8279
path: gemfiles/${{ matrix.engine.name }}_${{ matrix.engine.version }}*
8380
retention-days: 1
8481

85-
# TODO: Change token to trigger workflow automation
86-
# > New commit by GITHUB_TOKEN does not trigger workflow automation to prevent infinite loop
8782
commit:
8883
name: Commit changes
8984
needs: lock
90-
runs-on: ubuntu-22.04
85+
runs-on: ubuntu-24.04
9186
steps:
87+
- name: Generate GitHub App Token
88+
id: generate-token
89+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
90+
with:
91+
app-id: ${{ secrets.APP_ID }}
92+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
9293
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9394
with:
9495
persist-credentials: true # required for `git` operations (commit & push) at later steps
95-
token: ${{ secrets.GHA_PAT }}
96+
token: ${{ steps.generate-token.outputs.token }}
9697
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
9798
with:
9899
path: gemfiles
99100
pattern: lock-dependency-${{ github.run_id }}-*
100101
merge-multiple: true
101-
- uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5.2.0
102+
- run: git diff --color=always
103+
- name: Commit changes
104+
uses: planetscale/ghcommit-action@6a383e778f6620afde4bf4b45069d3c6983c1ae2 # v0.2.15
102105
with:
106+
repo: ${{ github.repository }}
107+
branch: ${{ github.head_ref }}
103108
file_pattern: 'gemfiles/*'
104109
commit_message: "[🤖] Lock Dependency: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
110+
env:
111+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
105112

106113
complete:
107114
name: Lock Dependencies (complete)

.github/workflows/parametric-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on: # yamllint disable-line rule:truthy
1515
permissions: {}
1616

1717
env:
18-
SYSTEM_TESTS_REF: 'main' # This must always be set to `main` on dd-trace-rb's master branch
18+
SYSTEM_TESTS_REF: e9fb2335c23a6e6d79ccaf4e993b3dca59649ad5 # Automated: This reference is automatically updated.
1919

2020
jobs:
2121
changes:

.github/workflows/publish.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,22 @@ jobs:
316316
issues: write
317317
pull-requests: write
318318
env:
319-
GITHUB_TOKEN: ${{ secrets.GHA_PAT }}
320319
GEM_VERSION: ${{ needs.verify-checks.outputs.version }}
321320
steps:
321+
- name: Generate GitHub App Token
322+
id: generate-token
323+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
324+
with:
325+
app-id: ${{ secrets.APP_ID }}
326+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
322327
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
323328
with:
324329
persist-credentials: true # required for `git` operations (push) at later steps
325-
token: ${{ secrets.GHA_PAT }}
330+
token: ${{ steps.generate-token.outputs.token }}
326331
fetch-depth: 0
327-
- run: |
332+
- env:
333+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
334+
run: |
328335
JOB_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
329336
TEMP_BRANCH="update-document-v${GEM_VERSION}"
330337

.github/workflows/system-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ permissions: {}
2222
env:
2323
REGISTRY: ghcr.io
2424
REPO: ghcr.io/datadog/dd-trace-rb
25-
SYSTEM_TESTS_REF: main # This must always be set to `main` on dd-trace-rb's master branch
25+
SYSTEM_TESTS_REF: e9fb2335c23a6e6d79ccaf4e993b3dca59649ad5 # Automated: This reference is automatically updated.
2626

2727
jobs:
2828
changes:

.github/workflows/update-latest-dependency.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
- name: Checkout code
7070
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7171
with:
72-
persist-credentials: true # required for `git` operations (commit & push) at later steps
72+
persist-credentials: false
7373

7474
- name: Download artifacts for all runtimes
7575
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
@@ -78,17 +78,25 @@ jobs:
7878
pattern: gha${{ github.run_id }}-datadog-gem-*
7979
merge-multiple: true
8080

81+
- name: Generate GitHub App Token
82+
id: generate-token
83+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
84+
with:
85+
app-id: ${{ secrets.APP_ID }}
86+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
87+
8188
- name: Create Pull Request
8289
id: cpr
8390
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
8491
with:
85-
token: ${{ secrets.GHA_PAT }}
92+
token: ${{ steps.generate-token.outputs.token }}
8693
branch: auto-generate/update-latest-dependencies
8794
title: '[🤖] Update Latest Dependency'
8895
base: master
8996
labels: dev/internal, integrations
9097
commit-message: "[🤖] Update Latest Dependency: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
9198
delete-branch: true
99+
sign-commits: true
92100
body: |
93101
_This is an auto-generated PR from [here](https://github.com/DataDog/dd-trace-rb/blob/master/.github/workflows/update-latest-dependency.yml), which creates a pull request that will be continually updated with new changes until it is merged or closed)_
94102
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Update System Tests
2+
3+
on: # yamllint disable-line rule:truthy
4+
schedule:
5+
- cron: '0 0 * * 0' # Every Sunday at midnight
6+
workflow_dispatch:
7+
inputs:
8+
ref:
9+
description: Reference to be updated (commit hash, branch, or tag)
10+
required: false
11+
type: string
12+
dry-run:
13+
description: Skip PR creation and only show changes
14+
required: false
15+
type: boolean
16+
default: false
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
# Default permissions for all jobs
23+
permissions: {}
24+
25+
jobs:
26+
update-system-tests:
27+
name: "Update System Tests"
28+
runs-on: ubuntu-24.04
29+
steps:
30+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
with:
32+
persist-credentials: true
33+
34+
- name: Checkout System Test
35+
id: system-test-ref
36+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
with:
38+
repository: "DataDog/system-tests"
39+
path: system-tests
40+
persist-credentials: false
41+
ref: ${{ github.event.inputs.ref || '' }}
42+
43+
- run: .github/scripts/update_reference.sh
44+
env:
45+
TARGET: ".github/workflows/system-tests.yml"
46+
PATTERN: '(\s*SYSTEM_TESTS_REF:\s+)(\S+)(\s+# Automated:.*)'
47+
REF: ${{ steps.system-test-ref.outputs.commit }}
48+
49+
- run: .github/scripts/update_reference.sh
50+
env:
51+
TARGET: ".github/workflows/parametric-tests.yml"
52+
PATTERN: '(\s*SYSTEM_TESTS_REF:\s+)(\S+)(\s+# Automated:.*)'
53+
REF: ${{ steps.system-test-ref.outputs.commit }}
54+
55+
- run: git diff --color=always
56+
57+
- name: Generate GitHub App Token
58+
id: generate-token
59+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
60+
with:
61+
app-id: ${{ secrets.APP_ID }}
62+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
63+
64+
- name: Create Pull Request
65+
if: ${{ github.event.inputs.dry-run != true }}
66+
id: cpr
67+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
68+
with:
69+
token: ${{ steps.generate-token.outputs.token }}
70+
branch: auto-generate/update-system-tests
71+
title: '[🤖] Update System Tests'
72+
base: master
73+
labels: dev/internal
74+
commit-message: "[🤖] Update System Tests: ${{github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
75+
delete-branch: true
76+
sign-commits: true
77+
add-paths: |
78+
.github/
79+
body: |
80+
_This is an auto-generated PR from [here](${{github.server_url}}/${{ github.repository }}/blob/master/.github/workflows/update-system-tests.yml)_
81+
The PR updates the system tests (Updated to commit: ${{ steps.system-test-ref.outputs.commit }})
82+
Please review the changes and merge when ready

CHANGELOG.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
## [Unreleased]
44

5+
## [2.17.0] - 2025-06-02
6+
7+
### Added
8+
9+
* Tracing: Add support for Rails 8.0. ([#4455][])
10+
11+
### Changed
12+
13+
* Core: Improve tracer error reporting when agent responds with error responses to remote configuration requests ([#4669][])
14+
* Core: Profiling: Upgrade libdatadog dependency to version 18.1 ([#4577][])
15+
* Dynamic Instrumentation: Improve UI reporting of application and host status ([#4678][])
16+
* Tracing: Mark AWS integration spans as errored when AWS requests fail ([#4672][])
17+
18+
### Fixed
19+
20+
* Error Tracking: remove error tracking support on Ruby 2.6 ([#4665][])
21+
* Profiling: Fix profiling scheduler reporting corner case during shutdown ([#4679][])
22+
* Tracing: Fix: The `on_error` warning for HTTP instrumentations ([#4673][])
23+
524
## [2.16.0] - 2025-05-19
625

726
### Added
@@ -3222,7 +3241,8 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
32223241
Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
32233242
32243243
3225-
[Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v2.16.0...master
3244+
[Unreleased]: https://github.com/DataDog/dd-trace-rb/compare/v2.17.0...master
3245+
[2.17.0]: https://github.com/DataDog/dd-trace-rb/compare/v2.16.0...v2.17.0
32263246
[2.16.0]: https://github.com/DataDog/dd-trace-rb/compare/v2.15.0...v2.16.0
32273247
[2.15.0]: https://github.com/DataDog/dd-trace-rb/compare/v2.14.0...v2.15.0
32283248
[2.14.0]: https://github.com/DataDog/dd-trace-rb/compare/v2.13.0...v2.14.0
@@ -4734,6 +4754,7 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
47344754
[#4426]: https://github.com/DataDog/dd-trace-rb/issues/4426
47354755
[#4433]: https://github.com/DataDog/dd-trace-rb/issues/4433
47364756
[#4437]: https://github.com/DataDog/dd-trace-rb/issues/4437
4757+
[#4455]: https://github.com/DataDog/dd-trace-rb/issues/4455
47374758
[#4473]: https://github.com/DataDog/dd-trace-rb/issues/4473
47384759
[#4493]: https://github.com/DataDog/dd-trace-rb/issues/4493
47394760
[#4497]: https://github.com/DataDog/dd-trace-rb/issues/4497
@@ -4752,6 +4773,7 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
47524773
[#4568]: https://github.com/DataDog/dd-trace-rb/issues/4568
47534774
[#4573]: https://github.com/DataDog/dd-trace-rb/issues/4573
47544775
[#4575]: https://github.com/DataDog/dd-trace-rb/issues/4575
4776+
[#4577]: https://github.com/DataDog/dd-trace-rb/issues/4577
47554777
[#4580]: https://github.com/DataDog/dd-trace-rb/issues/4580
47564778
[#4581]: https://github.com/DataDog/dd-trace-rb/issues/4581
47574779
[#4590]: https://github.com/DataDog/dd-trace-rb/issues/4590
@@ -4767,6 +4789,12 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
47674789
[#4644]: https://github.com/DataDog/dd-trace-rb/issues/4644
47684790
[#4653]: https://github.com/DataDog/dd-trace-rb/issues/4653
47694791
[#4656]: https://github.com/DataDog/dd-trace-rb/issues/4656
4792+
[#4665]: https://github.com/DataDog/dd-trace-rb/issues/4665
4793+
[#4669]: https://github.com/DataDog/dd-trace-rb/issues/4669
4794+
[#4672]: https://github.com/DataDog/dd-trace-rb/issues/4672
4795+
[#4673]: https://github.com/DataDog/dd-trace-rb/issues/4673
4796+
[#4678]: https://github.com/DataDog/dd-trace-rb/issues/4678
4797+
[#4679]: https://github.com/DataDog/dd-trace-rb/issues/4679
47704798
[@AdrianLC]: https://github.com/AdrianLC
47714799
[@Azure7111]: https://github.com/Azure7111
47724800
[@BabyGroot]: https://github.com/BabyGroot

Rakefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,13 +453,13 @@ namespace :changelog do
453453
end
454454

455455
NATIVE_EXTS = [
456+
Rake::ExtensionTask.new("libdatadog_api.#{RUBY_VERSION[/\d+.\d+/]}_#{RUBY_PLATFORM}") do |ext|
457+
ext.ext_dir = 'ext/libdatadog_api'
458+
end,
459+
456460
Rake::ExtensionTask.new("datadog_profiling_native_extension.#{RUBY_VERSION}_#{RUBY_PLATFORM}") do |ext|
457461
ext.ext_dir = 'ext/datadog_profiling_native_extension'
458462
end,
459-
460-
Rake::ExtensionTask.new("libdatadog_api.#{RUBY_VERSION[/\d+.\d+/]}_#{RUBY_PLATFORM}") do |ext|
461-
ext.ext_dir = 'ext/libdatadog_api'
462-
end
463463
].freeze
464464

465465
NATIVE_CLEAN = ::Rake::FileList[]

0 commit comments

Comments
 (0)