Skip to content

Commit 8a3be12

Browse files
authored
Merge branch 'master' into fix/apms-20099-global-coverage-memory
2 parents 2b2c1d3 + 433de1b commit 8a3be12

58 files changed

Lines changed: 2921 additions & 1262 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.

.azure-pipelines/ultimate-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ variables:
154154
DD_LOGGER_DD_TAGS: test.configuration.job:$(System.JobDisplayName)
155155
DD_LOGGER_ENABLED: true
156156
DD_COLLECTOR_CPU_USAGE: true
157-
ToolVersion: 3.50.0
157+
ToolVersion: 3.51.0
158158
# .NET SDK performance optimization variables
159159
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
160160
DOTNET_CLI_TELEMETRY_OPTOUT: 1

.gitlab-ci.yml

Lines changed: 81 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ stages:
22
- build
33
- publish
44
- package
5-
- shared-pipeline
5+
- shared-pipeline-build
6+
- shared-pipeline-test
7+
- shared-pipeline-publish
68
- publish
79
- benchmarks
810
# These benchmarks are running in parallel with the legacy ones
@@ -108,10 +110,72 @@ build:
108110
exit 1
109111
}
110112
- |
111-
docker run --rm -m 10240M `
113+
try {
114+
$computerSystem = Get-CimInstance Win32_ComputerSystem
115+
$operatingSystem = Get-CimInstance Win32_OperatingSystem
116+
Write-Output ("Runner memory: {0:N1} GB total, {1:N1} GB free" -f ($computerSystem.TotalPhysicalMemory / 1GB), ($operatingSystem.FreePhysicalMemory * 1KB / 1GB))
117+
Write-Output "Runner logical processors: $($computerSystem.NumberOfLogicalProcessors)"
118+
} catch {
119+
Write-Warning "Unable to retrieve runner information: $_"
120+
}
121+
122+
$containerName = "dd-trace-build-$env:CI_JOB_ID"
123+
$containerMemoryLimit = 20GB
124+
$dockerPath = (Get-Command docker).Source
125+
$statsJob = Start-Job -ArgumentList $containerName, $containerMemoryLimit, $dockerPath -ScriptBlock {
126+
param($name, $memoryLimit, $docker)
127+
128+
function ConvertTo-Bytes([string] $value) {
129+
if ($value -notmatch '^\s*([0-9]+(?:\.[0-9]+)?)\s*([KMGT]?i?B)\s*$') {
130+
return $null
131+
}
132+
133+
$factors = @{
134+
B = 1
135+
KB = 1KB
136+
KiB = 1KB
137+
MB = 1MB
138+
MiB = 1MB
139+
GB = 1GB
140+
GiB = 1GB
141+
TB = 1TB
142+
TiB = 1TB
143+
}
144+
145+
return [double]$Matches[1] * $factors[$Matches[2]]
146+
}
147+
148+
$containerSeen = $false
149+
$peakBytes = 0.0
150+
$peakUsage = "unknown"
151+
152+
while ($true) {
153+
$stats = & $docker stats $name --no-stream --format "{{.MemUsage}}" 2>$null
154+
if ($LASTEXITCODE -eq 0 -and $stats) {
155+
$containerSeen = $true
156+
$usage = ($stats -split '/', 2)[0].Trim()
157+
$usageBytes = ConvertTo-Bytes $usage
158+
if ($null -ne $usageBytes -and $usageBytes -gt $peakBytes) {
159+
$peakBytes = $usageBytes
160+
$peakUsage = $usage
161+
}
162+
} elseif ($containerSeen) {
163+
break
164+
}
165+
166+
Start-Sleep -Seconds 5
167+
}
168+
169+
$peakPercent = 100 * $peakBytes / $memoryLimit
170+
Write-Output ("Peak container memory: {0} ({1:N1}% of limit)" -f $peakUsage, $peakPercent)
171+
}
172+
173+
# Enable MSVC /MP, capped at the runner's logical processor count.
174+
docker run --name $containerName --rm -m 20480M `
112175
-v "$(Get-Location):c:\mnt" `
113176
-e CI_JOB_ID=${CI_JOB_ID} `
114-
-e ENABLE_MULTIPROCESSOR_COMPILATION=false `
177+
-e ENABLE_MULTIPROCESSOR_COMPILATION=true `
178+
-e CL_MPCount=16 `
115179
-e WINDOWS_BUILDER=true `
116180
-e AWS_NETWORKING=true `
117181
-e SIGN_WINDOWS=true `
@@ -121,6 +185,19 @@ build:
121185
-e CI_JOB_NAME_SLUG `
122186
$env:WINDOWS_BUILD_IMAGE `
123187
Info Clean BuildTracerHome BuildProfilerHome BuildNativeLoader BuildDdDotnet PublishFleetInstaller PackageTracerHome ZipSymbols SignDlls SignMsi DownloadWinSsiTelemetryForwarder
188+
$buildExitCode = $LASTEXITCODE
189+
190+
Wait-Job $statsJob -Timeout 15 | Out-Null
191+
if ($statsJob.State -eq 'Running') {
192+
Stop-Job $statsJob
193+
}
194+
195+
Receive-Job $statsJob
196+
Remove-Job $statsJob -Force
197+
198+
if ($buildExitCode -ne 0) {
199+
throw "Docker build container exited with code $buildExitCode"
200+
}
124201
- mkdir artifacts-out
125202
- xcopy /e/s build-out\${CI_JOB_ID}\*.* artifacts-out
126203
- remove-item -recurse -force build-out\${CI_JOB_ID}
@@ -377,4 +454,4 @@ update_central_configurations_version_range_v2:
377454
variables:
378455
LOCAL_CONFIG_PATH: $SUPPORTED_CONFIG_PATH
379456
LANGUAGE_NAME: "dotnet"
380-
SEND_ALIASES: true
457+
SEND_ALIASES: true

