Repository navigation
FE-3367 feat(telemetry): mirror Desktop SSO sign-in to Datadog - #1695
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk | ⚪ Minimal · up to
|
christian-byrne
left a comment
There was a problem hiding this comment.
Reviewed at head 9699caca3446750a26c69c1fd82980af6e9476b7.
Clean, well-scoped change: adds comfy.desktop.auth.host_sign_in to the Datadog mirror allow-list in src/shared/datadogMirroredEvents.ts so the hosted-view SSO sign-in funnel (from #1694) reaches Datadog the same way install.phase does, with a parameterized test confirming host_sign_in and sign_in_failed mirror while the separate Firebase-bridge sign_in_started stays PostHog-only.
Checked the no-PII claim against hostSignInTelemetry.ts directly rather than trusting the PR body: the reported properties are only stage, host, and on failure reason/http_status — no email, name, or IdP text. forwardToRenderer mirrors only the event's own context object, so nothing beyond that reaches the renderer's Datadog SDK.
CI fully green (typecheck, lint, format, unit/integration/E2E across all three OSes, CodeRabbit "no actionable comments"), no open review threads, no package/export surface touched. Approving.
…Datadog 镜像;启动失败可见性;beta grant 即时生效) 上游要点(upstream/main → artifylab-v2,17 提交,官方 1.1.6 → 1.1.7-rc.3): - feat(telemetry): Core 的 [agent-event] 日志行转发为 agent telemetry;Desktop SSO 登录事件上报并镜像到 Datadog(Comfy-Org#1668 / Comfy-Org#1694 / Comfy-Org#1695) - fix(telemetry): assets tap 的未终止尾部不再解析;未知事件与枚举值仅在取得遥测同意后才计数;打包环境隔离 PostHog;Datadog release 版本归一化(Comfy-Org#1669 / Comfy-Org#1661 / Comfy-Org#1630 / Comfy-Org#1631) - fix(launch): 展示 ComfyUI 资产数据库启动失败,无 --enable-assets 时给出锁提示(Comfy-Org#1688) - fix(perf-test): 已有 ComfyUI 在跑时拒绝发起性能测试(Comfy-Org#1643) - fix(update): 更新时保留 ComfyUI checkout 内的未跟踪文件(Comfy-Org#1677) - fix(ops-flag): 保存的 beta grant 立即生效并在后台刷新(Comfy-Org#1678) - fix(auth): OAuth 请求存活期间持续等待浏览器登录;再次请求登录时重开待处理的浏览器(Comfy-Org#1681 / Comfy-Org#1685) - test(launch): 每次运行使用独立 settings 目录,避免并发互相干扰(Comfy-Org#1663) - chore: 官方版本号 1.1.7-rc.1 / rc.2 / rc.3(Comfy-Org#1682 / Comfy-Org#1687 / Comfy-Org#1690) 未收录:上游对 .github/workflows/ 的两个改动已回退到 fork 版——本机 Git Credential Manager 的 GitHub OAuth 令牌缺 workflow scope,GitHub 拒绝任何更新 .github/workflows/** 的推送。涉及:build-release.yml 的 Datadog release_version 改 heredoc 写法(Comfy-Org#1631 附带)、ci.yml 新增 python-git-helpers 测试 job。待令牌补上 workflow scope 后按上游版本补回。 冲突:仅 package.json 的身份字段(name/version/description),按本仓口径取 fork 侧(artify-desktop / 1.11.0),上游仅有的 version bump 由 fork 版本号取代。 依赖变化:无新增(pnpm-lock.yaml 未动,上游本范围内 package.json 只改了 version 行)。 验证:三方行级校验(fork 新增行 / 上游新增行均保留,唯一丢失行是上游 version 字面量,属预期取代);typecheck:node + typecheck:web 通过;主进程 vitest 376 文件 7436 passed / 0 failed;前端 29 文件 460 passed(首跑 1 例 5s 超时 flake,复跑两次均全绿)。
Why
The SSO dashboards and monitors live in Datadog.
comfy.desktop.auth.host_sign_in(added in #1694) only reached PostHog, becauseforwardToRendererandtrackTelemetryActionmirror only names onDATADOG_MIRRORED_EVENT_NAMES.How
Add
comfy.desktop.auth.host_sign_into the allow-list. The whole event is mirrored, every stage included, the same way asinstall.phase: dashboards needrequested/completedas the denominator, and monitors filter onstage:failed.In Datadog RUM (
service:comfyui-desktop-2,env:prod-v2, us5) it lands as a custom action:@type:action @action.type:custom @action.name:comfy.desktop.auth.host_sign_in@context.stage:requested|completed|failed@context.reason(failed only):cancelled|timeout|idp_error|server_error|network|browser_unavailable|superseded|unknown@context.http_status(failed only, when known): number@context.host:desktopNo PII: main forwards only the event's own properties (stage, host, reason code, HTTP status). It does not forward PostHog default properties, email, name or IdP text. The renderer adds the usual cohort global context and the device-ID
usr.id, which every RUM event already carries.Change breakdown (total 15 changed lines):
src/shared/datadogMirroredEvents.tssrc/shared/datadogMirroredEvents.test.tsTest plan
pnpm exec vitest run src/shared/datadogMirroredEvents.test.ts src/main/lib/telemetry.test.ts src/main/lib/ipc/registerEmbeddedSessionHandlers.test.ts: 218 passedtypecheck(node/web/e2e/integration),eslint .,prettier --checkLinks
src/main/lib/hostSignInTelemetry.ts)