Skip to content

[dotnet] don't override env vars if set by user#623

Merged
lucaspimentel merged 4 commits intomainfrom
lpimentel/dont-override-user-env-vars
Mar 26, 2025
Merged

[dotnet] don't override env vars if set by user#623
lucaspimentel merged 4 commits intomainfrom
lpimentel/dont-override-user-env-vars

Conversation

@lucaspimentel
Copy link
Copy Markdown
Member

@lucaspimentel lucaspimentel commented Mar 26, 2025

Change the way we set .NET environment variables in datadog_wrapper, so we only set them if they are not already set. This prevents the script from overriding env vars set by the user.

For example, setting CORECLR_ENABLE_PROFILING=0 does not disable the tracer, because datadog_wrapper then sets CORECLR_ENABLE_PROFILING=1. See DataDog/dd-trace-dotnet-aws-lambda-layer#14.

@lucaspimentel lucaspimentel requested review from a team March 26, 2025 20:34
@lucaspimentel lucaspimentel requested a review from a team as a code owner March 26, 2025 20:34
Copy link
Copy Markdown

@hghotra hghotra left a comment

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

@joeyzhao2018 joeyzhao2018 left a comment

Choose a reason for hiding this comment

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

:shipit:

@lucaspimentel lucaspimentel merged commit 54f3755 into main Mar 26, 2025
45 checks passed
@lucaspimentel lucaspimentel deleted the lpimentel/dont-override-user-env-vars branch March 26, 2025 23:10
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.

4 participants