Skip to main content
net9.0net8.0net7.0net6.0net5.0.NETCoreApp3.1

This package is required to enable Datadog automatic instrumentation on a trimmed app.

Published
Mar 23, 2026
6mo ago
Total Downloads
71.8K
71,845

Install

dotnet add package Datadog.Trace.Trimming --version 3.40.0-prerelease
ProductVersions
.NET
net5.0net6.0net7.0net8.0net9.0
Other
.NETCoreApp3.1

README

Datadog.Trace.Trimming NuGet package

This package allows users to use Datadog libraries when using trimmed apps. The only requirement is to reference this package into your project.

Note: if you don't use automatic instrumentation this package isn't required. Note: Supports .NET 6+ apps only

How does it work

Datadog.Trace.Trimming package guides the linker with the types used by Datatadog assemblies. It relies on descriptors that are used to direct the trimmer to always keep some items in the assembly, regardless of if the trimmer can find any references to them.

Changes from Previous Version

No structural changes between v3.39.0-prerelease and v3.40.0-prerelease.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 6 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.