Skip to content

don't delete the native loader library#17

Merged
lucaspimentel merged 6 commits into
mainfrom
lpimentel/restore-native-loader
Sep 10, 2025
Merged

don't delete the native loader library#17
lucaspimentel merged 6 commits into
mainfrom
lpimentel/restore-native-loader

Conversation

@lucaspimentel

@lucaspimentel lucaspimentel commented Sep 8, 2025

Copy link
Copy Markdown
Member

What does this PR do?

Keep (don't delete) the native loader library Datadog.Trace.ClrProfiler.Native.so (1.5 MB) and it's loader.conf file.

Motivation

Using the tracer without the native loader was never officially supported, and now it's required since dd-trace-dotnet v3.26.0 (see DataDog/dd-trace-dotnet#7462).

Testing Guidelines

Tracer should load and instrument as normal. Without these changes, it should fail to load.

Additional Notes

New layout, where linux-<arch> is either linux-x64 or linux-arm64:

 └── datadog
     ├── linux-<arch>
+    │   ├── Datadog.Trace.ClrProfiler.Native.so
     │   ├── Datadog.Tracer.Native.so
+    │   └── loader.conf
     ├── net6.0
     │   └── Datadog.Trace.dll
     └── tracer_version.txt

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

@lucaspimentel
lucaspimentel requested a review from a team as a code owner September 8, 2025 21:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Dockerfile.r2r script to preserve essential native libraries required for the Datadog tracer to function properly. The change ensures compatibility with dd-trace-dotnet v3.26.0 and later versions, which require the native loader library.

  • Removes deletion of all .so files to preserve the native loader library
  • Keeps Datadog.Linux.ApiWrapper.x64.so due to uncertainty about its necessity

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread scripts/Dockerfile.r2r Outdated
Comment thread scripts/Dockerfile.r2r

# remove files not used in AWS Lambda to keep the layer as small as possible
RUN \
# Profiling and Crash Tracking

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice comments, tysm

@lucaspimentel
lucaspimentel merged commit bf66f26 into main Sep 10, 2025
6 checks passed
@lucaspimentel
lucaspimentel deleted the lpimentel/restore-native-loader branch September 10, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants