Minimize telemetry context and modernize 1DS integration (#29872)
## Summary
Minimizes automatic POSIX/1DS common context and makes telemetry an
explicit build opt-out on supported native targets.
## Context minimization
- Removes the unused POSIX `ProviderOptions` emitter.
- Suppresses duplicate app name, app/user locale, timezone, and enrolled
tenant ID.
- Retains `ext.net.*` on `ProcessInfo`, then clears it best-effort
before later events.
- Removes redundant POSIX `processName` and `LibraryName` fields.
- Retains ORT correlation, version, framework, device, timestamp,
sampling, and SDK-ordering fields.
- Keeps optional context suppression non-fatal and retries network
cleanup until it succeeds.
- Preserves canonical event names without adding an `ORT` or
`OnnxRuntime` prefix.
## Build behavior
- Replaces the opt-in `--use_telemetry` interface with the opt-out
`--no_telemetry` flag.
- Enables telemetry by default for supported Windows, Linux, macOS, iOS,
and Android targets.
- Keeps `build.bat` and `build_arm64x.bat` opted out; `build.sh` adds no
telemetry flag.
- Automatically disables telemetry for WebAssembly, AIX, RISC-V,
unsupported Linux architectures, tvOS, visionOS, Mac Catalyst, and
exception-free builds.
- Makes Windows default-on source builds fall back to the public
non-Microsoft ETW configuration when no private telemetry header is
present.
- Updates Android/Apple packaging, Azure callers, and `docs/Privacy.md`.
## cpp_client_telemetry PR #1511 integration
- Pins non-Windows telemetry to `cpp_client_telemetry` PR #1511
(`0b7b0cfb63ecc9dcdecad61e60f26957fdb01f61`).
- Uses the PR's canonical `MATSDK_*` CMake options and removes obsolete
legacy option/patch plumbing.
- Fixes iOS CMake variable compatibility through the updated SDK
embedding surface.
- Routes non-vcpkg Linux telemetry through ORT's pinned static curl with
mbedTLS, avoiding an OpenSSL dependency.
- Keeps vcpkg, Android, Apple, Windows, telemetry-off, and
unsupported-target paths appropriately configured.
## Self-contained Linux transport
- Non-vcpkg Linux telemetry builds pin and statically link an
HTTP/HTTPS-only curl with mbedTLS instead of requiring host curl/TLS
libraries.
- Dependency options are isolated from caller cache state; mbedTLS uses
pthread protection for concurrent 1DS uploads.
- The target host CA bundle is selected at runtime, while build-host
trust paths are removed from curl's generated configuration.
- Shared consumers do not re-export transport symbols; static package
exports include all required archives and document the ordinary static
co-link constraint.
## Validation
- Focused build-argument and Android AAR tests for default, opt-out, and
unsupported-target behavior.
- Windows and Linux/WSL parser/wrapper checks.
- Linux `onnxruntime_common` configure/build transitions with telemetry
ON, OFF, and exception-free OFF.
- Linux telemetry-enabled Release configure completed successfully with
PR #1511, static curl, mbedTLS, vendored SQLite/zlib, and unit tests
disabled; the dependency build is still running.
- Focused semantic-context/no-throw tests and material review.
- ELF dependency/symbol inspection and static package export/install
graph checks.
- Updated ORT privacy data inventory for the minimized POSIX context.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Hariharan Seshadri <shariharan91@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tianlei Wu <tlwu@microsoft.com>
Copilot-Session: 5a640c3d-b813-4671-84cf-ad98db91b480
Copilot-Session: 6b269873-a7bf-490e-a412-70a920868135
Copilot-Session: 297bc539-5f7f-4a70-9411-48e91a5bf532
Copilot-Session: e44a1da5-fe20-4ca4-ad8e-625448dec94a