Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[.NET Profiler] Setup env var(s) for profiler #212

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gleocadie
Copy link
Contributor

To enable the profiler, we need to set the LD_PRELOAD env var. We will set the env var for the customers to avoid painful configuration on their end.
Create log folders so we can retrieve them in case of customer case

@gleocadie gleocadie requested review from a team as code owners September 26, 2023 08:11
export LD_PRELOAD="${DD_DIR}/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so"
fi
echo "Creating log folder for .NET APM"
${DD_DIR}/createLogPath.sh
Copy link
Member

Choose a reason for hiding this comment

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

I'm kind of surprised we weren't doing this already 😅 we may need to make this executable first?

Alternatively, I think you can run it as (but don't quote me):

Suggested change
${DD_DIR}/createLogPath.sh
sh ${DD_DIR}/createLogPath.sh


if [[ "${DD_PROFILING_ENABLED:-,,}" == "1" ]]; then
echo "Profiler is enabled."
export LD_PRELOAD="${DD_DIR}/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so"
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if we definitely want to overwrite LD_PRELOAD or "append" to it? (I don't know if that's a thing for LD_PRELOAD)

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.

2 participants