Skip to content

feat(cua-driver): add per-process telemetry session ids#2024

Open
r33drichards wants to merge 1 commit into
mainfrom
codex/cua-driver-session-id
Open

feat(cua-driver): add per-process telemetry session ids#2024
r33drichards wants to merge 1 commit into
mainfrom
codex/cua-driver-session-id

Conversation

@r33drichards

@r33drichards r33drichards commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a per-process session_id to cua-driver telemetry payloads while keeping distinct_id as the stable per-install identifier
  • wire the new property into both the Rust and Swift cua-driver implementations for parity
  • extend the Rust telemetry tests to cover the new payload field and in-process session-id stability

Testing

  • git diff --check
  • Rust/Swift toolchains are not installed in this environment, so I could not run cargo test or Swift builds here

Summary by CodeRabbit

  • New Features
    • Telemetry events now include a per-process session ID alongside the existing per-install ID.
    • Session IDs are generated once per app run and stay stable for that process.
  • Bug Fixes
    • Telemetry payloads now consistently include the session ID in both install and runtime event paths.
  • Documentation
    • Updated telemetry privacy notes to reflect the additional session-level identifier.

@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Jun 25, 2026 5:29am

Request Review

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4785084b-ac80-47b1-9025-1c12a9b3fd82

📥 Commits

Reviewing files that changed from the base of the PR and between 9e84c1d and 8cc4faa.

📒 Files selected for processing (2)
  • libs/cua-driver/rust/crates/cua-driver/src/telemetry.rs
  • libs/cua-driver/swift/Sources/CuaDriverCore/Telemetry/TelemetryClient.swift

📝 Walkthrough

Walkthrough

Telemetry events in Rust and Swift now include a process-local session_id alongside the existing install-scoped distinct_id. The Rust implementation adds cached session ID generation, updates capture paths and tests, and the Swift client stores and emits the new field.

Changes

Telemetry session ID propagation

Layer / File(s) Summary
Rust payload contract
libs/cua-driver/rust/crates/cua-driver/src/telemetry.rs
Documentation, get_or_create_session_id(), and build_payload now include session_id in telemetry event properties.
Rust capture paths
libs/cua-driver/rust/crates/cua-driver/src/telemetry.rs
capture_install and spawn_capture now pass a generated session ID into payload building, and tests assert process-stable values.
Swift telemetry client
libs/cua-driver/swift/Sources/CuaDriverCore/Telemetry/TelemetryClient.swift
TelemetryClient now stores a per-process sessionId, initializes it on construction, and adds session_id to outgoing event properties.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

A bunny hopped through telemetry streams,
With session_id glinting in process-lit beams.
One ID stays with the install so neat,
One hops with the process on soft little feet. 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding per-process telemetry session IDs to cua-driver.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/cua-driver-session-id

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Linux visual regression artifacts

Matrix jobs now run independently. Download visual artifacts from this workflow run.
Each background-GUI job uploads a .gif of the interaction plus two annotated PNGs (<app>.png raw, <app>-atspi.png with AT-SPI element boxes); the cua-driver-linux-som-overlays artifact adds <app>-som.png cua Set-of-Marks overlays:

  • cua-driver-linux-cursor-click-gif
  • cua-driver-linux-background-terminal-gif
  • cua-driver-linux-parallel-drag-xserver
  • cua-driver-linux-background-gui-chromium
  • cua-driver-linux-background-gui-tk
  • cua-driver-linux-background-gui-gtk3-gedit
  • cua-driver-linux-background-gui-gtk3-mousepad
  • cua-driver-linux-background-gui-gtk3-scite
  • cua-driver-linux-background-gui-gtk4-characters
  • cua-driver-linux-background-gui-qt5-manuskript
  • cua-driver-linux-background-gui-qt5-klog
  • cua-driver-linux-background-gui-qt5-openambit
  • cua-driver-linux-background-gui-qt6-kate
  • cua-driver-linux-background-gui-qt6-kcalc
  • cua-driver-linux-background-gui-qt6-okular
  • cua-driver-linux-background-gui-qt6-qownnotes
  • cua-driver-linux-background-gui-electron-zettlr
  • cua-driver-linux-background-gui-electron-joplin
  • cua-driver-linux-background-gui-electron-logseq
  • cua-driver-linux-som-overlays

Open workflow run and download artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant