Skip to content

Standardize telemetry dependency policy - #32705

Open
bmehta001 wants to merge 1 commit into
mainfrom
bhamehta/standardize-telemetry-integration
Open

bmehta001 wants to merge 1 commit into
mainfrom
bhamehta/standardize-telemetry-integration

Conversation

@bmehta001

Copy link
Copy Markdown
Contributor

Summary

  • delegate self-contained Linux curl/mbedTLS construction to cpp_client_telemetry and remove ORT's duplicate builder
  • use Apple system SQLite/libz while preventing any embedded 1DS copy from shutting down process-global SQLite
  • use minimal private SQLite and vendored zlib on other non-Windows source builds
  • preserve Apple static-package dependency targets and patch the currently pinned SDK for pthread-safe mbedTLS
  • avoid pulling vcpkg sqlite3/zlib packages on macOS and iOS

Validation

  • WSL Release configuration selected MINIMAL SQLite, vendored zlib, and HTTP-only curl 8.21 with mbedTLS 3.6.7
  • WSL onnxruntime_common built successfully, including POSIX telemetry
  • compatibility patch applies cleanly to cpp_client_telemetry v3.10.240.1
  • clang-format and git diff --check

Related SDK cleanup: microsoft/cpp_client_telemetry#1537

Delegate self-contained Linux curl/mbedTLS construction to 1DS, use Apple system SQLite/libz with host-owned process lifecycle, and use minimal private SQLite on other non-Windows platforms. Preserve static-package dependency targets and the released-SDK compatibility patch.

Files changed:
- cmake/CMakeLists.txt
- cmake/deps.txt
- cmake/external/onnxruntime_external_deps.cmake
- cmake/external/telemetry_linux_http.cmake
- cmake/onnxruntime_common.cmake
- cmake/patches/cpp_client_telemetry/cpp_client_telemetry.patch
- cmake/vcpkg-ports/cpp-client-telemetry/vcpkg.json
- onnxruntime/core/platform/posix/telemetry.cc

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 20, 2026 10:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The delegated curl path loses required CA-path sanitization and static-package export normalization.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Standardizes non-Windows telemetry dependencies across Linux and Apple platforms.

Changes:

  • Delegates Linux curl/mbedTLS construction to 1DS.
  • Uses system SQLite/zlib on Apple and private dependencies elsewhere.
  • Preserves static-package targets and adds pthread-safe mbedTLS configuration.
File Description
onnxruntime/​core/​platform/​posix/​telemetry.cc Avoids process-global SQLite shutdown on Apple.
cmake/​vcpkg-ports/​cpp-client-telemetry/​vcpkg.json Excludes SQLite/zlib packages on Apple.
cmake/​patches/​cpp_client_telemetry/​cpp_client_telemetry.patch Enables pthread-safe fetched mbedTLS.
cmake/​onnxruntime_common.cmake Links Apple system SQLite and zlib.
cmake/​external/​telemetry_linux_http.cmake Removes the duplicate Linux dependency builder.
cmake/​external/​onnxruntime_external_deps.cmake Selects platform-specific 1DS dependency providers.
cmake/​deps.txt Reclassifies curl and mbedTLS as transitive inventory entries.
cmake/​CMakeLists.txt Recreates Apple dependency targets for static packages.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

set(MATSDK_SQLITE_PROVIDER VENDORED CACHE STRING "Use bundled 1DS SQLite" FORCE)
set(MATSDK_ZLIB_PROVIDER VENDORED CACHE STRING "Use bundled 1DS zlib" FORCE)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(MATSDK_CURL_PROVIDER FETCH CACHE STRING "Build the SDK's pinned curl with mbedTLS" FORCE)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing upstream

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants