Fix inbox telemetry (#5265)

* ifdef to check if redist or not

* Fix redist telemetry

Co-authored-by: Ryan Lai <ryalai96@gamil.com>
This commit is contained in:
Ryan Lai 2020-09-24 14:58:07 -07:00 committed by GitHub
parent b49ff6151e
commit 71b52ad5de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View file

@ -135,3 +135,7 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
target_link_libraries(onnxruntime_common rt)
endif()
endif()
if (onnxruntime_WINML_NAMESPACE_OVERRIDE STREQUAL "Windows")
target_compile_definitions(onnxruntime_common PRIVATE "BUILD_INBOX=1")
endif()

View file

@ -102,7 +102,10 @@ void WindowsTelemetry::LogProcessInfo() const {
// did we already log the process info? we only need to log it once
if (process_info_logged.exchange(true))
return;
bool isRedist = true;
#if BUILD_INBOX
isRedist = false;
#endif
TraceLoggingWrite(telemetry_provider_handle,
"ProcessInfo",
TraceLoggingBool(true, "UTCReplace_AppSessionGuid"),
@ -111,7 +114,7 @@ void WindowsTelemetry::LogProcessInfo() const {
// Telemetry info
TraceLoggingUInt8(0, "schemaVersion"),
TraceLoggingString(ORT_VERSION, "runtimeVersion"),
TraceLoggingBool(true, "isRedist"));
TraceLoggingBool(isRedist, "isRedist"));
process_info_logged = true;
}