Skip to content

feat: add isTTY context to telemetry and filter SIGINT from Sentry#3632

Merged
eablack merged 17 commits intomainfrom
eb/add-isTty-and-remove-sigint-from-sentry
Mar 31, 2026
Merged

feat: add isTTY context to telemetry and filter SIGINT from Sentry#3632
eablack merged 17 commits intomainfrom
eb/add-isTty-and-remove-sigint-from-sentry

Conversation

@eablack
Copy link
Copy Markdown
Contributor

@eablack eablack commented Mar 30, 2026

Summary

Adds isTTY field to all telemetry events to help distinguish interactive terminal usage from CI/automation, and filters out SIGINT errors from Sentry since they represent user cancellations (Ctrl+C) rather than actual errors.

This change addresses thousands of daily "Received SIGINT" errors cluttering Sentry that are not actionable - they're simply users pressing Ctrl+C to cancel commands.

Additional improvements include fixes to the standalone installer script and documentation updates. Also, the Heroku logo has been updated to the more recent official one.

Type of Change

Feature Additions (minor semver update)

  • feat: Introduces a new feature to the codebase

Bug Fixes (patch semver update)

  • fix: Fixes a bug in the codebase

Changes

Telemetry Improvements

  • Added isTTY field to Telemetry interface to track process.stdin.isTTY
  • Captured isTTY in all telemetry creation points (setupTelemetry, reportCmdNotFound)
  • Added context.isTTY to CLIError interface for error context
  • Filter SIGINT errors in sendTelemetry() before calling sendToSentry() to prevent misleading "Successfully flushed to Sentry" messages
  • SIGINT errors still flow to Honeycomb for analytics purposes
  • Updated test fixtures to include isTTY field in mock Telemetry objects

Installer Improvements

  • Added mkdir -p /usr/local/bin to ensure directory exists before creating symlink
  • Fixed ~/.local/share/heroku/client to use $HOME instead of ~ for proper home directory expansion in sudo context

Documentation

  • Updated README.md Contributing section with clearer references to CONTRIBUTING.md and PR template

Testing

Notes:

  • The isTTY field will be true for interactive terminals, false/undefined for CI/scripts
  • SIGINT errors will no longer appear in Sentry but will still be tracked in Honeycomb
  • All other errors continue to flow to both Sentry and Honeycomb unchanged
  • All tests passing

Steps:

  1. Run CLI commands in interactive terminal and verify telemetry includes isTTY: true
  2. Run CLI commands in CI/script and verify telemetry includes isTTY: false/undefined
  3. Press Ctrl+C during a command and verify no error appears in Sentry
  4. Verify SIGINT still appears in Honeycomb telemetry
  5. Test standalone installer on systems with/without /usr/local/bin
  6. Passing CI suffices for verifying no regressions

Screenshots (if applicable)

N/A

- Add isTTY field to Telemetry interface to track interactive vs scripted usage
- Capture process.stdin.isTTY in all telemetry events (Honeycomb and Sentry)
- Add context.isTTY to CLIError for signal handlers
- Filter "Received SIGINT" errors from Sentry (user Ctrl+C is not an error)

This eliminates thousands of daily SIGINT noise errors in Sentry while
preserving the data in Honeycomb for analytics. The isTTY field enables
analysis of interactive terminal usage vs CI/automation patterns.
@eablack eablack requested a review from a team as a code owner March 30, 2026 20:18
- Move SIGINT filtering from Sentry beforeSend hook to sendTelemetry()
- SIGINT errors now only go to Honeycomb, not Sentry
- Fix type error: use data.context instead of data.isTTY in debug logs
- Eliminates misleading "Successfully flushed error to Sentry" message for SIGINT

This ensures sendToSentry() is never called for SIGINT errors, making
debug logs more accurate and avoiding unnecessary Sentry SDK operations.
Add missing isTTY field to mock Telemetry objects in test fixtures to match
the updated Telemetry interface. This fixes TypeScript compilation errors
after adding isTTY as a required field to the Telemetry interface.
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 20:59 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 20:59 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 20:59 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 20:59 — with GitHub Actions Inactive
- Add mkdir -p /usr/local/bin to ensure the directory exists before
  creating the heroku symlink (same as /usr/local/lib)
- Fix HOME directory cleanup to use $HOME instead of ~ to correctly
  reference the user's home directory when running with sudo (~ would
  expand to /root instead of the actual user's home)
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 23:07 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 23:07 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 23:07 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 23:07 — with GitHub Actions Inactive
Replace "Releasing" section with "Contributing" and update references to
point to CONTRIBUTING.md and PR template for better clarity.
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 23:08 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 23:08 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 23:08 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 23:08 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 23:55 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 30, 2026 23:55 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:08 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:08 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:10 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:10 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:10 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:10 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:13 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:13 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:13 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:13 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:21 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:21 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:21 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:21 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:25 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:25 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:25 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:25 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:27 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:27 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:27 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests March 31, 2026 00:27 — with GitHub Actions Inactive
Copy link
Copy Markdown
Contributor

@k80bowman k80bowman left a comment

Choose a reason for hiding this comment

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

Looks good!

@eablack eablack merged commit 74bbdfb into main Mar 31, 2026
17 checks passed
@eablack eablack deleted the eb/add-isTty-and-remove-sigint-from-sentry branch March 31, 2026 16:04
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.

2 participants