@@ -457,7 +457,8 @@ void WindowsTelemetry::LogCompileModelStart(uint32_t session_id,
457457 TraceLoggingInt32 (graph_optimization_level, " graphOptimizationLevel" ),
458458 TraceLoggingBool (embed_ep_context, " embedEpContext" ),
459459 TraceLoggingBool (has_external_initializers_file, " hasExternalInitializersFile" ),
460- TraceLoggingString (execution_provider_string.c_str (), " executionProviderIds" ));
460+ TraceLoggingString (execution_provider_string.c_str (), " executionProviderIds" ),
461+ TraceLoggingString (ORT_CALLER_FRAMEWORK, " frameworkName" ));
461462}
462463
463464void WindowsTelemetry::LogCompileModelComplete (uint32_t session_id,
@@ -480,7 +481,8 @@ void WindowsTelemetry::LogCompileModelComplete(uint32_t session_id,
480481 TraceLoggingBool (success, " success" ),
481482 TraceLoggingUInt32 (error_code, " errorCode" ),
482483 TraceLoggingUInt32 (error_category, " errorCategory" ),
483- TraceLoggingString (error_message.c_str (), " errorMessage" ));
484+ TraceLoggingString (error_message.c_str (), " errorMessage" ),
485+ TraceLoggingString (ORT_CALLER_FRAMEWORK, " frameworkName" ));
484486}
485487
486488void WindowsTelemetry::LogRuntimeError (uint32_t session_id, const common::Status& status, const char * file,
@@ -548,6 +550,7 @@ void WindowsTelemetry::LogRuntimePerf(uint32_t session_id, uint32_t total_runs_s
548550 TraceLoggingBool (true , " UTCReplace_AppSessionGuid" ),
549551 TelemetryPrivacyDataTag (PDT_ProductAndServicePerformance),
550552 TraceLoggingKeyword (MICROSOFT_KEYWORD_MEASURES),
553+ TraceLoggingLevel (WINEVENT_LEVEL_INFO),
551554 // Telemetry info
552555 TraceLoggingUInt8 (0 , " schemaVersion" ),
553556 TraceLoggingUInt32 (session_id, " sessionId" ),
@@ -668,4 +671,115 @@ void WindowsTelemetry::LogProviderOptions(const std::string& provider_id, const
668671 }
669672}
670673
674+ void WindowsTelemetry::LogModelLoadStart (uint32_t session_id) const {
675+ if (global_register_count_ == 0 || enabled_ == false )
676+ return ;
677+
678+ TraceLoggingWrite (telemetry_provider_handle,
679+ " ModelLoadStart" ,
680+ TraceLoggingBool (true , " UTCReplace_AppSessionGuid" ),
681+ TelemetryPrivacyDataTag (PDT_ProductAndServiceUsage),
682+ TraceLoggingKeyword (MICROSOFT_KEYWORD_MEASURES),
683+ TraceLoggingLevel (WINEVENT_LEVEL_INFO),
684+ // Telemetry info
685+ TraceLoggingUInt8 (0 , " schemaVersion" ),
686+ TraceLoggingUInt32 (session_id, " sessionId" ),
687+ TraceLoggingString (ORT_CALLER_FRAMEWORK, " frameworkName" ));
688+ }
689+
690+ void WindowsTelemetry::LogModelLoadEnd (uint32_t session_id, const common::Status& status) const {
691+ if (global_register_count_ == 0 || enabled_ == false )
692+ return ;
693+
694+ TraceLoggingWrite (telemetry_provider_handle,
695+ " ModelLoadEnd" ,
696+ TraceLoggingBool (true , " UTCReplace_AppSessionGuid" ),
697+ TelemetryPrivacyDataTag (PDT_ProductAndServicePerformance),
698+ TraceLoggingKeyword (MICROSOFT_KEYWORD_MEASURES),
699+ TraceLoggingLevel (WINEVENT_LEVEL_INFO),
700+ // Telemetry info
701+ TraceLoggingUInt8 (0 , " schemaVersion" ),
702+ TraceLoggingUInt32 (session_id, " sessionId" ),
703+ TraceLoggingBool (status.IsOK (), " isSuccess" ),
704+ TraceLoggingUInt32 (status.Code (), " errorCode" ),
705+ TraceLoggingUInt32 (status.Category (), " errorCategory" ),
706+ TraceLoggingString (status.IsOK () ? " " : status.ErrorMessage ().c_str (), " errorMessage" ),
707+ TraceLoggingString (ORT_CALLER_FRAMEWORK, " frameworkName" ));
708+ }
709+
710+ void WindowsTelemetry::LogSessionCreationEnd (uint32_t session_id,
711+ const common::Status& status) const {
712+ if (global_register_count_ == 0 || enabled_ == false )
713+ return ;
714+
715+ TraceLoggingWrite (telemetry_provider_handle,
716+ " SessionCreationEnd" ,
717+ TraceLoggingBool (true , " UTCReplace_AppSessionGuid" ),
718+ TelemetryPrivacyDataTag (PDT_ProductAndServicePerformance),
719+ TraceLoggingKeyword (MICROSOFT_KEYWORD_MEASURES),
720+ TraceLoggingLevel (WINEVENT_LEVEL_INFO),
721+ // Telemetry info
722+ TraceLoggingUInt8 (0 , " schemaVersion" ),
723+ TraceLoggingUInt32 (session_id, " sessionId" ),
724+ TraceLoggingBool (status.IsOK (), " isSuccess" ),
725+ TraceLoggingUInt32 (status.Code (), " errorCode" ),
726+ TraceLoggingUInt32 (status.Category (), " errorCategory" ),
727+ TraceLoggingString (status.IsOK () ? " " : status.ErrorMessage ().c_str (), " errorMessage" ),
728+ TraceLoggingString (ORT_CALLER_FRAMEWORK, " frameworkName" ));
729+ }
730+
731+ void WindowsTelemetry::LogRunStart (uint32_t session_id, uint64_t run_id) const {
732+ if (global_register_count_ == 0 || enabled_ == false )
733+ return ;
734+
735+ TraceLoggingWrite (telemetry_provider_handle,
736+ " RunStart" ,
737+ TraceLoggingBool (true , " UTCReplace_AppSessionGuid" ),
738+ TelemetryPrivacyDataTag (PDT_ProductAndServiceUsage),
739+ TraceLoggingKeyword (MICROSOFT_KEYWORD_MEASURES),
740+ TraceLoggingLevel (WINEVENT_LEVEL_INFO),
741+ // Telemetry info
742+ TraceLoggingUInt8 (0 , " schemaVersion" ),
743+ TraceLoggingUInt32 (session_id, " sessionId" ),
744+ TraceLoggingUInt64 (run_id, " runId" ),
745+ TraceLoggingString (ORT_CALLER_FRAMEWORK, " frameworkName" ));
746+ }
747+
748+ void WindowsTelemetry::LogRegisterEpLibraryStart (const std::string& registration_name) const {
749+ if (global_register_count_ == 0 || enabled_ == false )
750+ return ;
751+
752+ TraceLoggingWrite (telemetry_provider_handle,
753+ " RegisterEpLibraryStart" ,
754+ TraceLoggingBool (true , " UTCReplace_AppSessionGuid" ),
755+ TelemetryPrivacyDataTag (PDT_ProductAndServiceUsage),
756+ TraceLoggingKeyword (MICROSOFT_KEYWORD_MEASURES),
757+ TraceLoggingLevel (WINEVENT_LEVEL_INFO),
758+ // Telemetry info
759+ TraceLoggingUInt8 (0 , " schemaVersion" ),
760+ TraceLoggingString (registration_name.c_str (), " registrationName" ),
761+ TraceLoggingString (ORT_CALLER_FRAMEWORK, " frameworkName" ));
762+ }
763+
764+ void WindowsTelemetry::LogRegisterEpLibraryEnd (const std::string& registration_name,
765+ const common::Status& status) const {
766+ if (global_register_count_ == 0 || enabled_ == false )
767+ return ;
768+
769+ TraceLoggingWrite (telemetry_provider_handle,
770+ " RegisterEpLibraryEnd" ,
771+ TraceLoggingBool (true , " UTCReplace_AppSessionGuid" ),
772+ TelemetryPrivacyDataTag (PDT_ProductAndServicePerformance),
773+ TraceLoggingKeyword (MICROSOFT_KEYWORD_MEASURES),
774+ TraceLoggingLevel (WINEVENT_LEVEL_INFO),
775+ // Telemetry info
776+ TraceLoggingUInt8 (0 , " schemaVersion" ),
777+ TraceLoggingString (registration_name.c_str (), " registrationName" ),
778+ TraceLoggingBool (status.IsOK (), " isSuccess" ),
779+ TraceLoggingUInt32 (status.Code (), " errorCode" ),
780+ TraceLoggingUInt32 (status.Category (), " errorCategory" ),
781+ TraceLoggingString (status.IsOK () ? " " : status.ErrorMessage ().c_str (), " errorMessage" ),
782+ TraceLoggingString (ORT_CALLER_FRAMEWORK, " frameworkName" ));
783+ }
784+
671785} // namespace onnxruntime
0 commit comments