Skip to content

Commit 702feb6

Browse files
authored
Merge branch 'master' into kr-igor/dsm-tt-v0
2 parents 9efed30 + d7c107b commit 702feb6

File tree

114 files changed

+3254
-341
lines changed

Some content is hidden

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

114 files changed

+3254
-341
lines changed

.azure-pipelines/ultimate-pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ variables:
146146
DD_LOGGER_DD_TAGS: test.configuration.job:$(System.JobDisplayName)
147147
DD_LOGGER_ENABLED: true
148148
DD_COLLECTOR_CPU_USAGE: true
149-
ToolVersion: 3.41.0
149+
ToolVersion: 3.42.0
150150
# .NET SDK performance optimization variables
151151
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
152152
DOTNET_CLI_TELEMETRY_OPTOUT: 1
@@ -5350,7 +5350,7 @@ stages:
53505350
SNAPSHOT_DIR: $(System.DefaultWorkingDirectory)/tracer/build/smoke_test_snapshots
53515351
SNAPSHOT_CI: 1
53525352
# ignoring 'http.client_ip' and 'network.client.ip' because it's set to '::1' here instead of expected '127.0.0.1'
5353-
SNAPSHOT_IGNORED_ATTRS: span_id,trace_id,parent_id,duration,start,metrics.system.pid,meta.runtime-id,metrics.process_id,meta._dd.p.dm,meta._dd.p.tid,meta._dd.git.commit.sha,meta._dd.git.repository_url,meta.http.client_ip,meta.network.client.ip,meta._dd.appsec.s.req.params,meta._dd.appsec.s.res.body,meta._dd.appsec.s.req.headers,meta._dd.appsec.s.res.headers #api-security attrs are unfortunately ignored because gzip compression generates different bytes per platform windows/linux
5353+
SNAPSHOT_IGNORED_ATTRS: span_id,trace_id,parent_id,duration,start,metrics.system.pid,meta.runtime-id,metrics.process_id,meta._dd.p.dm,meta._dd.p.tid,meta._dd.git.commit.sha,meta._dd.git.repository_url,meta._dd.tags.process,meta.http.client_ip,meta.network.client.ip,meta._dd.appsec.s.req.params,meta._dd.appsec.s.res.body,meta._dd.appsec.s.req.headers,meta._dd.appsec.s.res.headers #api-security attrs are unfortunately ignored because gzip compression generates different bytes per platform windows/linux
53545354
53555355
- script: |
53565356
# Based on variables set in smoke.dotnet-tool.nuget.dockerfile

.github/actions/publish-debug-symbols/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ runs:
3838

3939
# Use the same go version as in https://github.com/DataDog/profiling-backend/blob/prod/debug-symbol-upload/Dockerfile#L21
4040
- name: Install Go
41-
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
41+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
4242
with:
4343
go-version: '^1.22.3'
4444

.github/workflows/auto_bump_test_package_versions.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: git config --system core.longpaths true
2323

2424
- name: Get dd-octo-sts token
25-
uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
25+
uses: DataDog/dd-octo-sts-action@96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a # v1.0.4
2626
id: octo-sts
2727
with:
2828
scope: DataDog/dd-trace-dotnet
@@ -33,7 +33,7 @@ jobs:
3333
with:
3434
ref: ${{ github.event.pull_request.base.sha }}
3535

36-
- uses: actions/setup-dotnet@baa11fbfe1d6520db94683bd5c7a3818018e4309 # v5.1.0
36+
- uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
3737
with:
3838
global-json-file: global.json
3939

@@ -73,7 +73,7 @@ jobs:
7373
7474
- name: Send Slack notification about generating failure
7575
if: failure()
76-
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
76+
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
7777
with:
7878
# This data can be any valid JSON from a previous step in the GitHub Action
7979
payload: |

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
3636
# Initializes the CodeQL tools for scanning.
3737
- name: Initialize CodeQL
38-
uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
38+
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
3939
with:
4040
languages: csharp, cpp
4141
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
5656
./tracer/build.sh BuildProfilerHome BuildNativeLoader
5757
5858
- name: Perform CodeQL Analysis
59-
uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
59+
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
6060

6161
- name: filter-sarif cpp
6262
uses: advanced-security/filter-sarif@2da736ff05ef065cb2894ac6892e47b5eac2c3c0 # v1.1
@@ -113,7 +113,7 @@ jobs:
113113
114114
# Initializes the CodeQL tools for scanning.
115115
- name: Initialize CodeQL
116-
uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
116+
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
117117
with:
118118
languages: csharp, cpp
119119
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -134,7 +134,7 @@ jobs:
134134
./tracer/build.sh BuildTracerHome
135135
136136
- name: Perform CodeQL Analysis
137-
uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
137+
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
138138

139139
- name: filter-sarif cpp
140140
uses: advanced-security/filter-sarif@2da736ff05ef065cb2894ac6892e47b5eac2c3c0 # v1.1

.gitlab/benchmarks/macrobenchmarks.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ build-dd-trace-dotnet-macrobenchmarks-ami:
7171
when: manual
7272
timeout: 3h
7373
variables:
74+
# Adding managed-by:bp-infra lets us filter CI runner metrics to monitor bp-infra-managed jobs.
75+
# See https://datadoghq.atlassian.net/wiki/spaces/DEVX/pages/2889355451/Gitlab+Runner+fork#Metrics
76+
DD_METRICS_TAGS: "managed-by:bp-infra"
77+
7478
AWS_REGION: "us-east-1"
7579

7680
# Branch containing a provision for building the macrobenchmarks AMI
@@ -533,6 +537,10 @@ profiler_cpu_timer_create-arm64:
533537
- reports/
534538
expire_in: 3 months
535539
variables:
540+
# Adding managed-by:bp-infra lets us filter CI runner metrics to monitor bp-infra-managed jobs.
541+
# See https://datadoghq.atlassian.net/wiki/spaces/DEVX/pages/2889355451/Gitlab+Runner+fork#Metrics
542+
DD_METRICS_TAGS: "managed-by:bp-infra"
543+
536544
RUNNER_AFTER_SCRIPT_TIMEOUT: 1h
537545

538546
# Allows ephemeral instances to read content from benchmarking-platform

.gitlab/benchmarks/microbenchmarks.yml

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ build-dd-trace-dotnet-microbenchmarks-ami:
3232
DDOCTOSTS_ID_TOKEN:
3333
aud: dd-octo-sts
3434
variables:
35+
# Adding managed-by:bp-infra lets us filter CI runner metrics to monitor bp-infra-managed jobs.
36+
# See https://datadoghq.atlassian.net/wiki/spaces/DEVX/pages/2889355451/Gitlab+Runner+fork#Metrics
37+
DD_METRICS_TAGS: "managed-by:bp-infra"
38+
3539
# Allows ephemeral instances to read content from dd-trace-dotnet
3640
# This is not strictly necessary in the current AMI build
3741
DDOCTOSTS_SCOPE: "DataDog/dd-trace-dotnet"
@@ -78,8 +82,7 @@ run-benchmarks:
7882
stage: benchmarks
7983
tags: ["arch:amd64"]
8084
timeout: 2h
81-
# Image created in the following job https://gitlab.ddbuild.io/DataDog/benchmarking-platform-tools/-/jobs/869830045
82-
image: registry.ddbuild.io/images/benchmarking-platform-tools-ubuntu:dd-trace-dotnet-micro
85+
image: registry.ddbuild.io/images/benchmarking-platform-tools-ubuntu:latest
8386
id_tokens:
8487
DDOCTOSTS_ID_TOKEN:
8588
aud: dd-octo-sts
@@ -93,52 +96,56 @@ run-benchmarks:
9396
name: "artifacts"
9497
when: always
9598
paths:
96-
- reports/
99+
- artifacts/
97100
expire_in: 3 months
98101
variables:
99-
# Allows ephemeral instances to read content from benchmarking-platform
100-
DDOCTOSTS_SCOPE: "DataDog/benchmarking-platform"
101-
DDOCTOSTS_POLICY: "gitlab.github-access.read-contents"
102+
# Adding managed-by:bp-infra lets us filter CI runner metrics to monitor bp-infra-managed jobs.
103+
# See https://datadoghq.atlassian.net/wiki/spaces/DEVX/pages/2889355451/Gitlab+Runner+fork#Metrics
104+
DD_METRICS_TAGS: "managed-by:bp-infra"
102105

