Skip to content

Commit 491c1cf

Browse files
committed
log the environment variables for troubleshooting
1 parent dcbb463 commit 491c1cf

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

scripts/datadog_wrapper

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ if [[ "$AWS_EXECUTION_ENV" == *"dotnet"* ]]
4949
then
5050
debug_log "Configuring for the .NET runtime!"
5151

52-
if [ -n "$CORECLR_PROFILER_PATH" ]; then
53-
debug_log "CORECLR_PROFILER_PATH is already set to $CORECLR_PROFILER_PATH"
54-
else
55-
# Handle CORECLR_PROFILER_PATH: try to load the library from these paths, in order:
52+
if [ -z "$CORECLR_PROFILER_PATH" ]; then
53+
# CORECLR_PROFILER_PATH is not set, try to find the library in these paths, in order:
5654
PROFILER_PATHS=(
5755
# use the shared loader if it's present
5856
"/opt/datadog/linux-x64/Datadog.Trace.ClrProfiler.Native.so"
@@ -87,6 +85,12 @@ then
8785
export CORECLR_ENABLE_PROFILING="${CORECLR_ENABLE_PROFILING:-"1"}"
8886
export CORECLR_PROFILER="${CORECLR_PROFILER:-"{846F5F1C-F9AE-4B07-969E-05C26BC060D8}"}"
8987
export DD_DOTNET_TRACER_HOME="${DD_DOTNET_TRACER_HOME:-"/opt/datadog"}"
88+
89+
# log the environment variables for troubleshooting
90+
debug_log "CORECLR_PROFILER_PATH: $CORECLR_PROFILER_PATH"
91+
debug_log "CORECLR_ENABLE_PROFILING: $CORECLR_ENABLE_PROFILING"
92+
debug_log "CORECLR_PROFILER: $CORECLR_PROFILER"
93+
debug_log "DD_DOTNET_TRACER_HOME: $DD_DOTNET_TRACER_HOME"
9094
fi # .NET
9195

9296
# if it is java

0 commit comments

Comments
 (0)