Skip to content

fix(telemetry): turn telemetry off when UIPATH_TELEMETRY_DISABLED is true [PC-5668] - #2008

Merged
ionut-mihalache-uipath merged 2 commits into
mainfrom
fix/honour-telemetry-disabled
Nov 20, 2026
Merged

ionut-mihalache-uipath merged 2 commits into
mainfrom
fix/honour-telemetry-disabled

Conversation

@ionut-mihalache-uipath

@ionut-mihalache-uipath ionut-mihalache-uipath commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

A host environment that turns telemetry off for the processes it starts sets UIPATH_TELEMETRY_DISABLED=true. The SDK never read that variable: it only read UIPATH_TELEMETRY_ENABLED, which defaults to true. So telemetry stayed on in those environments.

  • Usage data is sent although telemetry is turned off.
  • Without network access to the ingestion endpoint, every send waits for a connection timeout (10 s, tried twice), which keeps the process running after its work is done.

Jira: PC-5668

Change

_TelemetryClient._is_enabled() returns false when UIPATH_TELEMETRY_DISABLED is true (or 1). It wins over UIPATH_TELEMETRY_ENABLED. Nothing changes when the variable is unset or has any other value.

Version bumped to 2.15.5.

Verification

  • Four new unit tests in tests/telemetry/test_track.py; the telemetry suite passes.
  • Against an unreachable ingestion endpoint with only UIPATH_TELEMETRY_DISABLED=true set: flush_events() took 20.0 s before the change and 0.0 s after it.

🤖 Generated with Claude Code

https://claude.ai/code/session_0136ibA73WLWFVYGwNLx18P7

…true [PC-5668]

The serverless platform tells a robot its telemetry is off with
UIPATH_TELEMETRY_DISABLED=true, which it always sets on Automation Suite.
The SDK only read UIPATH_TELEMETRY_ENABLED (default true), so it kept
sending events to the baked Application Insights instance. On an
air-gapped install every send waits for a connection timeout.

UIPATH_TELEMETRY_DISABLED=true now disables telemetry and wins over
UIPATH_TELEMETRY_ENABLED.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136ibA73WLWFVYGwNLx18P7
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime test:uipath-integrations labels Nov 20, 2026
…host product

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136ibA73WLWFVYGwNLx18P7
@sonarqubecloud

Copy link
Copy Markdown

@ionut-mihalache-uipath
ionut-mihalache-uipath marked this pull request as ready for review November 20, 2026 12:47
Copilot AI balanced review requested due to automatic review settings November 20, 2026 12:47

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.

🟢 Approval recommended

No active review issues are reported for the telemetry opt-out update.

No open issues 🎉

What changed in this PR

Updates the SDK’s usage-telemetry gate to honor host-provided opt-out settings, preventing telemetry sends and associated connection delays when disabled.

Changes:

  • Gives UIPATH_TELEMETRY_DISABLED=true or 1 precedence over UIPATH_TELEMETRY_ENABLED.
  • Adds tests for opt-out behavior, flag precedence, and event suppression, plus documentation.
  • Bumps uipath to version 2.15.5.
File Description
packages/​uipath/​uv.lock Updates the locked package version to 2.15.5.
packages/​uipath/​tests/​telemetry/​test_track.py Adds four tests covering the new opt-out behavior.
packages/​uipath/​src/​uipath/​telemetry/​_track.py Checks the disable flag before the existing enable flag.
packages/​uipath/​src/​uipath/​telemetry/​_constants.py Defines the disable environment-variable name.
packages/​uipath/​pyproject.toml Bumps the package version to 2.15.5.
packages/​uipath/​docs/​core/​environment_variables.md Documents the opt-out flag and its precedence.

Review effort: Balanced

@ionut-mihalache-uipath
ionut-mihalache-uipath merged commit dbbeca0 into main Nov 20, 2026
192 of 193 checks passed
@ionut-mihalache-uipath
ionut-mihalache-uipath deleted the fix/honour-telemetry-disabled branch November 20, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants