dd-trace-dotnet icon indicating copy to clipboard operation
dd-trace-dotnet copied to clipboard

[FEATURE]: Respect runtime option during publish

Open tungi52 opened this issue 7 months ago • 2 comments

Framework or Library Name

.net8

Library Type

No response

Library Version(s)

3.9.1

Describe the feature you'd like

We use Datadog.Trace.Bundle NuGet package for manual instrumentation because as it stated in the documentation we are in the situation that accessing and updating images add extra complexity and keeping versions in sync is chore.

However using the Bundle package almost double our entire image size: using an ASP.NET Core Alpine image which is less 200 MB (let's say it's 200 with our application and with some additional packages) will be extended with addional 170 MB Datadog binaries. And in production only a few of them are required - the ones under the linux-musl-x64 and net6.0 folders (in our case).

Is it possible or even planned to respect the --runtime property during pusblish and only copy relevant files to the output? Thanks!

Is your feature request related to a problem?

No response

Describe alternatives you've considered

No response

Additional context

No response

tungi52 avatar May 22 '25 08:05 tungi52

Is it possible or even planned to respect the --runtime property during pusblish and only copy relevant files to the output?

Thanks for raising this! The short answer is yes, we're currently looking into exactly this 🙂 We don't have an eta, but @lucaspimentel has an outline of a solution, we just need to evaluate this further and make it more robust before shipping it.

andrewlock avatar May 22 '25 12:05 andrewlock

Here's a draft PR: https://github.com/DataDog/dd-trace-dotnet/pull/6923

lucaspimentel avatar May 22 '25 14:05 lucaspimentel