Skip to content

Commit ab175a0

Browse files
committed
fix di tests
1 parent 173abb3 commit ab175a0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

tracer/src/Datadog.Trace/ClrProfiler/Instrumentation.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,16 @@ private static void InitializeDebugger(TracerSettings tracerSettings)
448448
var manager = DebuggerManager.Instance;
449449
if (manager.DebuggerSettings.IsDebuggerProductsDisabled && manager.ExceptionReplaySettings.IsExceptionReplayDisabled)
450450
{
451-
Log.Information("Debugger products are explicitly disabled via environment variables.");
451+
Log.Debug("Debugger products are explicitly disabled via environment variables.");
452452
}
453453
else
454454
{
455+
if (!manager.DebuggerSettings.DynamicInstrumentationEnabled)
456+
{
457+
// we need this line for tests
458+
Log.Information("Dynamic Instrumentation is disabled. To enable it, please set DD_DYNAMIC_INSTRUMENTATION_ENABLED environment variable to 'true'.");
459+
}
460+
455461
DebuggerManager.Instance.UpdateConfiguration(tracerSettings)
456462
.ContinueWith(t => Log.Error(t?.Exception, "Error initializing debugger"), TaskContinuationOptions.OnlyOnFaulted);
457463
}

tracer/src/Datadog.Trace/Debugger/DebuggerManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,6 @@ void DisableDynamicInstrumentation()
466466
}
467467
else
468468
{
469-
// we need this log for tests
470469
Log.Debug("Dynamic Instrumentation is disabled. To enable it, please set {DynamicInstrumentationEnabled} environment variable to 'true'.", ConfigurationKeys.Debugger.DynamicInstrumentationEnabled);
471470
}
472471
}

0 commit comments

Comments
 (0)