Skip to content
代码片段 群组 项目
未验证 提交 884cca9e 编辑于 作者: Rodrigo Tomonari's avatar Rodrigo Tomonari 提交者: GitLab
浏览文件

Enhance observability for exclusive locks

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.
上级 1163fcbd
No related branches found
No related tags found
加载中
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册