Skip to content

Commit

Permalink
[Crashtracking] Disable crashtracking on Windows by default (#6152)
Browse files Browse the repository at this point in the history
## Summary of changes

Disable crashtracking on Windows by default.

## Reason for change

The next version of the tracer will be released before we implement
proper support for the PDBs in crashtracking, so change it to opt-in for
now (effectively disabling it since nobody is going to manually enable
it).

## Implementation details

Changed the default value of `DD_CRASHTRACKING_ENABLED`.

## Test coverage

Had to update the tests to account for the new default value on Windows.
  • Loading branch information
kevingosse authored Oct 14, 2024
1 parent 34444ea commit e94a4c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion shared/src/Datadog.Trace.ClrProfiler.Native/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ EXTERN_C BOOL STDMETHODCALLTYPE DllMain(HMODULE hModule, DWORD ul_reason_for_cal
bool telemetry_enabled = true;
shared::TryParseBooleanEnvironmentValue(shared::GetEnvironmentValue(L"DD_INSTRUMENTATION_TELEMETRY_ENABLED"), telemetry_enabled);

bool crashtracking_enabled = true;
bool crashtracking_enabled = false;
shared::TryParseBooleanEnvironmentValue(shared::GetEnvironmentValue(L"DD_CRASHTRACKING_ENABLED"), crashtracking_enabled);

if (telemetry_enabled && crashtracking_enabled)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public CreatedumpTests(ITestOutputHelper output)
SetEnvironmentVariable("COMPlus_DbgMiniDumpType", string.Empty);
SetEnvironmentVariable("COMPlus_DbgEnableMiniDump", string.Empty);
SetEnvironmentVariable("DD_INSTRUMENTATION_TELEMETRY_ENABLED", string.Empty);

if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
SetEnvironmentVariable("DD_CRASHTRACKING_ENABLED", "1");
}
}

private static (string Key, string Value) LdPreloadConfig
Expand Down

0 comments on commit e94a4c3

Please sign in to comment.