chore: restore telemetry by default - #4431
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 10 files
Shadow auto-approve: would not auto-approve because issues were found.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Shadow auto-approve: would not auto-approve because issues were found.
Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Shadow auto-approve: would require human review. Restores telemetry to default-on/opt-out, expanding data collection to all users and reversing the current opt-in default. This is a privacy policy decision requiring human sign-off.
Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Shadow auto-approve: would require human review. Re-enables default-on library-load telemetry, expanding behavior exposure to every importer; a privacy/analytics policy decision requiring human sign-off.
Re-trigger cubic
Summary
PR #4281 accidentally changed the existing library-load telemetry ping from default-on/opt-out to explicit opt-in. This PR resumes the existing library-load telemetry by default when
unstructuredis imported.Changes
UNSTRUCTURED_TELEMETRY_ENABLEDgate while preserving the telemetry endpoint, query payload keys and values, 10-second HTTP timeout, opt-out semantics, and best-effort failure suppression. The synchronousnvidia-smiGPU probe now usessubprocess.runwith a 1.0-second timeout and stdin, stdout, and stderr directed toDEVNULL; launch, non-zero-exit, and timeout failures keep import non-fatal and sendgpu="False".DO_NOT_TRACKorSCARF_NO_ANALYTICSto any non-empty value after trimming whitespace; either variable takes precedence.0.26.0), and changelog.DO_NOT_TRACK=1in the root pytestconftest.pybefore ordinary collection, including when an inherited value is empty or whitespace-only; focused telemetry tests explicitly clear both opt-outs under mocks to prove default-on behavior.DO_NOT_TRACK=1after any optional env file inmake docker-test, ensuring the packaged Docker test layout opts out before pytest collection without changing the production image.Validation
/opt/homebrew/opt/uv-wrapper/bin/uv run --locked --group test pytest -q --tb=short test_unstructured/test_telemetry.py— 21 passedmake check— passedmake check-version— passedgit diff --check— passedshellcheck scripts/image/test-outbound-connectivity.sh scripts/image/test-all-outbound-connectivity-scenarios.sh— passed on the unchanged shell files earlier in this PR(authored by codex)