Skip to content

Commit 03a1971

Browse files
committed
Fixup PR tests
1 parent e994266 commit 03a1971

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Microsoft.Diagnostics.Monitoring.StartupHook/DiagnosticsBootstrapper.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ public DiagnosticsBootstrapper()
2424
{
2525
_exceptionProcessor = new(ToolIdentifiers.IsEnvVarEnabled(InProcessFeaturesIdentifiers.EnvironmentVariables.Exceptions.IncludeMonitorExceptions));
2626

27-
if (ToolIdentifiers.IsEnvVarEnabled(InProcessFeaturesIdentifiers.EnvironmentVariables.Exceptions.CollectOnStartup))
27+
// If collectOnStart is not set, assume the default value (true).
28+
string? collectOnStart = Environment.GetEnvironmentVariable(InProcessFeaturesIdentifiers.EnvironmentVariables.Exceptions.CollectOnStartup);
29+
if (collectOnStart == null || ToolIdentifiers.IsEnvVarValueEnabled(collectOnStart))
2830
{
2931
_exceptionProcessor.Start();
3032
}

0 commit comments

Comments
 (0)