106+
# Scope for dd-octo-sts to get GitHub token for cloning dd-trace-dotnet
107+
DDOCTOSTS_SCOPE: "DataDog/dd-trace-dotnet"
108+
DDOCTOSTS_POLICY: "gitlab.github-access.read-contents"
103109
AWS_REGION: "us-east-1"
104-
105-
# Branch containing 1. scripts to launch Windows benchmarks on ephemeral
106-
# instances (to be used by GitLab CI runners) and 2. scripts to run Windows
107-
# benchmarks (to be used by the ephemeral instances).
108-
BP_INFRA_BENCHMARKING_PLATFORM_BRANCH: "dd-trace-dotnet/micro"
109-
110-
# Where benchmarking results will be stored
111110
BP_INFRA_ARTIFACTS_BUCKET_NAME: "windows-benchmarking-results-us-east-1"
112-
113-
# Whether to mock benchmark execution by simply copying the latest
114-
# master results. Useful for testing the after_script steps
115-
BP_INFRA_TEST: "false"
116-
117-
# Whether to cleanup ephemeral instances after benchmarks are run
111+
# Cleanup instances after benchmarks
118112
CLEANUP: "true"
119-
120-
# Where to look for benchmarking artifacts for uploading to the BP UI
121-
ARTIFACTS_DIR: "reports"
113+
# Set to "true" to skip actual benchmarks and use _latest results (for testing the pipeline)
114+
BP_INFRA_TEST: "false"
122115
before_script:
123116
- !reference [.dd-octo-sts-setup, before_script]
124117
script:
118+
- mkdir -p artifacts
125119
- export GITHUB_TOKEN=$(cat /tmp/github-token)
126-
- git clone --branch $BP_INFRA_BENCHMARKING_PLATFORM_BRANCH https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform platform
127-
- mkdir -p reports
128-
- ./platform/steps/run-windows-benchmarks.sh
120+
# Fetch DD_API_KEY from SSM (in GitLab runner's AWS account) and export for bp-infra
121+
- export DD_API_KEY=$(aws ssm get-parameter --name "ci.dd-trace-dotnet.dd_api_key" --with-decryption --query "Parameter.Value" --output text --region "${AWS_REGION}")
122+
- CLEANUP_ARG=$([[ "$CLEANUP" == "false" ]] && echo "--no-cleanup" || echo "")
123+
# Run benchmarks on ephemeral instance
124+
- |
125+
bp-infra launch \
126+
--provision .gitlab/benchmarks/microbenchmarks/infrastructure/instance.yml \
127+
--region "${AWS_REGION}" \
128+
--os windows \
129+
--env-regex "^(CI_|DD_|BP_|GITHUB_|ARTIFACTS_)" \
130+
--bypass-stack-destroy \
131+
$CLEANUP_ARG
132+
# Fetch results from S3, analyze, upload, and post PR comment
133+
- export ARTIFACTS_DIR="$(pwd)/artifacts"
134+
- .gitlab/benchmarks/microbenchmarks/scripts/fetch-results.sh
135+
- .gitlab/benchmarks/microbenchmarks/scripts/analyze-results.sh
136+
- .gitlab/benchmarks/microbenchmarks/scripts/upload-to-bp-ui.sh
137+
- .gitlab/benchmarks/microbenchmarks/scripts/post-pr-comment.sh
129138
after_script:
130139
- |
131140
if [ "$CLEANUP" == "true" ]; then
132-
bp-infra cleanup --provision ./platform/ephemeral-infra/instance.yaml \
141+
bp-infra cleanup \
142+
--provision .gitlab/benchmarks/microbenchmarks/infrastructure/instance.yml \
133143
--region "${AWS_REGION}" \
134-
--bypass-stack-destroy
144+
--os windows \
145+
--bypass-stack-destroy || true
135146
else
136147
echo "'CLEANUP' is set to 'false'. Will not cleanup."
137148
fi
138-
- ./platform/steps/fetch-results.sh
139-
- ./platform/steps/analyze-results.sh
140-
- ./platform/steps/post-pr-comment.sh
141-
- ./platform/steps/upload-to-bp-ui.sh
142149
143150
# This repository is using PR-level performance quality gates.
144151
# Verify that the check-big-regressions CI job has passed. If any regression happened, merging this PR will be blocked.
@@ -162,15 +169,15 @@ run-benchmarks:
162169
name: "artifacts"
163170
when: always
164171
paths:
165-
- reports/
172+
- artifacts/
166173
expire_in: "30 days"
167174
variables:
168175
BP_INFRA_BENCHMARKING_PLATFORM_BRANCH: "dd-trace-dotnet/micro"
169176

170177
# Regex to ignore benchmarks identified as unstable
171178
IGNORED_BENCHMARKS_REGEX: "Trace.Iast.StringAspectsBenchmark|Trace.CharSliceBenchmark|Trace.Asm.AppSecWafBenchmark|Trace.Asm.AppSecBodyBenchmark|Trace.CIVisibilityProtocolWriterBenchmark"
172179
script: |
173-
export ARTIFACTS_DIR="$(pwd)/reports"
180+
export ARTIFACTS_DIR="$(pwd)/artifacts"
174181
175182
if [ -n "${IGNORED_BENCHMARKS_REGEX}" ]; then
176183
echo "Adding the 'ignored.' prefix to benchmarks matching IGNORED_BENCHMARKS_REGEX:"

0 commit comments

Comments
 (0)