feat: add isTTY context to telemetry and filter SIGINT from Sentry#3632
Merged
feat: add isTTY context to telemetry and filter SIGINT from Sentry#3632
Conversation
- 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.
- 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.
- 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)
Replace "Releasing" section with "Contributing" and update references to point to CONTRIBUTING.md and PR template for better clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
isTTYfield 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)
Bug Fixes (patch semver update)
Changes
Telemetry Improvements
isTTYfield toTelemetryinterface to trackprocess.stdin.isTTYisTTYin all telemetry creation points (setupTelemetry,reportCmdNotFound)context.isTTYtoCLIErrorinterface for error contextsendTelemetry()before callingsendToSentry()to prevent misleading "Successfully flushed to Sentry" messagesisTTYfield in mock Telemetry objectsInstaller Improvements
mkdir -p /usr/local/binto ensure directory exists before creating symlink~/.local/share/heroku/clientto use$HOMEinstead of~for proper home directory expansion in sudo contextDocumentation
Testing
Notes:
isTTYfield will betruefor interactive terminals,false/undefinedfor CI/scriptsSteps:
isTTY: trueisTTY: false/undefined/usr/local/binScreenshots (if applicable)
N/A