Improve telemetry for RSpec setup time by adding timeout and GitLab commit SHA

Context

In !192582 (merged), two suggestions came up during review:

  • @kkloss started a discussion:

    suggestion (non-blocking): do we want to use the timeout gem just in the unlikely case that GDK gets stuck?

  • @kkloss started a discussion:

    suggestion (non-blocking): this would require more work in GDK but do we want to eventually also track the current GitLab commit SHA to catch outliers?

These suggestions help prevent telemetry from hanging tests and make it easier to identify which commits may cause slow RSpec setup times.

Proposal

  • Add timeout to gdk send-telemetry command to avoid hanging
  • Add support for --extra=key:value arguments to include GitLab commit SHA when sending telemetry for RSpec setup time

Expected outcome

  • Telemetry for RSpec setup time won't hang if GDK command gets stuck
  • Telemetry includes GitLab commit SHA to help identify which commits cause slow setup times
Edited by Nao Hashizume