Render CLI UI in monitor with tty
What does this MR do and why?
For the prototype of the Monitor I escape characters to avoid introducing a new dependency. Now that the monitor has gained some support and I learned that we already use tty
, I think it is time to use the tty
gem to manage the screen buffer.
With tty
we don't flood the terminal history with old "frames"
How to set up and validate locally
- Start the monitor:
rails runner scripts/internal_events/monitor.rb i_code_review_user_create_mr
- Trigger an event in the Rails console:
Gitlab::InternalEvents.track_event("i_code_review_user_create_mr", user: User.first, namespace: Namespace.last)
- Verify that the updated metrics and the new Snowplow are highlighted
- Exit the monitor:
ctrl+c
- Verify that the terminal buffer is left nice and clean
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Jonas Larsen