Skip to content

feat: add execution context to telemetry events#1074

Open
patrikbraborec wants to merge 11 commits intomasterfrom
feat/telemetry-execution-context
Open

feat: add execution context to telemetry events#1074
patrikbraborec wants to merge 11 commits intomasterfrom
feat/telemetry-execution-context

Conversation

@patrikbraborec
Copy link
Copy Markdown
Contributor

Track exit code, duration, CI/AI agent environment, interactivity, and command retry detection in telemetry data for better CLI usage insights.

Track exit code, duration, CI/AI agent environment, interactivity,
and command retry detection in telemetry data for better CLI usage insights.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@patrikbraborec patrikbraborec requested a review from l2ysho April 7, 2026 13:36
@github-actions github-actions bot added the t-c&c Team covering store and finance matters. label Apr 7, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the tested Temporary label used only programatically for some analytics. label Apr 7, 2026
patrikbraborec and others added 5 commits April 8, 2026 10:05
Replace manual CI_PROVIDER_ENV_VARS lookup with ci-info's built-in
provider detection, which covers 50+ CI providers out of the box.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The telemetry opt-in notice was printed to stderr even when telemetry
was disabled via env var, causing test assertions to fail by capturing
the notice as the last error message instead of the actual validation error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@patrikbraborec patrikbraborec added t-dx Issues owned by the DX team. and removed t-c&c Team covering store and finance matters. labels Apr 8, 2026
@patrikbraborec
Copy link
Copy Markdown
Contributor Author

Just FYI @vladfrangu & @l2ysho. I would like to merge this as it will allow us to start with analytics to conitinuosly measure improvements.

After we merge this, I will do follow up ticket: #1067. It will also communicate that we track these things transparently.

Copy link
Copy Markdown
Contributor

@l2ysho l2ysho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx for this @patrikbraborec , found 2 small bugs, also it would be nice to have some tests for checkAndUpdateLastCommand also

patrikbraborec and others added 4 commits April 9, 2026 12:36
Move flagsUsed, exitCode, durationMs, and wasRetried assignments
inside the skipTelemetry guard to avoid unnecessary work.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@patrikbraborec
Copy link
Copy Markdown
Contributor Author

@l2ysho I added the test, and fixed one of your suggestion. The second one is still open as I am not sure about it.

Copy link
Copy Markdown
Contributor

@l2ysho l2ysho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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

Labels

t-dx Issues owned by the DX team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants