Skip to content

feat: add periodic telemetry event flushing#1829

Merged
radu-mocanu merged 1 commit into
mainfrom
fix/periodic-telemetry-flush
Jul 23, 2026
Merged

feat: add periodic telemetry event flushing#1829
radu-mocanu merged 1 commit into
mainfrom
fix/periodic-telemetry-flush

Conversation

@radu-mocanu

@radu-mocanu radu-mocanu commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • periodically flush buffered App Insights custom events when EnablePeriodicTelemetryFlush is enabled
  • coordinate periodic, explicit, reset, and shutdown flushes through one synchronized client lifecycle
  • preserve the existing buffered behavior when the feature flag is disabled

Why

long-running calls can keep low-volume lifecycle events buffered until process shutdown. a bounded periodic flush reduces event loss when infrastructure terminates the process.

Development Packages

uipath

[project]
dependencies = [
  # Exact version (copy-paste ready):
  "uipath==2.13.15.dev1018297334",

  # Any version from this PR (uncomment to use a range instead):
  # "uipath>=2.13.15.dev1018290000,<2.13.15.dev1018300000",
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath = { index = "testpypi" }

Copilot AI review requested due to automatic review settings July 23, 2026 11:42
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime test:uipath-integrations labels Jul 23, 2026

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.

Pull request overview

Adds an optional, feature-flagged background worker to periodically flush buffered Application Insights custom events, improving delivery of low-volume lifecycle telemetry in long-running processes while preserving the existing buffering behavior by default.

Changes:

  • Introduce EnablePeriodicTelemetryFlush to start a periodic flush worker that calls flush() at a fixed interval.
  • Synchronize explicit/reset/shutdown flush operations with locks and a unified _shutdown() lifecycle.
  • Add integration-style tests using a local HTTP ingestion server to validate buffered vs periodic-flush behavior; bump package version to 2.13.15.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/uipath/src/uipath/telemetry/_track.py Implements periodic flush worker behind a feature flag and synchronizes flush/reset/shutdown lifecycle.
packages/uipath/tests/telemetry/test_track.py Adds tests verifying default buffering, periodic flush delivery, and shutdown synchronization semantics.
packages/uipath/pyproject.toml Bumps uipath package version to 2.13.15.
packages/uipath/uv.lock Updates lockfile version entry to 2.13.15.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/uipath/src/uipath/telemetry/_track.py Outdated
@radu-mocanu
radu-mocanu force-pushed the fix/periodic-telemetry-flush branch from d760475 to c592a55 Compare July 23, 2026 12:06
@radu-mocanu radu-mocanu added the build:dev Create a dev build from the pr label Jul 23, 2026
@github-actions

Copy link
Copy Markdown

🚨 Heads up: uipath-langchain cross-tests are FAILING 🚨

Your changes may break the uipath-langchain-python integration.

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@radu-mocanu
radu-mocanu force-pushed the fix/periodic-telemetry-flush branch from c592a55 to 6620649 Compare July 23, 2026 12:36
@github-actions

Copy link
Copy Markdown

🚨 Heads up: uipath-integrations cross-tests are FAILING 🚨

Your changes may break one or more integrations in uipath-integrations-python:

  • uipath-openai-agents
  • uipath-google-adk
  • uipath-agent-framework
  • uipath-llamaindex
  • uipath-pydantic-ai

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@radu-mocanu
radu-mocanu force-pushed the fix/periodic-telemetry-flush branch from 6620649 to 4397258 Compare July 23, 2026 12:46
@sonarqubecloud

Copy link
Copy Markdown

@radu-mocanu
radu-mocanu merged commit 7be0e7d into main Jul 23, 2026
174 checks passed
@radu-mocanu
radu-mocanu deleted the fix/periodic-telemetry-flush branch July 23, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build:dev Create a dev build from the pr 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.

3 participants