Skip to content

Commit

Permalink
Merge branch 'master' into mohammad/datadog_json_tracer_logs
Browse files Browse the repository at this point in the history
  • Loading branch information
chojomok authored Nov 21, 2024
2 parents c4c3f69 + fb950f7 commit 0691329
Show file tree
Hide file tree
Showing 137 changed files with 2,131 additions and 5,539 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/ultimate-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ variables:
DD_COLLECTOR_CPU_USAGE: true
# If we're doing an SSI run, set the indicator, the rest need to be set in the stage
IS_SSI_RUN: $[ or(eq(variables['Build.CronSchedule.DisplayName'], 'Daily SSI Run'), eq(variables['force_ssi_run'], 'true')) ]
ToolVersion: 3.6.0
ToolVersion: 3.7.0

# Declare the datadog agent as a resource to be used as a pipeline service
resources:
Expand Down
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,7 @@
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

# Stop hiding the build subfolders in the github file search
# https://docs.github.com/en/search-github/searching-on-github/finding-files-on-github#customizing-excluded-files
build/** linguist-generated=false
2 changes: 1 addition & 1 deletion .github/workflows/create_draft_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
shell: bash
run: |
mkdir debug_symbols
tar -zxvf linux-native-symbols.tar.gz -C debug_symbols
tar -zxvf ${{steps.assets.outputs.artifacts_path}}/linux-native-symbols.tar.gz -C debug_symbols
- name: 'Push debug symbols to datadog'
uses: ./.github/actions/publish-debug-symbols
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.8..3.19)
cmake_minimum_required (VERSION 3.13.4)
cmake_policy(SET CMP0015 NEW)

if(POLICY CMP0135)
Expand Down
78 changes: 78 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,84 @@




## [Release 3.6.0](https://github.com/DataDog/dd-trace-dotnet/releases/tag/v3.6.0)

## Summary

* Adds support for .NET 9
* Adds DSM support for AWS SNS
* Add support for baggage propagation
* [CI Visibility] Add support for coverlet.msbuild coverage reporting
* [Dynamic Instrumentation] Collect code origin for exit spans
* [ASM] Fix shutdown bug
* [Continuous Profiler] Fix crash at shutdown

## Changes

### Tracer
* Baggage part 3/3: add public api to `Datadog.Trace.Manual` (#6190)
* Baggage part 2/3: propagation (#6158)
* Remove dependency on System.IO.Compression for .NET Framework build (#6192)
* Add default value to StringBuilderCache, and use in more places (#6232)
* Enable baggage propagator by default (#6258)
* Add support for `AllowWriteStreamBuffering=false` in `WebRequest` for .NET 9 (#6271)
* Add initial support for .NET 9 (#6265)
* Ensure that we never run any call target instrumentations in partial trust (#6290)

### CI Visibility
* [CI Visibility] Add more checks for the object pack files (#6256)
* [CI Visibility] GitInfoProvider refactor (#6259)
* [CI Visibility] Add support for coverlet.msbuild coverage reporting (#6284)
* [CI Visibility] Fix GitCommandParser test (#6289)
* [CI Visibility] Catch some gitinfo exceptions. (#6297)

### ASM
* [ASM] Avoid HttpRequestValidationException when reading body or namevalueCollection values (#6185)
* [ASM] Fix issue with waf disposing while it might concurrently be updating (#6250)
* [ASM] Serialize ASM tags and metrics (#6272)
* [ASM] Fix benchmarks AppSecBodyBenchmarks: have a trace context to avoid null reference exceptions (#6274)
* [ASM] IAST: Add web form tests (#6276)
* [ASM] iast: Fix `Microsoft.Data.Sqlite` database tainting (#6295)
* [IAST] Minor cleanup in IAST aspects (#6293)
* [IAST] Updated CallSite IL Dump (#6240)

### Continuous Profiler
* [Profiler] CPU profiler: Check if the stackwalk lock was not already taken (#6198)
* [Profiler] Prevent `StackSamplerLoop` from crashing at shutdown (#6238)
* [Profiler] Add metrics for cpu and walltime profilers (#6267)
* [Profiler] Fix crash at shutdown with the `timer_create`-based CPU profiler (#6268)

### Debugger
* [Dynamic Instrumentation] DEBUG-2916 Stabilize the probe processor (#6077)
* [Dynamic Instrumentation] DEBUG-3088 Add object pool (#6105)
* [Dynamic Instrumentation] DEBUG-2913 Fix runtime reflection exceptions when getting field value (#6078)
* [Dynamic Instrumentation] DEBUG-2602 Collection expressions fixes (#6087)
* [Dynamic Instrumentation] DEBUG-3076 Code origin for exit spans (#6216)
* [Dynamic Instrumentation] DEBUG-3110 Fix how we access span in probe processor (#6242)

### Miscellaneous
* Add DSM support for AWS SNS (#6253)
* Downgrade error to warning (#6263)
* Improve docs for building on mac (APMSP-1425) (#6254)
* baggage propagator clean up (#6266)
* Add additional exclusions for dependency collection (#6282)

### Build / Test
* [IAST] Macos compilation warning fix (#6255)
* [refacto] Unify SNS and SQS instrumentation code (#6199)
* Add additional exclusions to for obsolete libraries (#6231)
* Fix typo in create_draft_release.yml (#6246)
* [Test Package Versions Bump] Updating package versions (#6249)
* Make snapshot tests compatible with running on Docker v2 (#6260)
* Fix R2R build for OSX-ARM64 (#6264)
* Small fixes for .NET 9 (#6277)
* Exclude Paket from exploration tests for now (#6283)
* Fix r2r manual instrumentation issue in .NET 9 x86 (#6286)
* Add more smoke testing for .NET 9 (#6296)

[Changes since 3.5.0](https://github.com/DataDog/dd-trace-dotnet/compare/v3.5.0...v3.6.0)

## [Release 3.5.0](https://github.com/DataDog/dd-trace-dotnet/releases/tag/v3.5.0)

## Summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Project definition
# ******************************************************

project("Datadog.Linux.ApiWrapper" VERSION 3.6.0)
project("Datadog.Linux.ApiWrapper" VERSION 3.7.0)

# ******************************************************
# Compiler options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Project definition
# ******************************************************

project("Datadog.Profiler.Native.Linux" VERSION 3.6.0)
project("Datadog.Profiler.Native.Linux" VERSION 3.7.0)

option(RUN_ASAN "Build with Clang Undefined-Behavior Sanitizer" OFF)
option(RUN_UBSAN "Build with Clang Undefined-Behavior Sanitizer" OFF)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ END

// ------- version info -------------------------------------------------------
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,6,0,0
PRODUCTVERSION 3,6,0,0
FILEVERSION 3,7,0,0
PRODUCTVERSION 3,7,0,0
FILEFLAGSMASK VS_FF_PRERELEASE
FILEOS VOS_NT
FILETYPE VFT_DLL
Expand All @@ -74,12 +74,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Datadog"
VALUE "FileDescription", "Continuous Profiler for .NET Applications"
VALUE "FileVersion", "3.6.0.0"
VALUE "FileVersion", "3.7.0.0"
VALUE "InternalName", "Native Profiler Engine"
VALUE "LegalCopyright", "(c) Datadog 2020-2022"
VALUE "OriginalFilename", "Datadog.Profiler.Native.dll"
VALUE "ProductName", "Continuous Profiler for .NET Applications"
VALUE "ProductVersion", "3.6.0.0"
VALUE "ProductVersion", "3.7.0.0"
END
END
BLOCK "VarFileInfo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,26 @@ void ContentionProvider::OnContention(uint64_t timestamp, uint32_t threadId, dou
void ContentionProvider::SetBlockingThread(uint64_t osThreadId)
{
std::shared_ptr<ManagedThreadInfo> info;
if (osThreadId != 0 && _pManagedThreadList->TryGetThreadInfo(static_cast<uint32_t>(osThreadId), info))
auto currentThreadInfo = ManagedThreadInfo::CurrentThreadInfo;
if (osThreadId != 0 &&
currentThreadInfo != nullptr &&
_pManagedThreadList->TryGetThreadInfo(static_cast<uint32_t>(osThreadId), info))
{
ManagedThreadInfo::CurrentThreadInfo->SetBlockingThread(osThreadId, info->GetThreadName());
currentThreadInfo->SetBlockingThread(osThreadId, info->GetThreadName());
}
}

// .NET synchronous implementation: we are expecting to be called from the same thread that is contending.
// It means that the current thread will be stack walking itself.
void ContentionProvider::OnContention(double contentionDurationNs)
{
auto [blockingThreadId, blockingThreadName] = ManagedThreadInfo::CurrentThreadInfo->SetBlockingThread(0, WStr(""));
auto currentThreadInfo = ManagedThreadInfo::CurrentThreadInfo;
if (currentThreadInfo == nullptr)
{
return;
}

auto [blockingThreadId, blockingThreadName] = currentThreadInfo->SetBlockingThread(0, WStr(""));
AddContentionSample(0, -1, contentionDurationNs, blockingThreadId, std::move(blockingThreadName), _emptyStack);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

#pragma once

constexpr auto PROFILER_VERSION = "3.6.0";
constexpr auto PROFILER_VERSION = "3.7.0";
2 changes: 1 addition & 1 deletion profiler/src/ProfilerEngine/ProductVersion.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<!-- * * * * * * * * * * * INPUTS. Update this section EVERY time the component is shipped/released! * * * * * * * * * * * -->
<PropertyGroup>
<ProductVersion>3.6.0</ProductVersion>
<ProductVersion>3.7.0</ProductVersion>
</PropertyGroup>
<!-- * * * * * * * * * * * END OF INPUTS. * * * * * * * * * * * -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public void GenerateDumpIfDbgRequested(string appName, string framework, string
runner.Environment.SetVariable("COMPlus_DbgEnableMiniDump", "1");
runner.Environment.SetVariable("COMPlus_DbgMiniDumpName", "/dev/null");
runner.Environment.SetVariable("COMPlus_DbgMiniDumpType", string.Empty);
runner.Environment.SetVariable("COMPlus_CreateDumpDiagnostics", "1");

using var processHelper = runner.LaunchProcess();

Expand Down
4 changes: 2 additions & 2 deletions shared/src/Datadog.Trace.ClrProfiler.Native/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.8..3.19)
cmake_minimum_required (VERSION 3.13.4)
cmake_policy(SET CMP0015 NEW)

# macOS uses 3.30 which deprecates FetchContent_Populate in favor of FetchContent_MakeAvailable,
Expand All @@ -12,7 +12,7 @@ endif()
# Project definition
# ******************************************************

project("Datadog.Trace.ClrProfiler.Native" VERSION 3.6.0)
project("Datadog.Trace.ClrProfiler.Native" VERSION 3.7.0)

if (UNIVERSAL)
find_package(GlibcCompat REQUIRED)
Expand Down
8 changes: 4 additions & 4 deletions shared/src/Datadog.Trace.ClrProfiler.Native/Resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ VS_VERSION_INFO VERSIONINFO
#else
FILEFLAGS 0x0L
#endif
FILEVERSION 3,6,0,0
PRODUCTVERSION 3,6,0,0
FILEVERSION 3,7,0,0
PRODUCTVERSION 3,7,0,0
FILEOS VOS_NT
FILETYPE VFT_DLL
BEGIN
Expand All @@ -68,12 +68,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Datadog"
VALUE "FileDescription", "Native loader for Datadog .NET APM"
VALUE "FileVersion", "3.6.0.0"
VALUE "FileVersion", "3.7.0.0"
VALUE "InternalName", "Native loader"
VALUE "LegalCopyright", "(c) Datadog 2020-2022"
VALUE "OriginalFilename", "Datadog.Trace.ClrProfiler.Native.dll"
VALUE "ProductName", "Native loader for Datadog .NET APM"
VALUE "ProductVersion", "3.6.0.0"
VALUE "ProductVersion", "3.7.0.0"
END
END
BLOCK "VarFileInfo"
Expand Down
4 changes: 2 additions & 2 deletions shared/src/msi-installer/WindowsInstaller.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<IntermediateOutputPath>obj\$(Configuration)\$(Platform)\</IntermediateOutputPath>
<SuppressPdbOutput>True</SuppressPdbOutput>
<DefineSolutionProperties>false</DefineSolutionProperties>
<OutputName>datadog-dotnet-apm-3.6.0-$(Platform)</OutputName> <!-- -The regex recognizes this line -->
<OutputName>datadog-dotnet-apm-3.7.0-$(Platform)</OutputName> <!-- -The regex recognizes this line -->
<MonitoringHomeDirectory Condition="'$(MonitoringHomeDirectory)' == ''">$(MSBuildThisFileDirectory)..\..\bin\monitoring-home</MonitoringHomeDirectory>
<DefineConstants>InstallerVersion=3.6.0;MonitoringHomeDirectory=$(MonitoringHomeDirectory);</DefineConstants>
<DefineConstants>InstallerVersion=3.7.0;MonitoringHomeDirectory=$(MonitoringHomeDirectory);</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DefineConstants>$(DefineConstants);Debug</DefineConstants>
Expand Down
2 changes: 1 addition & 1 deletion shared/src/native-src/version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#pragma once

constexpr auto PROFILER_VERSION = "3.6.0";
constexpr auto PROFILER_VERSION = "3.7.0";
9 changes: 7 additions & 2 deletions tracer/build/_build/Build.Steps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Text.Json;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using CodeGenerators;
using Mono.Cecil;
using Nuke.Common;
using Nuke.Common.IO;
Expand Down Expand Up @@ -62,7 +63,7 @@ partial class Build

AbsolutePath NativeBuildDirectory => RootDirectory / "obj";

const string LibDdwafVersion = "1.20.1";
const string LibDdwafVersion = "1.21.0";

string[] OlderLibDdwafVersions = { "1.3.0", "1.10.0", "1.14.0", "1.16.0" };

Expand Down Expand Up @@ -369,7 +370,8 @@ bool RequiresThoroughTesting()
.Description("Compiles the native tracer assets")
.DependsOn(CompileTracerNativeSrcWindows)
.DependsOn(CompileNativeSrcMacOs)
.DependsOn(CompileTracerNativeSrcLinux);
.DependsOn(CompileTracerNativeSrcLinux)
.After(CompileManagedSrc);

Target CompileTracerNativeTests => _ => _
.Unlisted()
Expand Down Expand Up @@ -432,6 +434,9 @@ bool RequiresThoroughTesting()
var toBuild = include.Except(exclude);
DotnetBuild(toBuild, noDependencies: false);
var nativeGeneratedFilesOutputPath = NativeTracerProject.Directory / "Generated";
CallSitesGenerator.GenerateCallSites(TargetFrameworks, tfm => DatadogTraceDirectory / "bin" / BuildConfiguration / tfm / Projects.DatadogTrace + ".dll", nativeGeneratedFilesOutputPath);
});


Expand Down
2 changes: 1 addition & 1 deletion tracer/build/_build/Build.VariableGenerations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ void GenerateLinuxNuGetSmokeTestsMatrix()
"opensuse",
new SmokeTestImage[]
{
new (publishFramework: TargetFramework.NET7_0, "15-9.0"),
new (publishFramework: TargetFramework.NET9_0, "15-9.0"),
new (publishFramework: TargetFramework.NET7_0, "15-7.0"),
new (publishFramework: TargetFramework.NET6_0, "15-6.0"),
new (publishFramework: TargetFramework.NET5_0, "15-5.0"),
Expand Down
2 changes: 1 addition & 1 deletion tracer/build/_build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ partial class Build : NukeBuild
const int LatestMajorVersion = 3;

[Parameter("The current version of the source and build")]
readonly string Version = "3.6.0";
readonly string Version = "3.7.0";

[Parameter("Whether the current build version is a prerelease(for packaging purposes)")]
readonly bool IsPrerelease = false;
Expand Down
Loading

0 comments on commit 0691329

Please sign in to comment.