Skip to content

Commit 0322134

Browse files
committed
Merge branch 'master' into mohammad/mass_transit_intg
2 parents 745ac02 + 844a87c commit 0322134

File tree

825 files changed

+38969
-7249
lines changed

Some content is hidden

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

825 files changed

+38969
-7249
lines changed

.azure-pipelines/ultimate-pipeline.yml

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ variables:
143143
DD_LOGGER_DD_TAGS: test.configuration.job:$(System.JobDisplayName)
144144
DD_LOGGER_ENABLED: true
145145
DD_COLLECTOR_CPU_USAGE: true
146-
ToolVersion: 3.35.0
146+
ToolVersion: 3.37.0
147147
# .NET SDK performance optimization variables
148148
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
149149
DOTNET_CLI_TELEMETRY_OPTOUT: 1
@@ -1710,12 +1710,25 @@ stages:
17101710
SampleName: $(IntegrationTestSampleName)
17111711

17121712
- script: tracer\build.cmd RunIntegrationTests RunWindowsRegressionTests -Framework $(framework) --code-coverage-enabled $(CodeCoverageEnabled)
1713-
displayName: Run integration tests
1713+
displayName: Run integration tests (Tracer)
1714+
condition: ne(variables['area'], 'ASM')
1715+
env:
1716+
DD_LOGGER_DD_API_KEY: $(ddApiKey)
1717+
enable_crash_dumps: true
1718+
Filter: $(IntegrationTestFilter)
1719+
SampleName: $(IntegrationTestSampleName)
1720+
Area: $(area)
1721+
1722+
- script: tracer\build.cmd RunIntegrationTests RunWindowsRegressionTests -Framework $(framework) --code-coverage-enabled $(CodeCoverageEnabled)
1723+
displayName: Run integration tests (ASM)
1724+
condition: eq(variables['area'], 'ASM')
1725+
retryCountOnTaskFailure: 2
17141726
env:
17151727
DD_LOGGER_DD_API_KEY: $(ddApiKey)
17161728
enable_crash_dumps: true
17171729
Filter: $(IntegrationTestFilter)
17181730
SampleName: $(IntegrationTestSampleName)
1731+
Area: $(area)
17191732

17201733
# TODO: Re-enable test-agent.windows once VM images are updated (hitting rate limits for docker)
17211734
# - script: docker compose -f docker-compose.windows.yml down
@@ -2272,7 +2285,26 @@ stages:
22722285
-e SampleName=$(IntegrationTestSampleName) \
22732286
-e Area=$(area) \
22742287
IntegrationTests
2275-
displayName: docker-compose run IntegrationTests
2288+
displayName: docker-compose run IntegrationTests (Tracer)
2289+
condition: ne(variables['area'], 'ASM')
2290+
env:
2291+
DD_LOGGER_DD_API_KEY: $(ddApiKey)
2292+
baseImage: $(baseImage) # for interpolation in the docker-compose file
2293+
2294+
- script: |
2295+
docker-compose -f docker-compose.yml -p $(DockerComposeProjectName) \
2296+
run --no-deps --rm \
2297+
-e baseImage=$(baseImage) \
2298+
-e framework=$(publishTargetFramework) \
2299+
-e CodeCoverageEnabled=$(CodeCoverageEnabled) \
2300+
-e IncludeTestsRequiringDocker=false \
2301+
-e Filter=$(IntegrationTestFilter) \
2302+
-e SampleName=$(IntegrationTestSampleName) \
2303+
-e Area=$(area) \
2304+
IntegrationTests
2305+
displayName: docker-compose run IntegrationTests (ASM)
2306+
condition: eq(variables['area'], 'ASM')
2307+
retryCountOnTaskFailure: 2
22762308
env:
22772309
DD_LOGGER_DD_API_KEY: $(ddApiKey)
22782310
baseImage: $(baseImage) # for interpolation in the docker-compose file
@@ -4511,32 +4543,32 @@ stages:
45114543
sampleName: Computer01
45124544
testName: cpu-walltime
45134545
poolName: ProfilerExecBenchAgent1
4514-
framework: net7.0
4546+
framework: net10.0
45154547
Exceptions:
45164548
sampleName: ExceptionGenerator
45174549
testName: exceptions
45184550
poolName: ProfilerExecBenchAgent2
4519-
framework: net7.0
4551+
framework: net10.0
45204552
Contention:
45214553
sampleName: Computer01
45224554
testName: contention
45234555
poolName: ProfilerExecBenchAgent3
4524-
framework: net7.0
4556+
framework: net10.0
45254557
Allocations:
45264558
sampleName: Computer01
45274559
testName: allocations
45284560
poolName: ProfilerExecBenchAgent4
4529-
framework: net7.0
4561+
framework: net10.0
45304562
LiveHeap:
45314563
sampleName: Computer01
45324564
testName: liveheap
45334565
poolName: ProfilerExecBenchAgent5
4534-
framework: net7.0
4566+
framework: net10.0
45354567
GarbageCollections:
45364568
sampleName: Computer01
45374569
testName: garbagecollections
45384570
poolName: ProfilerExecBenchAgent11
4539-
framework: net7.0
4571+
framework: net10.0
45404572
pool:
45414573
name: $(poolName)
45424574
timeoutInMinutes: 30 #default value
@@ -4605,32 +4637,32 @@ stages:
46054637
sampleName: Computer01
46064638
testName: cpu-walltime
46074639
poolName: ProfilerExecBenchAgent6
4608-
framework: net7.0
4640+
framework: net10.0
46094641
Exceptions:
46104642
sampleName: ExceptionGenerator
46114643
testName: exceptions
46124644
poolName: ProfilerExecBenchAgent7
4613-
framework: net7.0
4645+
framework: net10.0
46144646
Contention:
46154647
sampleName: Computer01
46164648
testName: contention
46174649
poolName: ProfilerExecBenchAgent8
4618-
framework: net7.0
4650+
framework: net10.0
46194651
Allocations:
46204652
sampleName: Computer01
46214653
testName: allocations
46224654
poolName: ProfilerExecBenchAgent9
4623-
framework: net7.0
4655+
framework: net10.0
46244656
LiveHeap:
46254657
sampleName: Computer01
46264658
testName: liveheap
46274659
poolName: ProfilerExecBenchAgent10
4628-
framework: net7.0
4660+
framework: net10.0
46294661
GarbageCollections:
46304662
sampleName: Computer01
46314663
testName: garbagecollections
46324664
poolName: ProfilerExecBenchAgent12
4633-
framework: net7.0
4665+
framework: net10.0
46344666
pool:
46354667
name: $(poolName)
46364668
timeoutInMinutes: 30 #default value

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,20 @@ csharp_new_line_before_members_in_anonymous_types = true
8282
# Rider
8383
csharp_keep_existing_initializer_arrangement=true
8484
csharp_keep_existing_arrangement=true
85+
86+
# Config registry banned api configuration
87+
# Error when static analyzers aren't respected
88+
dotnet_diagnostic.RS0030.severity = error
89+
90+
## Exceptions for banned apis:
91+
# - EnvironmentHelpers.GetEnvironmentVariable (DD0011/DD0012)
92+
# - EnvironmentHelpersNoLogging.GetEnvironmentVariable (DD0011/DD0012)
93+
# - EnvironmentHelpers.EnvironmentVariableExists (DD0011/DD0012)
94+
# - EnvironmentHelpersNoLogging.EnvironmentVariableExists (DD0011/DD0012)
95+
# - EnvironmentVariablesProvider.GetValue (DD0011/DD0012)
96+
# - EnvironmentConfigurationSource.GetEnvironmentVariable (RS0030)
97+
# - IConfigurationSource.Get* methods (GetString, GetInt32, GetDouble, GetBool, GetDictionary, GetAs) (DD0013/DD0014)
98+
99+
# Disables static analyzer errors for a specific folder
100+
[/tracer/src/Datadog.Trace/Vendors/**.*]
101+
dotnet_diagnostic.RS0030.severity = none

.github/CODEOWNERS

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,29 @@
9191
/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/TracingIntegrationTest.cs @DataDog/tracing-dotnet
9292
/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/TransportTests.cs @DataDog/tracing-dotnet
9393

94+
## Serverless (AWS Lambda)
95+
/tracer/src/**/*Lambda* @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-aws
96+
/tracer/test/**/*Lambda* @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-aws
97+
/tracer/build/_build/docker/serverless.lambda.dockerfile @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-aws
98+
/docker-compose.serverless.yml @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-aws
99+
/.gitlab/download-serverless-artifacts.sh @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-aws
100+
/docs/development/**/*Lambda*.md @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-aws
101+
102+
## Serverless (Azure)
103+
/tracer/src/**/*AzureAppService*.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
104+
/tracer/src/**/*AzureFunctions*.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
105+
/tracer/src/Datadog.AzureFunctions/ @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
106+
/tracer/test/**/*AzureAppService*.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
107+
/tracer/test/**/*AzureFunctions*.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
108+
/tracer/test/test-applications/azure-functions/ @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
109+
/tracer/test/Datadog.Trace.ClrProfiler.Managed.Tests/HttpBypassTests.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
110+
/tracer/samples/AzureFunctionsWithAgentLessLogging/ @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
111+
/docs/development/**/AzureFunctions*.md @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
112+
113+
## Serverless (GCP)
114+
/tracer/src/**/*GCP*.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
115+
/tracer/test/**/*GCP*.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
116+
94117
# ASM
95118
/tracer/src/Datadog.Trace/AppSec/ @DataDog/asm-dotnet
96119
/tracer/src/Datadog.Tracer.Native/iast/ @DataDog/asm-dotnet
@@ -142,28 +165,14 @@ Datadog.Trace.Debugger.slnf @DataDog/debugger-dotnet
142165
# Exploration tests
143166
/tracer/build/_build/Build.ExplorationTests.cs @DataDog/debugger-dotnet @DataDog/tracing-dotnet @DataDog/profiling-dotnet
144167

145-
## Serverless (AWS Lambda)
146-
/tracer/src/**/*Lambda* @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-aws
147-
/tracer/test/**/*Lambda* @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-aws
148-
/tracer/build/_build/docker/serverless.lambda.dockerfile @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-aws
149-
/docker-compose.serverless.yml @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-aws
150-
/.gitlab/download-serverless-artifacts.sh @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-aws
151-
/docs/development/**/*Lambda*.md @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-aws
152-
153-
## Serverless (Azure)
154-
/tracer/src/**/*AzureAppService*.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
155-
/tracer/src/**/*AzureFunctions*.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
156-
/tracer/src/Datadog.AzureFunctions/ @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
157-
/tracer/test/**/*AzureAppService*.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
158-
/tracer/test/**/*AzureFunctions*.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
159-
/tracer/test/test-applications/azure-functions/ @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
160-
/tracer/test/Datadog.Trace.ClrProfiler.Managed.Tests/HttpBypassTests.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
161-
/tracer/samples/AzureFunctionsWithAgentLessLogging/ @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
162-
/docs/development/**/AzureFunctions*.md @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
163-
164-
## Serverless (GCP)
165-
/tracer/src/**/*GCP*.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
166-
/tracer/test/**/*GCP*.cs @DataDog/tracing-dotnet @DataDog/apm-serverless @DataDog/serverless-azure-and-gcp
168+
## Feature Flagging and Experimentation
169+
/tracer/src/Datadog.Trace/FeatureFlags/ @DataDog/feature-flagging-and-experimentation-sdk @DataDog/tracing-dotnet
170+
/tracer/src/Datadog.Trace.Manual/FeatureFlags/ @DataDog/feature-flagging-and-experimentation-sdk @DataDog/tracing-dotnet
171+
/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/ManualInstrumentation/FeatureFlags/ @DataDog/feature-flagging-and-experimentation-sdk @DataDog/tracing-dotnet
172+
/tracer/test/Datadog.Trace.Tests/FeatureFlags/ @DataDog/feature-flagging-and-experimentation-sdk @DataDog/tracing-dotnet
173+
/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/FeatureFlags/ @DataDog/feature-flagging-and-experimentation-sdk @DataDog/tracing-dotnet
174+
/tracer/test/test-applications/integrations/Samples.FeatureFlags/ @DataDog/feature-flagging-and-experimentation-sdk @DataDog/tracing-dotnet
175+
/tracer/test/test-applications/integrations/Samples.OpenFeature/ @DataDog/feature-flagging-and-experimentation-sdk @DataDog/tracing-dotnet
167176

168177
# Shared code we could move to the root folder
169178
/tracer/build/ @DataDog/apm-dotnet

.github/workflows/_create_draft_release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
create_draft_release:
4545
runs-on: ubuntu-latest
4646
environment: publish-debug-symbols-env
47+
# These permissions need to map to the ones demanded in create_normal_draft_release.yml and create_hotfix_draft_release.yml
4748
permissions:
4849
contents: write # create release
4950
actions: read # read secrets

.github/workflows/create_hotfix_draft_release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ jobs:
2828
create_hotfix_draft_release:
2929
needs: check_branch
3030
uses: ./.github/workflows/_create_draft_release.yml
31+
# These permissions need to map to the ones demanded in _create_draft_release.yml
32+
permissions:
33+
contents: write # create release
34+
actions: read # read secrets
35+
issues: write # change milestones
3136
with:
3237
forced_commit_id: ${{ inputs.forced_commit_id }}
3338
ignore_gitlab_failures: ${{ inputs.ignore_gitlab_failures }}

.github/workflows/create_normal_draft_release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ jobs:
2828
create_normal_draft_release:
2929
needs: check_branch
3030
uses: ./.github/workflows/_create_draft_release.yml
31+
# These permissions need to map to the ones demanded in _create_draft_release.yml
32+
permissions:
33+
contents: write # create release
34+
actions: read # read secrets
35+
issues: write # change milestones
3136
with:
3237
forced_commit_id: ${{ inputs.forced_commit_id }}
3338
ignore_gitlab_failures: ${{ inputs.ignore_gitlab_failures }}

.gitlab-ci.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ variables:
1313
DOTNET_PACKAGE_VERSION:
1414
description: "Used by the package stage when triggered manually"
1515
REPO_NOTIFICATION_CHANNEL: "#apm-dotnet-bots"
16+
CI_IDENTITIES_CLIENT_URL: s3://binaries-ddbuild-io-prod/ci-identities/ci-identities-gitlab-job-client/versions/v0.2.0/ci-identities-gitlab-job-client-windows-amd64.exe
1617

1718
build:
1819
except:
@@ -37,7 +38,9 @@ build:
3738
-e AWS_NETWORKING=true `
3839
-e SIGN_WINDOWS=true `
3940
-e NUGET_CERT_REVOCATION_MODE=offline `
40-
registry.ddbuild.io/images/mirror/datadog/dd-trace-dotnet-docker-build:dotnet10 `
41+
-e CI_IDENTITIES_GITLAB_ID_TOKEN `
42+
-e CI_PROJECT_NAME `
43+
registry.ddbuild.io/images/mirror/datadog/dd-trace-dotnet-docker-build:ci-identities `
4144
Info Clean BuildTracerHome BuildProfilerHome BuildNativeLoader BuildDdDotnet PublishFleetInstaller PackageTracerHome ZipSymbols SignDlls SignMsi DownloadWinSsiTelemetryForwarder
4245
- mkdir artifacts-out
4346
- xcopy /e/s build-out\${CI_JOB_ID}\*.* artifacts-out
@@ -48,6 +51,9 @@ build:
4851
expire_in: 2 weeks
4952
paths:
5053
- artifacts-out
54+
id_tokens:
55+
CI_IDENTITIES_GITLAB_ID_TOKEN:
56+
aud: ci-identities
5157

5258
publish:
5359
only:
@@ -67,19 +73,17 @@ publish:
6773
pre_get_sources_script:
6874
- git config --system core.longpaths true
6975
script:
70-
- $result = aws sts assume-role --role-arn "arn:aws:iam::486234852809:role/ci-datadog-windows-filter" --role-session-name AWSCLI-Session
71-
- $resultjson = $result | convertfrom-json
72-
- $credentials = $($resultjson.Credentials)
73-
- $Env:AWS_ACCESS_KEY_ID="$($credentials.AccessKeyId)"
74-
- $Env:AWS_SECRET_ACCESS_KEY="$($credentials.SecretAccessKey)"
75-
- $Env:AWS_SESSION_TOKEN="$($credentials.SessionToken)"
76+
# TODO remove the aws s3 cp command
77+
# when the client is installed in the Windows runner image
78+
- aws s3 cp --only-show-errors ${CI_IDENTITIES_CLIENT_URL} ./ci-identities-gitlab-job-client.exe
79+
- ./ci-identities-gitlab-job-client.exe assume-role
7680
- |
7781
$i = 0
7882
do {
7983
try {
8084
# The grants option at the end is used to allow public access on the files we upload as the acls only aren't enough.
8185
aws s3 cp artifacts-out/ s3://dd-windowsfilter/builds/tracer/${CI_COMMIT_SHA} --recursive --region us-east-1 --exclude "*" --include "*.zip" --include "*.msi" --include "telemetry_forwarder.exe" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers full=id=3a6e02b08553fd157ae3fb918945dd1eaae5a1aa818940381ef07a430cf25732
82-
If ($LASTEXITCODE -eq 0) {
86+
If ($LASTEXITCODE -eq 0) {
8387
return
8488
}
8589
@@ -95,6 +99,11 @@ publish:
9599
# If we got here, all retries failed – fail the job:
96100
Write-Error "Failed to upload artifacts to S3 after $i attempts."
97101
exit 1
102+
variables:
103+
AWS_SHARED_CREDENTIALS_FILE: ${CI_PROJECT_DIR}\.aws\credentials-by-job-id\${CI_JOB_ID}
104+
id_tokens:
105+
CI_IDENTITIES_GITLAB_ID_TOKEN:
106+
aud: ci-identities
98107

99108

100109
download-single-step-artifacts:
@@ -245,4 +254,4 @@ validate_supported_configurations_local_file:
245254
- when: on_success
246255
extends: .validate_supported_configurations_local_file
247256
variables:
248-
LOCAL_JSON_PATH: "tracer/src/Datadog.Trace/Configuration/supported-configurations.json"
257+
LOCAL_JSON_PATH: "tracer/src/Datadog.Trace/Configuration/supported-configurations.json"

0 commit comments

Comments
 (0)