Extend telemetry to capture RSpec setup time

Overview

We track overall RSpec runtime, but we don't have visibility into how long each phase of a test takes, especially the setup time.

Problem Statement

Right now, we can't see how much time is spent setting up tests in RSpec. This makes it difficult to identify bottlenecks and prioritize improvements.

Goal

Add telemetry to capture RSpec setup duration. This will show us what's slow and where optimizations like precompiled binaries could help.

Proposal

Use the gdk telemetry send <metric> <value> command in GitLab monolith to report RSpec setup duration. This should only run when:

  • Specs are running in GitLab monolith
  • The environment is within a GDK directory and the gdk command is available

Impacted categories

The following categories relate to this issue:

Edited by Nao Hashizume