feat: add telemetry#274
Conversation
pFornagiel
left a comment
There was a problem hiding this comment.
The README.md right now states:
Argent does not collect or transmit any user data. No telemetry, no analytics, no crash reporting.
This will have to be updated as well
| export function isCi(env: NodeJS.ProcessEnv = process.env): boolean { | ||
| if (env.CI === "false") return false; | ||
| if (GENERIC_CI_ENV_VARS.some((name) => Boolean(env[name]))) return true; | ||
| return isKnownVendorCi(env); | ||
| } |
There was a problem hiding this comment.
The check here can do lots of false-positives from my perspective. The ordering should be:
env.CI == "falseisKnownVendorCi(env)GENERIC_CI_ENV_VARS
Also, the GENERIC_CI_ENV_VARS can be a little too genereic - BUILD_ID, BUILD_NUMBER, RUN_ID could simply be present in normal setup. Additionally, I am not sure whether ENV variables mentioning CI are not sometimes present on the users end. Can we do a bit more research here, or provide some source as to why this will not produce too many false-positives?
There was a problem hiding this comment.
The generic list, the CI === "false" bypass, and the vendor table are all taken verbatim from ci-info v4.4.0. Added a comment noting this. Kept BUILD_ID/BUILD_NUMBER/RUN_ID for parity. Narrowing them risks false negatives (Jenkins/TeamCity set only these), and this just gates a telemetry property, not behavior. CI === "false" is the escape hatch for anyone hitting a false positive. Ordering is a no-op — checks 2 and 3 are an OR, and the current order matches ci-info's.
| export interface ToolInvokeProps { | ||
| tool: string; | ||
| tool_invocation_id: string; | ||
| platform?: "ios" | "android"; | ||
| } | ||
|
|
||
| export interface ToolCompleteProps { | ||
| tool: string; | ||
| tool_invocation_id: string; | ||
| platform?: "ios" | "android"; | ||
| duration_ms: number; | ||
| } | ||
|
|
||
| export interface ToolFailProps { | ||
| tool: string; | ||
| tool_invocation_id: string; | ||
| platform?: "ios" | "android"; | ||
| duration_ms: number; | ||
| } | ||
|
|
There was a problem hiding this comment.
Up to discussion: Would it not be better to consolidate this into ToolInvokeProps entry with information about success / failure? Or would that be less clear / problematic to implement?
|
Possibly found something - at the moment it seems like every time when we do |
|
Additionally, maybe we could also add information whether the source of invocation was |
Summary
Adds anonymous, opt-out telemetry for Argent installer, update/uninstall flows, CLI telemetry controls, tool-server lifecycle, and tool invocation health signals.
What Changed
@argent/telemetrypackage~/.argent/telemetry-id.argent telemetry enable,argent telemetry disable,argent telemetry statusARGENT_TELEMETRY_DEBUG=1.ios/android) for device toolsTests Added / Updated