-
Notifications
You must be signed in to change notification settings - Fork 150
Update language used in native log messages #7467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,7 @@ namespace datadog::shared::nativeloader | |
| { \ | ||
| std::ostringstream hexValue; \ | ||
| hexValue << std::hex << hr; \ | ||
| Log::Warn("CorProfiler::", STR(EXPR), ": [Tracer] Error in ", STR(EXPR), " call: ", hexValue.str()); \ | ||
| Log::Warn("CorProfiler::", STR(EXPR), ": [Instrumentation] Error in ", STR(EXPR), " call: ", hexValue.str()); \ | ||
| gHR = hr; \ | ||
| } \ | ||
| } \ | ||
|
|
@@ -130,7 +130,7 @@ namespace datadog::shared::nativeloader | |
| // process's name is on the list | ||
| if (!include_process_names.empty() && !Contains(include_process_names, process_name)) | ||
| { | ||
| Log::Info("CorProfiler::Initialize ClrProfiler disabled: ", process_name, " not found in ", | ||
| Log::Info("CorProfiler::Initialize Datadog SDK disabled: ", process_name, " not found in ", | ||
| EnvironmentVariables::IncludeProcessNames, "."); | ||
| return CORPROF_E_PROFILER_CANCEL_ACTIVATION; | ||
| } | ||
|
|
@@ -142,7 +142,7 @@ namespace datadog::shared::nativeloader | |
| const auto& exclude_process_names = GetEnvironmentValues(EnvironmentVariables::ExcludeProcessNames); | ||
| if (!exclude_process_names.empty() && Contains(exclude_process_names, process_name)) | ||
| { | ||
| Log::Info("CorProfiler::Initialize ClrProfiler disabled: ", process_name, " found in ", | ||
| Log::Info("CorProfiler::Initialize Datadog SDK disabled: ", process_name, " found in ", | ||
| EnvironmentVariables::ExcludeProcessNames, "."); | ||
| return CORPROF_E_PROFILER_CANCEL_ACTIVATION; | ||
| } | ||
|
|
@@ -151,7 +151,7 @@ namespace datadog::shared::nativeloader | |
| { | ||
| if (process_name == exclude_assembly) | ||
| { | ||
| Log::Info("CorProfiler::Initialize ClrProfiler disabled: ", process_name," found in default exclude list"); | ||
| Log::Info("CorProfiler::Initialize Datadog SDK disabled: ", process_name," found in default exclude list"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unrelated, but why are they called There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A totally reasonable question 😅 As far as I can tell, it all traces back years ago and was essentially copy pasta. Going to do a bit more cleanup separately There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did a PR to fix that (and other minor annoyances) here: #7475 |
||
| return CORPROF_E_PROFILER_CANCEL_ACTIVATION; | ||
| } | ||
| } | ||
|
|
@@ -224,7 +224,7 @@ namespace datadog::shared::nativeloader | |
|
|
||
| if (is_ignored_command) | ||
| { | ||
| Log::Info("The Tracer Profiler has been disabled because the process is 'dotnet' " | ||
| Log::Info("Instrumentation has been disabled because the process name is 'dotnet' " | ||
| "but an unsupported command was detected"); | ||
| return CORPROF_E_PROFILER_CANCEL_ACTIVATION; | ||
| } | ||
|
|
@@ -240,8 +240,8 @@ namespace datadog::shared::nativeloader | |
| process_command_line.find(WStr("datacollector")) == WSTRING::npos && | ||
| process_command_line.find(WStr("vstest.console.dll")) == WSTRING::npos) | ||
| { | ||
| Log::Info("The Tracer Profiler has been disabled because the process is running in CI Visibility " | ||
| "mode, the name is 'dotnet' but the commandline doesn't contain 'testhost' or 'datacollector' or 'vstest.console.dll' or 'exec'"); | ||
| Log::Info("Instrumentation disabled because the process is running in CI Visibility " | ||
| "mode and its name is 'dotnet', but the command line doesn't contain 'testhost', 'datacollector', 'vstest.console.dll', or 'exec'"); | ||
| return CORPROF_E_PROFILER_CANCEL_ACTIVATION; | ||
| } | ||
| } | ||
|
|
@@ -261,7 +261,7 @@ namespace datadog::shared::nativeloader | |
| if (app_pool_id_value.size() > 1 && app_pool_id_value.at(0) == '~') | ||
| { | ||
| Log::Info( | ||
| "DATADOG TRACER DIAGNOSTICS - ClrProfiler disabled: ", EnvironmentVariables::AzureAppServicesAppPoolId, " ", | ||
| "DATADOG TRACER DIAGNOSTICS - Datadog SDK disabled: ", EnvironmentVariables::AzureAppServicesAppPoolId, " ", | ||
| app_pool_id_value, " is an Azure App Services infrastructure process."); | ||
| return CORPROF_E_PROFILER_CANCEL_ACTIVATION; | ||
| } | ||
|
|
@@ -271,7 +271,7 @@ namespace datadog::shared::nativeloader | |
|
|
||
| if (cli_telemetry_profile_value == WStr("AzureKudu")) | ||
| { | ||
| Log::Info("DATADOG TRACER DIAGNOSTICS - ClrProfiler disabled: ", app_pool_id_value, | ||
| Log::Info("DATADOG TRACER DIAGNOSTICS - Datadog SDK disabled: ", app_pool_id_value, | ||
| " is Kudu, an Azure App Services reserved process."); | ||
| return CORPROF_E_PROFILER_CANCEL_ACTIVATION; | ||
| } | ||
|
|
@@ -288,7 +288,7 @@ namespace datadog::shared::nativeloader | |
| EnvironmentVariables::AzureFunctionsInstrumentationEnabled), | ||
| azure_functions_enabled) && !azure_functions_enabled) | ||
| { | ||
| Log::Info("DATADOG TRACER DIAGNOSTICS - ClrProfiler explicitly disabled for Azure Functions."); | ||
| Log::Info("DATADOG TRACER DIAGNOSTICS - Datadog SDK explicitly disabled for Azure Functions."); | ||
| return CORPROF_E_PROFILER_CANCEL_ACTIVATION; | ||
| } | ||
| } | ||
|
|
@@ -303,7 +303,7 @@ namespace datadog::shared::nativeloader | |
| HRESULT hr = pICorProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo4), (void**) &info4); | ||
| if (FAILED(hr)) | ||
| { | ||
| Log::Warn("CorProfiler::Initialize: Failed to attach profiler, interface ICorProfilerInfo4 not found."); | ||
| Log::Warn("CorProfiler::Initialize: Failed to attach Datadog SDK, interface ICorProfilerInfo4 not found."); | ||
| // we're not recording the exact version here, we just know that at this point it's not enough | ||
| single_step_guard_rails.RecordBootstrapError(SingleStepGuardRails::NetFrameworkRuntime, inferredVersion, "incompatible_runtime"); | ||
| return E_FAIL; | ||
|
|
@@ -488,7 +488,7 @@ namespace datadog::shared::nativeloader | |
|
|
||
| Log::Debug("CorProfiler::Initialize: *LocalMaskLow: ", local_mask_low); | ||
| Log::Debug("CorProfiler::Initialize: *LocalMaskHi : ", local_mask_hi); | ||
| Log::Info("CorProfiler::Initialize: Tracer Profiler initialized successfully."); | ||
| Log::Info("CorProfiler::Initialize: Instrumentation initialized successfully."); | ||
| } | ||
| else | ||
| { | ||
|
|
@@ -497,7 +497,7 @@ namespace datadog::shared::nativeloader | |
| } | ||
| else | ||
| { | ||
| Log::Warn("CorProfiler::Initialize: Error Initializing the Tracer Profiler, unloading the dynamic library."); | ||
| Log::Warn("CorProfiler::Initialize: Error Initializing the Instrumentation component, unloading the dynamic library."); | ||
| m_tracerProfiler = nullptr; | ||
| } | ||
| } | ||
|
|
@@ -1163,80 +1163,80 @@ namespace datadog::shared::nativeloader | |
| { | ||
| Log::Info( | ||
| "No ICorProfilerInfoXxx available. Null pointer was passed to CorProfilerCallback for initialization." | ||
| " No compatible Profiling API is available."); | ||
| " No compatible ICorProfiler API is available."); | ||
| return ""; | ||
| } | ||
|
|
||
| IUnknown* tstVerProfilerInfo; | ||
| if (S_OK == corProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo12), (void**) &tstVerProfilerInfo)) | ||
| { | ||
| Log::Info("ICorProfilerInfo12 available. Profiling API compatibility: .NET Core 5.0 or later."); | ||
| Log::Info("ICorProfilerInfo12 available. ICorProfiler API compatibility: .NET Core 5.0 or later."); | ||
| tstVerProfilerInfo->Release(); | ||
| return "5.0.0"; | ||
| } | ||
| else if (S_OK == corProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo11), (void**) &tstVerProfilerInfo)) | ||
| { | ||
| Log::Info("ICorProfilerInfo11 available. Profiling API compatibility: .NET Core 3.1 or later."); | ||
| Log::Info("ICorProfilerInfo11 available. ICorProfiler API compatibility: .NET Core 3.1 or later."); | ||
| tstVerProfilerInfo->Release(); | ||
| return "3.1.0"; | ||
| } | ||
| else if (S_OK == corProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo10), (void**) &tstVerProfilerInfo)) | ||
| { | ||
| Log::Info("ICorProfilerInfo10 available. Profiling API compatibility: .NET Core 3.0 or later."); | ||
| Log::Info("ICorProfilerInfo10 available. ICorProfiler API compatibility: .NET Core 3.0 or later."); | ||
| tstVerProfilerInfo->Release(); | ||
| return "3.0.0"; | ||
| } | ||
| else if (S_OK == corProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo9), (void**) &tstVerProfilerInfo)) | ||
| { | ||
| Log::Info("ICorProfilerInfo9 available. Profiling API compatibility: .NET Core 2.2 or later."); | ||
| Log::Info("ICorProfilerInfo9 available. ICorProfiler API compatibility: .NET Core 2.2 or later."); | ||
| tstVerProfilerInfo->Release(); | ||
| return "2.1.0"; | ||
| } | ||
| else if (S_OK == corProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo8), (void**) &tstVerProfilerInfo)) | ||
| { | ||
| Log::Info("ICorProfilerInfo8 available. Profiling API compatibility: .NET Fx 4.7.2 or later."); | ||
| Log::Info("ICorProfilerInfo8 available. ICorProfiler API compatibility: .NET Fx 4.7.2 or later."); | ||
| tstVerProfilerInfo->Release(); | ||
| return "4.7.2"; | ||
| } | ||
| else if (S_OK == corProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo7), (void**) &tstVerProfilerInfo)) | ||
| { | ||
| Log::Info("ICorProfilerInfo7 available. Profiling API compatibility: .NET Fx 4.6.1 or later."); | ||
| Log::Info("ICorProfilerInfo7 available. ICorProfiler API compatibility: .NET Fx 4.6.1 or later."); | ||
| tstVerProfilerInfo->Release(); | ||
| return "4.6.1"; | ||
| } | ||
| else if (S_OK == corProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo6), (void**) &tstVerProfilerInfo)) | ||
| { | ||
| Log::Info("ICorProfilerInfo6 available. Profiling API compatibility: .NET Fx 4.6 or later."); | ||
| Log::Info("ICorProfilerInfo6 available. ICorProfiler API compatibility: .NET Fx 4.6 or later."); | ||
| tstVerProfilerInfo->Release(); | ||
| return "4.6.0"; | ||
| } | ||
| else if (S_OK == corProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo5), (void**) &tstVerProfilerInfo)) | ||
| { | ||
| Log::Info("ICorProfilerInfo5 available. Profiling API compatibility: .NET Fx 4.5.2 or later."); | ||
| Log::Info("ICorProfilerInfo5 available. ICorProfiler API compatibility: .NET Fx 4.5.2 or later."); | ||
| tstVerProfilerInfo->Release(); | ||
| return "4.5.2"; | ||
| } | ||
| else if (S_OK == corProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo4), (void**) &tstVerProfilerInfo)) | ||
| { | ||
| Log::Info("ICorProfilerInfo4 available. Profiling API compatibility: .NET Fx 4.5 or later."); | ||
| Log::Info("ICorProfilerInfo4 available. ICorProfiler API compatibility: .NET Fx 4.5 or later."); | ||
| tstVerProfilerInfo->Release(); | ||
| return "4.5.0"; | ||
| } | ||
| else if (S_OK == corProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo3), (void**) &tstVerProfilerInfo)) | ||
| { | ||
| Log::Info("ICorProfilerInfo3 available. Profiling API compatibility: .NET Fx 4.0 or later."); | ||
| Log::Info("ICorProfilerInfo3 available. ICorProfiler API compatibility: .NET Fx 4.0 or later."); | ||
| tstVerProfilerInfo->Release(); | ||
| return "4.0.0"; | ||
| } | ||
| else if (S_OK == corProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo2), (void**) &tstVerProfilerInfo)) | ||
| { | ||
| Log::Info("ICorProfilerInfo2 available. Profiling API compatibility: .NET Fx 2.0 or later."); | ||
| Log::Info("ICorProfilerInfo2 available. ICorProfiler API compatibility: .NET Fx 2.0 or later."); | ||
| tstVerProfilerInfo->Release(); | ||
| return "2.0.0"; | ||
| } | ||
| else if (S_OK == corProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo), (void**) &tstVerProfilerInfo)) | ||
| { | ||
| Log::Info("ICorProfilerInfo available. Profiling API compatibility: .NET Fx 2 or later."); | ||
| Log::Info("ICorProfilerInfo available. ICorProfiler API compatibility: .NET Fx 2 or later."); | ||
| tstVerProfilerInfo->Release(); | ||
| return "2.0.0"; | ||
| } | ||
|
|
@@ -1245,7 +1245,7 @@ namespace datadog::shared::nativeloader | |
| Log::Info("No ICorProfilerInfoXxx available. A valid IUnknown pointer was passed to CorProfilerCallback" | ||
| " for initialization, but QueryInterface(..) did not succeed for any of the known " | ||
| "ICorProfilerInfoXxx ifaces." | ||
| " No compatible Profiling API is available."); | ||
| " No compatible ICorProfiler API is available."); | ||
| return ""; | ||
| } | ||
| } | ||
|
|
@@ -1266,12 +1266,12 @@ namespace datadog::shared::nativeloader | |
| { | ||
| std::ostringstream hex; | ||
| hex << std::hex << hrGRI; | ||
| Log::Info("Initializing the Profiler: Exact runtime version could not be obtained (0x", hex.str(), ")"); | ||
| Log::Info("Initializing the Datadog SDK: Exact runtime version could not be obtained (0x", hex.str(), ")"); | ||
| return {}; | ||
| } | ||
| else | ||
| { | ||
| Log::Info("Initializing the Profiler: Reported runtime version : { clrInstanceId: ", clrInstanceId, | ||
| Log::Info("Initializing the Datadog SDK: Reported runtime version : { clrInstanceId: ", clrInstanceId, | ||
| ", runtimeType:", | ||
| ((runtimeType == COR_PRF_DESKTOP_CLR) ? "DESKTOP_CLR" | ||
| : (runtimeType == COR_PRF_CORE_CLR) | ||
|
|
@@ -1287,7 +1287,7 @@ namespace datadog::shared::nativeloader | |
| { | ||
| if (m_this == nullptr) | ||
| { | ||
| Log::Warn("The native loader library is not properly initialized. We cannot get the current AppDomain Id."); | ||
| Log::Warn("The Datadog SDK is not properly initialized. We cannot get the current AppDomain Id."); | ||
| return (AppDomainID)0; | ||
| } | ||
|
|
||
|
|
@@ -1318,7 +1318,7 @@ namespace datadog::shared::nativeloader | |
| { | ||
| if (m_this == nullptr) | ||
| { | ||
| Log::Warn("The native loader library is not properly initialized. We cannot get the runtime id for the AppDomain ID #", appDomain); | ||
| Log::Warn("The Datadog SDK is not properly initialized. We cannot get the runtime id for the AppDomain ID #", appDomain); | ||
| return nullptr; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"but the auto-instrumentation library is not an SDK!!"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're preaching to the choir man, just give me an alternative suggestion 😂 Datadog Library? Or we can just drop SDK entirely - 'Datadog disabled" works too 🤷♂️