feat: add periodic telemetry event flushing#1829
Conversation
There was a problem hiding this comment.
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
EnablePeriodicTelemetryFlushto start a periodic flush worker that callsflush()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.
d760475 to
c592a55
Compare
🚨 Heads up:
|
c592a55 to
6620649
Compare
🚨 Heads up:
|
6620649 to
4397258
Compare
|



Summary
EnablePeriodicTelemetryFlushis enabledWhy
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