Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions onnxruntime/core/platform/windows/telemetry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ void WindowsTelemetry::LogSessionCreationStart(uint32_t session_id) const {
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage),
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
TraceLoggingUInt32(session_id, "sessionId"),
TraceLoggingLevel(WINEVENT_LEVEL_INFO));
TraceLoggingLevel(WINEVENT_LEVEL_INFO),
TraceLoggingString(ORT_CALLER_FRAMEWORK, "frameworkName"));
}

void WindowsTelemetry::LogEvaluationStop(uint32_t session_id) const {
Expand Down Expand Up @@ -304,7 +305,8 @@ void WindowsTelemetry::LogSessionCreation(uint32_t session_id, int64_t ir_versio
TraceLoggingString(model_weight_hash.c_str(), "modelWeightHash"),
TraceLoggingString(model_metadata_string.c_str(), "modelMetaData"),
TraceLoggingString(loaded_from.c_str(), "loadedFrom"),
TraceLoggingString(execution_provider_string.c_str(), "executionProviderIds"));
TraceLoggingString(execution_provider_string.c_str(), "executionProviderIds"),
TraceLoggingString(ORT_CALLER_FRAMEWORK, "frameworkName"));
} else {
TraceLoggingWrite(telemetry_provider_handle,
"SessionCreation_CaptureState",
Expand All @@ -330,7 +332,8 @@ void WindowsTelemetry::LogSessionCreation(uint32_t session_id, int64_t ir_versio
TraceLoggingString(model_weight_hash.c_str(), "modelWeightHash"),
TraceLoggingString(model_metadata_string.c_str(), "modelMetaData"),
TraceLoggingString(loaded_from.c_str(), "loadedFrom"),
TraceLoggingString(execution_provider_string.c_str(), "executionProviderIds"));
TraceLoggingString(execution_provider_string.c_str(), "executionProviderIds"),
TraceLoggingString(ORT_CALLER_FRAMEWORK, "frameworkName"));
}
}

Expand All @@ -356,7 +359,8 @@ void WindowsTelemetry::LogRuntimeError(uint32_t session_id, const common::Status
TraceLoggingString(status.ErrorMessage().c_str(), "errorMessage"),
TraceLoggingString(file, "file"),
TraceLoggingString(function, "function"),
TraceLoggingInt32(line, "line"));
TraceLoggingInt32(line, "line"),
TraceLoggingString(ORT_CALLER_FRAMEWORK, "frameworkName"));
#else
TraceLoggingWrite(telemetry_provider_handle,
"RuntimeError",
Expand All @@ -372,7 +376,8 @@ void WindowsTelemetry::LogRuntimeError(uint32_t session_id, const common::Status
TraceLoggingString(status.ErrorMessage().c_str(), "errorMessage"),
TraceLoggingString(file, "file"),
TraceLoggingString(function, "function"),
TraceLoggingInt32(line, "line"));
TraceLoggingInt32(line, "line"),
TraceLoggingString(ORT_CALLER_FRAMEWORK, "frameworkName"));
#endif
}

Expand Down Expand Up @@ -402,7 +407,8 @@ void WindowsTelemetry::LogRuntimePerf(uint32_t session_id, uint32_t total_runs_s
TraceLoggingUInt32(session_id, "sessionId"),
TraceLoggingUInt32(total_runs_since_last, "totalRuns"),
TraceLoggingInt64(total_run_duration_since_last, "totalRunDuration"),
TraceLoggingString(total_duration_per_batch_size.c_str(), "totalRunDurationPerBatchSize"));
TraceLoggingString(total_duration_per_batch_size.c_str(), "totalRunDurationPerBatchSize"),
TraceLoggingString(ORT_CALLER_FRAMEWORK, "frameworkName"));
}

void WindowsTelemetry::LogExecutionProviderEvent(LUID* adapterLuid) const {
Expand Down Expand Up @@ -478,7 +484,8 @@ void WindowsTelemetry::LogAutoEpSelection(uint32_t session_id, const std::string
TraceLoggingUInt32(session_id, "sessionId"),
TraceLoggingString(selection_policy.c_str(), "selectionPolicy"),
TraceLoggingString(requested_execution_provider_string.c_str(), "requestedExecutionProviderIds"),
TraceLoggingString(available_execution_provider_string.c_str(), "availableExecutionProviderIds"));
TraceLoggingString(available_execution_provider_string.c_str(), "availableExecutionProviderIds"),
TraceLoggingString(ORT_CALLER_FRAMEWORK, "frameworkName"));
}

void WindowsTelemetry::LogProviderOptions(const std::string& provider_id, const std::string& provider_options_string, bool captureState) const {
Expand All @@ -497,7 +504,8 @@ void WindowsTelemetry::LogProviderOptions(const std::string& provider_id, const
// Telemetry info
TraceLoggingUInt8(0, "schemaVersion"),
TraceLoggingString(provider_id.c_str(), "providerId"),
TraceLoggingString(provider_options_string.c_str(), "providerOptions"));
TraceLoggingString(provider_options_string.c_str(), "providerOptions"),
TraceLoggingString(ORT_CALLER_FRAMEWORK, "frameworkName"));
} else {
TraceLoggingWrite(telemetry_provider_handle,
"ProviderOptions_CaptureState",
Expand All @@ -509,7 +517,8 @@ void WindowsTelemetry::LogProviderOptions(const std::string& provider_id, const
// Telemetry info
TraceLoggingUInt8(0, "schemaVersion"),
TraceLoggingString(provider_id.c_str(), "providerId"),
TraceLoggingString(provider_options_string.c_str(), "providerOptions"));
TraceLoggingString(provider_options_string.c_str(), "providerOptions"),
TraceLoggingString(ORT_CALLER_FRAMEWORK, "frameworkName"));
}
}

Expand Down
Loading