-
Notifications
You must be signed in to change notification settings - Fork 165
Comparing changes
Open a pull request
base repository: DataDog/dd-trace-dotnet
base: v3.47.0
head repository: DataDog/dd-trace-dotnet
compare: v3.48.0
- 11 commits
- 101 files changed
- 9 contributors
Commits on Jun 24, 2026
-
The following files were found to be modified (as expected) - [x] docs/CHANGELOG.md - [x] .azure-pipelines/ultimate-pipeline.yml - [x] profiler/src/ProfilerEngine/Datadog.Profiler.Native.Linux/CMakeLists.txt - [x] profiler/src/ProfilerEngine/Datadog.Profiler.Native.Windows/Resource.rc - [x] profiler/src/ProfilerEngine/Datadog.Profiler.Native/dd_profiler_version.h - [x] profiler/src/ProfilerEngine/Datadog.Linux.ApiWrapper/CMakeLists.txt - [x] profiler/src/ProfilerEngine/ProductVersion.props - [x] shared/src/Datadog.Trace.ClrProfiler.Native/CMakeLists.txt - [x] shared/src/Datadog.Trace.ClrProfiler.Native/Resource.rc - [x] shared/src/msi-installer/WindowsInstaller.wixproj - [x] shared/src/native-src/version.h - [x] tracer/build/artifacts/dd-dotnet.sh - [x] tracer/build/_build/Build.cs - [x] tracer/samples/AutomaticTraceIdInjection/MicrosoftExtensionsExample/MicrosoftExtensionsExample.csproj - [x] tracer/samples/AutomaticTraceIdInjection/Log4NetExample/Log4NetExample.csproj - [x] tracer/samples/AutomaticTraceIdInjection/NLog40Example/NLog40Example.csproj - [x] tracer/samples/AutomaticTraceIdInjection/NLog45Example/NLog45Example.csproj - [x] tracer/samples/AutomaticTraceIdInjection/NLog46Example/NLog46Example.csproj - [x] tracer/samples/AutomaticTraceIdInjection/SerilogExample/SerilogExample.csproj - [x] tracer/samples/ConsoleApp/Alpine3.10.dockerfile - [x] tracer/samples/ConsoleApp/Alpine3.9.dockerfile - [x] tracer/samples/ConsoleApp/Debian.dockerfile - [x] tracer/samples/OpenTelemetry/Debian.dockerfile - [x] tracer/samples/WindowsContainer/Dockerfile - [x] tracer/src/Datadog.Trace.ClrProfiler.Managed.Loader/Startup.cs - [x] tracer/src/Datadog.Tracer.Native/CMakeLists.txt - [x] tracer/src/Datadog.Tracer.Native/dd_profiler_constants.h - [x] tracer/src/Datadog.Tracer.Native/Resource.rc - [x] tracer/src/Directory.Build.props - [x] tracer/src/Datadog.Trace/TracerConstants.cs @DataDog/apm-dotnet Co-authored-by: link04 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3baa579 - Browse repository at this point
Copy the full SHA 3baa579View commit details -
[Debugger] Avoid resolving call tokens in exception replay IL scan (#…
…8815) ## Summary of changes - Replace Exception Replay IL call-token scanning based on `Module.ResolveMethod(token)` with metadata-reader inspection of `MethodDefinition`, `MemberReference`, and `MethodSpecification` tokens. - Expand IL operand skipping to use `OpCode.OperandType`, so scanning remains aligned across non-call instructions. - Add a regression test proving an unavailable dependency referenced by a `callvirt` token is not resolved or loaded while scanning. ## Reason for change `Module.ResolveMethod(token)` can force runtime method/type resolution for arbitrary call operands in customer IL. Exception Replay only needs to detect direct calls such as `ExceptionDispatchInfo.Throw()`, so this should be a metadata-only read and should not load unavailable dependencies or execute customer resolution side effects. ## Implementation details The analyzer now opens the declaring module's PE image with a metadata reader and compares call operands by token metadata. It matches method names and declaring type metadata against the requested target type, including base types and interfaces to preserve the previous assignability behavior used by inherited calls such as `Exception.ToString()` resolving to `Object.ToString()`. The metadata reader is created once per analyzed method. In production this path is already cached by `MethodUniqueIdentifier.MightMisleadStacktrace`, so the file metadata read happens once per method identity rather than per snapshot. ## Test coverage - `ILAnalyzerTests` --------- Co-authored-by: Cursor <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d5dd09f - Browse repository at this point
Copy the full SHA d5dd09fView commit details
Commits on Jun 25, 2026
-
Fix ObjectDisposedException race in DataStreamsWriter disposal (#8758)
## Summary of changes Stop disposing the `_flushSemaphore` and `_drainSignal` synchronization primitives in `DataStreamsWriter.DisposeAsync`. ## Reason for change Flaky CI failures (e.g. `DataStreamsMonitoringRabbitMQTests`) where `CheckBuildLogsForErrors` finds: ``` [Error] Error in data streams flush task System.AggregateException: ... (The semaphore has been disposed.) ---> System.ObjectDisposedException: The semaphore has been disposed. at System.Threading.SemaphoreSlim.Release(Int32 releaseCount) at Datadog.Trace.DataStreamsMonitoring.DataStreamsWriter.FlushAggregatorAsync() ``` This is a third variant of the disposal race partially addressed by #7968 and #7984. `FlushAndCloseAsync` waits for both the process and flush tasks, but with a 1-second fallback that must exist so process exit can never hang. On an overloaded CI host, the flush task can still be inside `FlushAggregatorAsync` (blocked in `_api.SendAsync`) when the fallback fires. `DisposeAsync` then disposes `_flushSemaphore`, and when the send returns, the `finally` block's `_flushSemaphore.Release()` throws `ObjectDisposedException`, faulting `_flushTask` and logging a spurious `[Error]` during shutdown. The same race exists latently for `_drainSignal` via `ProcessQueueLoop`. The 1-second fallback is load-bearing, so the race can't be closed by waiting longer. ## Implementation details `SemaphoreSlim` and `ManualResetEventSlim` only hold an unmanaged resource (a lazily-created wait handle) if their `AvailableWaitHandle`/`WaitHandle` property is accessed. This class never does — it only uses `WaitAsync`/`Wait`/`Release`/`Set`/`Reset`/`IsSet`. So `Dispose()` here is a no-op apart from arming the `ObjectDisposedException`. Removing both `Dispose()` calls eliminates the race at its source with no resource leak. Added a comment so the calls aren't reintroduced. ## Test coverage Covered by existing DSM tests; this removes the spurious shutdown error that `CheckBuildLogsForErrors` was flagging. ## Other details
Configuration menu - View commit details
-
Copy full SHA for e6d7b7f - Browse repository at this point
Copy the full SHA e6d7b7fView commit details -
Remove sampling-based weighting in Client Side Stats (#8828)
## Summary of changes Removes the incorrect sampling-based weighting from Client-Side stats ## Reason for change When implementing the updated CSS implementation in #8420, we compared with the canonicial Go implementation, and [added a `GetWeight()`](https://github.com/DataDog/datadog-agent/blob/ce22e11ee71e55be717b9d9a3f8f3d7721a9c6d7/pkg/trace/stats/weight.go) method based on this. However, the sampling rate that this is based on is based on the deprecated `_sample_rate` tag (which .NET never implemented), _not_ the normal sampling rate. Therefore this weighting causes overcounting. ## Implementation details - Rip out GetWeight() and associated usages - Revert various doubles back to `long`s - Remove the unnecessary stochastic rounding ## Test coverage - Removed one test for `GetWeight()` behavior - TBC a system test that would catch this - serverless e2e tests (thanks @apiarian-datadog!) caught this one
Configuration menu - View commit details
-
Copy full SHA for 51ca7e7 - Browse repository at this point
Copy the full SHA 51ca7e7View commit details
Commits on Jun 26, 2026
-
Fix GitHub Actions bugs and update documentation (#8812)
## Summary of changes - Add documentation on GitHub actions restrictions - Minor cleanup ## Reason for change We are going to start _enforcing_ that all GitHub Actions are SHA pinned, and that you can't introduce a new action without updating the allowlist. The change is already made, this is just updating documentation. ## Implementation details - Adds some docs about the process. - Locked down the GitHub Actions in Settings -> Actions -> General Also updated some "incorrect" SHA values: - `octokit/request-action`: SHA replaced, The SHA `786351db...` turned out to be a that doesn't correspond to any release tag, it was pinned to a random post-release commit rather than the `v2.4.0` release. - `.github/actions/create-system-test-docker-base-images/action.yml`: fixed space `#v4.1.0` → `# v4.1.0`. - `dependabot.yml`: Both `cooldown:` blocks were inside their correct list items _syntactically_, but were visually after comment lines describing the _next_ entry, so just moved them up ## Test coverage N/A
Configuration menu - View commit details
-
Copy full SHA for ded9e03 - Browse repository at this point
Copy the full SHA ded9e03View commit details -
[Test Package Versions Bump] Updating package versions (#8810)
Updates the package versions for integration tests. See below for a summary of the changes. ## Package Version Updates Bold entries indicate **major**-version bumps. `(new)` means no previous version existed. | Package | Integration | Previous | New | Published | |---------|-------------|----------|-----|-----------| | AWSSDK.Core | AwsSdk | 4.0.9.2 | 4.0.9.7 | 2026-06-22 | | AWSSDK.DynamoDBv2 | AwsDynamoDb | 4.0.21.3 | 4.0.21.7 | 2026-06-22 | | AWSSDK.Kinesis | AwsKinesis | 4.0.9.4 | 4.0.9.8 | 2026-06-22 | | Amazon.Lambda.RuntimeSupport | AwsLambda | 2.1.1 | 2.1.2 | 2026-06-22 | | AWSSDK.SQS | AwsSqs | 4.0.3.4 | 4.0.3.8 | 2026-06-22 | | AWSSDK.SimpleNotificationService | AwsSns | 4.0.3.4 | 4.0.3.8 | 2026-06-22 | | AWSSDK.EventBridge | AwsEventBridge | 4.0.6.6 | 4.0.6.10 | 2026-06-22 | | AWSSDK.S3 | AwsS3 | 4.0.24.4 | 4.0.25.3 | 2026-06-22 | | AWSSDK.StepFunctions | AwsStepFunctions | 4.0.4.4 | 4.0.4.8 | 2026-06-22 | | HotChocolate.AspNetCore | HotChocolate | 16.1.4 | 16.2.3 | 2026-06-22 | | ServiceStack.Redis | ServiceStackRedis | 10.0.6 | 10.0.8 | 2026-06-19 | | Selenium.WebDriver | Selenium | 4.44.0 | 4.45.0 | 2026-06-16 | ## Package Version Cooldown Report The following versions were published less than **2 days** ago and have been overridden. These require manual review before inclusion. | Package | Integration | Overridden Version | Published | Age (days) | |---------|-------------|--------------------|-----------|------------| | HotChocolate.AspNetCore | HotChocolate | 16.3.0 | 2026-06-25 | 0 | | Microsoft.Data.SqlClient | MicrosoftDataSqlClient | 6.1.6 | 2026-06-25 | 0 | | Microsoft.Data.SqlClient | MicrosoftDataSqlClient | 7.0.2 | 2026-06-25 | 0 | | StackExchange.Redis | StackExchangeRedis | 3.0.7 | 2026-06-24 | 1 | | MySqlConnector | MySqlConnector | 2.6.1 | 2026-06-25 | 0 | Co-authored-by: andrewlock <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0a13dc7 - Browse repository at this point
Copy the full SHA 0a13dc7View commit details -
[Debugger] Guard static member capture (#8814)
## Summary of changes - Guard debugger snapshot static field/property capture so members on types with static constructors are skipped. - Preserve static literal constants via `GetRawConstantValue`, including enum constants with their enum type. - Preserve existing static capture for declaring types without a type initializer. - Apply the same safety rules to probe expression member access and expression dump field capture. - Add regression coverage for cctor-free statics, risky cctor statics, literals, and enum constants. ## Reason for change Reading static members through reflection can trigger a customer type initializer (`.cctor`) during debugger snapshot or expression evaluation. This narrows static capture to cases that are metadata-safe while preserving existing behavior for constants and cctor-free types. ## Implementation details Static member safety is centralized in `StaticMemberSafety`. Static fields/properties are read only when their declaring type has no `TypeInitializer`; literal constants use metadata-only raw constant reads. Expression dumps filter unsafe static fields before `GetValue` and use the same literal handling. ## Implementation details Static member safety is centralized in `StaticMemberSafety`. A static member is still captured when: - it is a literal constant (`const` / `FieldInfo.IsLiteral`), read via `GetRawConstantValue` - its declaring type has no `TypeInitializer`, so there is no `.cctor` to trigger A static member is skipped when its declaring type has a `TypeInitializer`. It can be emitted either from an explicit `static TypeName()` constructor or from static field/property initializers such as `public static string Field = "value"` or `public static string Property { get; } = "value"`. The guard intentionally does not special-case `beforefieldinit`. `beforefieldinit` changes when the runtime is allowed to run the type initializer, but it does not give us a public, non-triggering way to know whether the initializer has already run. Because a reflective static read can still be the operation that causes customer code to execute, any member on a type with `TypeInitializer != null` is treated as unsafe unless it is a literal constant. ## Test coverage - `DebuggerSnapshotCreatorTests|DebuggerExpressionLanguageTests|DebuggerintegrationTests`Configuration menu - View commit details
-
Copy full SHA for 04f43ce - Browse repository at this point
Copy the full SHA 04f43ceView commit details -
[CI Visibility] Avoid oversized coverage IPC messages (#8832)
## Summary of changes - Send CI coverage IPC notifications as small persisted-result references instead of inline coverage payloads when persistence succeeds. - Add `SessionCodeCoverageReferenceMessage` and a single-result lookup path in `CoverageBackfillDataStore`. - Resolve referenced coverage results in the parent `TestSession`, preserving fail-closed behavior only while referenced tool coverage remains unresolved. - Update Coverlet, Coverlet XML fallback, and Microsoft CodeCoverage producers to use reference messages, with slim inline fallback only when metadata-heavy fields are not required. - Update unit and integration tests to cover reference IPC round trips, oversized persisted metadata, missing references, close-time fallback recovery, slim inline fallback, producer/session behavior, and XUnit EVP reference resolution. ## Reason for change `SessionCodeCoverageMessage` can include backfill validation dictionaries and superseded result ids. On large codebases, the serialized payload can exceed the `CircularChannel` body limit and trigger `CircularChannel.Writer: Message size exceeds maximum allowed size.` ([Example](https://app.datadoghq.com/error-tracking/issue/90a7630c-6fff-11f1-8f09-da7ad0900002), [Case](https://app.datadoghq.com/cases/DOTNET-27)) The full coverage payload is already persisted for the parent session fallback path, so the IPC channel only needs to notify the parent session which persisted result to load. ## Implementation details - `CoverageBackfillDataStore.TryReadCoverageIpcResult(...)` reads one persisted result by session id, source, and result id, and rejects mismatched or invalid payloads. - `TestSession` handles `SessionCodeCoverageReferenceMessage`, records the resolved result through the existing arbitration path, and records an IPC failure marker if the reference cannot be resolved. - `TestSession` tracks unresolved coverage references by source and result id, so close-time persisted fallback recovery can clear a previously failed immediate reference read before publishing coverage. - `DotnetCommon.CreateSessionCodeCoverageIpcMessage(...)` centralizes producer behavior: - persisted result available: send a reference message; - persistence failed and the result has no heavy metadata: send a slim inline message; - persistence failed and the result depends on backfill validation or superseded ids: fail closed and record IPC failure. - Integration tests that previously treated only `SessionCodeCoverageMessage` as coverage IPC now also accept reference messages and resolve persisted results before asserting coverage values. - XUnit EVP integration tests resolve reference messages with the injected sample run id and workspace, so the IPC callback reads the same persisted Coverlet result that production `TestSession` would load instead of using the integration-test process run context. ## Test coverage - `git diff --check` - `dotnet test tracer/test/Datadog.Trace.Tests/Datadog.Trace.Tests.csproj --configuration Release --framework net8.0 --filter "FullyQualifiedName~TestSessionCoverageTests.IpcCoverageReference"` - Passed: 5/5 - `dotnet test tracer/test/Datadog.Trace.Tests/Datadog.Trace.Tests.csproj --configuration Release --framework net8.0 --filter "FullyQualifiedName~CoverageBackfillDataStoreTests.TryReadCoverageIpcResult|FullyQualifiedName~IpcTests.IpcClientCanSendCoverageResultReference|FullyQualifiedName~TestSessionCoverageTests.IpcCoverageReference|FullyQualifiedName~TestSessionCoverageTests.CloseProcessesCoverageReferenceDeliveredThroughRealIpc|FullyQualifiedName~TestSessionCoverageTests.CreateSessionCodeCoverageIpcMessage|FullyQualifiedName~TestSessionCoverageTests.TrySendSessionCodeCoverageIpcMessageRecordsFailureWhenMessageFactoryFailsClosed|FullyQualifiedName~ManagedVanguardStopIntegrationTests.SendsReferenceCoverageIpcMessageAndSessionPublishesPersistedMicrosoftCoverage"` - Passed: 36/36 - `dotnet build tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Datadog.Trace.ClrProfiler.IntegrationTests.csproj --configuration Release --framework net8.0` - Passed: 0 warnings, 0 errors - Azure consolidated pipeline build 204276: - `integration_tests_linux`: passed - `integration_tests_arm64`: passed ## Other details I also attempted `dotnet test tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/Datadog.Trace.ClrProfiler.IntegrationTests.csproj --configuration Release --framework net8.0 --no-build --filter "FullyQualifiedName~Datadog.Trace.ClrProfiler.IntegrationTests.CI.TcpXUnitEvpTests.ItrCoverageBackfillSkippableDecisionMatrixMatchesJavaBehavior"` locally. On macOS arm64 it failed before reaching the coverage-reference assertions because the sample produced no EVP requests, so the Linux CI matrix is the representative validation for this path. <!-- Fixes #{issue} -->
Configuration menu - View commit details
-
Copy full SHA for 955a7f0 - Browse repository at this point
Copy the full SHA 955a7f0View commit details -
Update to use dd-sts instead of long-lived credentials (#8809)
## Summary of changes Updates the "publish debug symbols" steps to use dd-sts instead of API keys ## Reason for change Short-lived tokens are good ## Implementation details Followed the guide [here](https://datadoghq.atlassian.net/wiki/spaces/SECENG/pages/5769659435/User+guide+dd-sts) and followed the 🤖 guidance ## Test coverage This is the kicker... testing this won't be easy. We _should_ be able to test using the standalone `publish-debug-symbols`, at least to see if we get auth issues, but we won't know for sure if this will break the release. On the plus side, this is not time critical for the release - if there's a problem, and it's broken, we can fix it post-hoc ## Other details _Currently_ we're using an environment for this, because that was required to create the long-lived creds. As we don't have those anymore, we can remove the environment, but note that this _may_ break any policies that were relying on it. The policies in dd-source work with both scenarios, but we must also update `.github/chainguard/self.github.create-draft-release.sts.yaml`, which is pinned to the `environment: subject` form, or else the `Get GitHub Token via dd-octo-sts` step will fail. We need to change its subject: to the ref form, i.e. ``` subject: repo:DataDog/dd-trace-dotnet:ref:refs/heads/(master|hotfix/.+) ``` Before merging this, make sure DataDog/dd-source#474189 is merged and deployed
Configuration menu - View commit details
-
Copy full SHA for 3349535 - Browse repository at this point
Copy the full SHA 3349535View commit details -
Add support for IBM MQ 10.x.x (#8835)
## Summary of changes Bumps the instrumented version of IBM MQ to support 10.x.x ## Reason for change There's a [new major version of IBMMQDotnetClient](https://www.nuget.org/packages/IBMMQDotnetClient). ## Implementation details The new package version primarily adds support for .NET 10, though it does make breaking changes to two types: FUNCID and MQC. However, none of the types we instrument (`MQDestination`, `MQMessage`, `MQManagedObject`, `MQGetMessageOptions`, `MQPutMessageOptions`) appear in either breaking or additive changes, and the assembly name is unchanged. ## Test coverage Unfortunately, no. tl;dr; we can't test this in CI for licensing reasons, and given the lack of any concerning changes I decided it wasn't worth the hassle to try to get it set up locally 😬
Configuration menu - View commit details
-
Copy full SHA for 54622c3 - Browse repository at this point
Copy the full SHA 54622c3View commit details -
[CI] Add net10.0 to AWS Lambda test runtimes (#8819)
## Summary of changes Add `net10.0` to the .NET TFMs used in AWS Lambda tests. ## Reason for change We support .NET 10, so the AWS Lambda tests should run against it. ## Implementation details - add a `net10` matrix entry (`net10.0` TFM, `public.ecr.aws/lambda/dotnet:10` base image) to the AWS Lambda test stage in `ultimate-pipeline.yml` - existing `net6`/`net7`/`net8`/`net9` entries are unchanged ## Test coverage This PR adds a runtime version that the existing AWS Lambda tests run on. ## Other details <!-- Fixes #{issue} --> n/a > *"net6 and net7 walked back in like they forgot their keys. We let them stay and gave net10 the spare bedroom."* — Claude 🤖 <!--⚠️ Note: Where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. MergeQueue is NOT enabled in this repository. If you have write access to the repo, the PR has 1-2 approvals (see above), and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #apm-dotnet channel in Slack. -->Configuration menu - View commit details
-
Copy full SHA for 4ab6729 - Browse repository at this point
Copy the full SHA 4ab6729View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v3.47.0...v3.48.0