-
Rodrigo Tomonari authored
This commit introduces instrumentation for exclusive locks within the modules `Gitlab::ExclusiveLeaseGuard` and `Gitlab::ExclusiveLeaseHelpers`, enabling better monitoring and visibility into lock usage. When utilizing the `Gitlab::ExclusiveLeaseHelpers#in_lock` method, the following metrics are now tracked: - exclusive_lock_count` - exclusive_lock_wait_duration_s - exclusive_lock_hold_duration_s Similarly, when using the `Gitlab::ExclusiveLeaseHelpers#try_obtain_lease` method, the following metrics are captured: - exclusive_lock_count - exclusive_lock_hold_duration_s Notably, in the latter method, `exclusive_lock_wait_duration_s` is not captured as the method returns immediately if the lease is already held, thus no waiting time is incurred.
Rodrigo Tomonari authoredThis commit introduces instrumentation for exclusive locks within the modules `Gitlab::ExclusiveLeaseGuard` and `Gitlab::ExclusiveLeaseHelpers`, enabling better monitoring and visibility into lock usage. When utilizing the `Gitlab::ExclusiveLeaseHelpers#in_lock` method, the following metrics are now tracked: - exclusive_lock_count` - exclusive_lock_wait_duration_s - exclusive_lock_hold_duration_s Similarly, when using the `Gitlab::ExclusiveLeaseHelpers#try_obtain_lease` method, the following metrics are captured: - exclusive_lock_count - exclusive_lock_hold_duration_s Notably, in the latter method, `exclusive_lock_wait_duration_s` is not captured as the method returns immediately if the lease is already held, thus no waiting time is incurred.
Loading