Repository navigation
Preserve EP registration End events for returned errors without telemetry - #32780
Merged
Merged
Conversation
Keep Windows ETW Start/End paired when ORT_USE_TELEMETRY is disabled by capturing early status returns before emitting End.\n\nFiles: onnxruntime/core/session/environment.cc Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Limit the comment to returned Status failures; non-standard exceptions can still escape this catch. Files: onnxruntime/core/session/environment.cc Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The telemetry-disabled regression path lacks runtime test coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Preserves EP registration End events for returned errors when telemetry duration tracking is disabled.
Changes:
- Keeps registration work in a status-returning lambda across configurations.
- Retains Start/End events while conditionally measuring duration.
| File | Description |
|---|---|
onnxruntime/core/session/environment.cc |
Preserves failure statuses in End events. Needs a telemetry-disabled runtime regression test. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Move loading under the common Start/End span so returned errors and caught exceptions emit a failed End event. Cover a missing library registration. Files: include/onnxruntime/core/session/environment.h, onnxruntime/core/session/environment.cc, onnxruntime/test/autoep/test_registration.cc Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Capture status on every load and initialization path so early failures reach End events and profiling cleanup. Keep timing conditional and cover failed-load and failed-initialization profiling.\n\nFiles: onnxruntime/core/session/inference_session.cc, onnxruntime/test/framework/inference_session_test.cc Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b484370e-68a5-459b-b5cb-cdb2f7097fd2
Allow the pre-load initialization profile test to load a model before ending profiling, as required by the profiling API. Omit telemetry provider calls on non-Windows builds without telemetry so Android minimal does not pay for no-op events. Files changed: onnxruntime/core/session/inference_session.cc, onnxruntime/test/framework/inference_session_test.cc Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b484370e-68a5-459b-b5cb-cdb2f7097fd2
The ORT-format loader has no profiling cleanup, so non-Windows builds without telemetry can return errors directly. Keep the capture on Windows and with telemetry to preserve failed End events. Files changed: onnxruntime/core/session/inference_session.cc Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b484370e-68a5-459b-b5cb-cdb2f7097fd2
Use the released logging support and verified source pins in FetchContent and the vcpkg overlay so both dependency paths agree. Remove compatibility patches now included upstream. Files changed: cmake/deps.txt, cmake/external/onnxruntime_external_deps.cmake, cmake/patches/cpp_client_telemetry/cpp_client_telemetry.patch, cmake/vcpkg-configuration.json, cmake/vcpkg-ports/cpp-client-telemetry/fix-calloc.patch, cmake/vcpkg-ports/cpp-client-telemetry/portfile.cmake, cmake/vcpkg-ports/cpp-client-telemetry/vcpkg.json Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b484370e-68a5-459b-b5cb-cdb2f7097fd2
The released SDK header already carries the pinned version, and vcpkg passes its version explicitly. Leave ORT's global CMake cache free of an SDK-specific version. Files changed: cmake/external/onnxruntime_external_deps.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b484370e-68a5-459b-b5cb-cdb2f7097fd2
Capture events through the profiling logger so tests do not assume that Wasm writes profile files.\n\nFiles changed: onnxruntime/test/framework/inference_session_test.cc Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b484370e-68a5-459b-b5cb-cdb2f7097fd2
Route cancellation, pre-load, and disabled GQA failures through one profiling and telemetry completion path without changing their status or End events. Remove the lock warning suppression now that no manual unlock remains. Files changed: onnxruntime/core/session/inference_session.cc Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b484370e-68a5-459b-b5cb-cdb2f7097fd2
Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
Keep plugin loading outside the registration telemetry span as before and remove status-capture guards so the ORT loader follows the simpler common path. This lets CI assess the requested size and behavior trade-off. Files changed: include/onnxruntime/core/session/environment.h, onnxruntime/core/session/environment.cc, onnxruntime/core/session/inference_session.cc Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9be33a5f-8eca-4d8d-9706-ac29e079a719
…registration-telemetry
Match session telemetry guards while retaining Windows ETW without ORT_USE_TELEMETRY. Raise the Android minimal size limit by 1 KiB from the merged main baseline to accommodate the unconditional status-capture path. Files changed: onnxruntime/core/session/environment.cc, .github/workflows/android.yml Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9be33a5f-8eca-4d8d-9706-ac29e079a719
…registration-telemetry
bmehta001
enabled auto-merge (squash)
September 29, 2026 23:23
Edward Chen (edgchen1)
approved these changes
Sep 30, 2026
Gopalakrishnan Nallasamy (GopalakrishnanN)
pushed a commit
to GopalakrishnanN/onnxruntime
that referenced
this pull request
Oct 1, 2026
Bring in the shared CUDA routing fix from microsoft#32932 and the updated Android minimal size baseline from microsoft#32780 and microsoft#32805. Preserve the existing model-load validation changes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LogRegisterEpLibraryStart/Endstay active withoutORT_USE_TELEMETRY: Windows ETW still uses these calls; only timing is conditional.Statusreturns after library loading, duplicate names,std::exception, and unknown exceptions in a single failedRegisterEpLibraryEnd. Plugin loading remains outside the Start/End span: load failures return without either event. Add a missing-library registration test.Windows behavior
WindowsTelemetry::LogRegisterEpLibraryEndwrites an informational ETWRegisterEpLibraryEndevent withisSuccess=false, error code/category, and a scrubbed error message if the provider registered and telemetry is enabled. This is not a separateLogRuntimeErrorevent. ETW emission also depends on a listener subscribing; ORT unit-test processes suppress the Windows telemetry provider.Validation
ORT_USE_TELEMETRY=OFF) and a WSL Linux object (ORT_USE_TELEMETRY=ON). The latest revision passed targeted lintrunner andgit diff --check; CI is pending.environment.ccbut fails in other files on existing ORT version assertions. The new integration test was not run locally.