.gitlab/one-pipeline.locked.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# DO NOT EDIT THIS FILE MANUALLY
22
# This file is auto-generated by automation.
33
include:
4-
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/f9ee2fa697e8b0c440dc9762cc522cafbe295a9671d49067f38258fbee985c74/one-pipeline.yml
4+
- remote: https://gitlab-templates.ddbuild.io/libdatadog/include/versions/1.1.0/one-pipeline.yml
55

docs/CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,53 @@
5151

5252

5353

54+
55+
56+
## [Release 3.50.0](https://github.com/DataDog/dd-trace-dotnet/releases/tag/v3.50.0)
57+
58+
## Summary
59+
60+
- [Tracing] Add support for Serilog 4.4.0
61+
- [Test Optimization] Add support for MSTest 4.3.0
62+
- [ASM] Handle billing issues for standonly mode
63+
- [Dynamic Instrumentation] Redact sensitive values in expression dumps
64+
65+
## Changes
66+
67+
### Tracer
68+
* [OTLP] Removing the path with OtelTracesSpanMetricsEnabled (#8921)
69+
* Add support for Serilog 4.4.0 (#8917)
70+
71+
### CI Visibility
72+
* fix(mstest): support ExecuteTestAsync in 4.3 (#8934)
73+
74+
### ASM
75+
* [ASM] Set _dd.apm.enabled:0 on all spans (#8923)
76+
* [IAST] Exclude FSharp.* assemblies from dataflow (#8905)
77+
* [AppSec] Report agentic onboarding marker in configuration telemetry (RFC-1113) (#8920)
78+
79+
### Continuous Profiler
80+
* [Profiler] Fix possible namepipe-related issues (#8821)
81+
82+
### Debugger
83+
* [Debugger] Redact sensitive values in expression dumps (#8879)
84+
85+
### Build / Test
86+
* Move TestOptimizationFeatureTests to TracerInstanceTestCollection (#8880)
87+
* [Debugger] Deflake instanceof assembly lookup tests (#8885)
88+
* chore(benchmarks): migrate benchmarking base image to :newest tag (#8924)
89+
* Mark CheckProfilesSentThroughNamedPipe Flaky (#8932)
90+
* Forward BP_EXTERNAL_S3_URL through benchmark CI triggers (#8882)
91+
* make sure parent env variables are not polluting the test env (#8883)
92+
* Attempt to fix more flake in System.Data.SqlClient (#8899)
93+
* Forward BP_EXTERNAL_S3_URL explicitly on benchmark triggers (#8908)
94+
* clean env variables in the correct place (#8918)
95+
* [Tests] Skip MySQL and Npgsql tests on database timeouts (#8922)
96+
* Exclude EndServerAsyncAdd from WCF legacy snapshots (#8927)
97+
* Fix Azure Service Bus sample restore (#8933)
98+
99+
100+
[Changes since 3.49.0](https://github.com/DataDog/dd-trace-dotnet/compare/v3.49.0...v3.50.0)
54101

55102
## [Release 3.49.0](https://github.com/DataDog/dd-trace-dotnet/releases/tag/v3.49.0)
56103

profiler/src/ProfilerEngine/Datadog.Linux.ApiWrapper/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Project definition
33
# ******************************************************
44

5-
project("Datadog.Linux.ApiWrapper" VERSION 3.50.0)
5+
project("Datadog.Linux.ApiWrapper" VERSION 3.51.0)
66

77
# ******************************************************
88
# Compiler options

profiler/src/ProfilerEngine/Datadog.Profiler.Native.Linux/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Project definition
33
# ******************************************************
44

5-
project("Datadog.Profiler.Native.Linux" VERSION 3.50.0)
5+
project("Datadog.Profiler.Native.Linux" VERSION 3.51.0)
66

77
option(RUN_ASAN "Build with Clang Undefined-Behavior Sanitizer" OFF)
88
option(RUN_UBSAN "Build with Clang Undefined-Behavior Sanitizer" OFF)
@@ -48,7 +48,12 @@ if (RUN_UBSAN)
4848
endif()
4949

5050
if (RUN_TSAN)
51-
add_compile_options(-fsanitize=thread -g -fno-omit-frame-pointer -DDD_SANITIZERS)
51+
# DD_SANITIZE_THREAD (distinct from the general DD_SANITIZERS flag shared
52+
# with ASAN/UBSAN) gates TSAN-only annotations (see SpinningMutex.hpp /
53+
# ReaderWriterSpinningMutex.hpp) that call into libtsan's __tsan_mutex_* API.
54+
# Those symbols only exist when actually linked with -fsanitize=thread, so
55+
# this must NOT be defined under ASAN/UBSAN-only builds.
56+
add_compile_options(-fsanitize=thread -g -fno-omit-frame-pointer -DDD_SANITIZERS -DDD_SANITIZE_THREAD)
5257
endif()
5358

5459
if(ISLINUX)

profiler/src/ProfilerEngine/Datadog.Profiler.Native.Windows/Resource.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ END
6262

6363
// ------- version info -------------------------------------------------------
6464
VS_VERSION_INFO VERSIONINFO
65-
FILEVERSION 3,50,0,0
66-
PRODUCTVERSION 3,50,0,0
65+
FILEVERSION 3,51,0,0
66+
PRODUCTVERSION 3,51,0,0
6767
FILEFLAGSMASK VS_FF_PRERELEASE
6868
FILEOS VOS_NT
6969
FILETYPE VFT_DLL
@@ -74,12 +74,12 @@ BEGIN
7474
BEGIN
7575
VALUE "CompanyName", "Datadog"
7676
VALUE "FileDescription", "Continuous Profiler for .NET Applications"
77-
VALUE "FileVersion", "3.50.0.0"
77+
VALUE "FileVersion", "3.51.0.0"
7878
VALUE "InternalName", "Native Profiler Engine"
7979
VALUE "LegalCopyright", "(c) Datadog 2020-2022"
8080
VALUE "OriginalFilename", "Datadog.Profiler.Native.dll"
8181
VALUE "ProductName", "Continuous Profiler for .NET Applications"
82-
VALUE "ProductVersion", "3.50.0.0"
82+
VALUE "ProductVersion", "3.51.0.0"
8383
END
8484
END
8585
BLOCK "VarFileInfo"

0 commit comments

Comments
 (0)