Log Optimistic Locks with retries
What does this MR do?
Uses structured logging for gathering info on Optimistic Locks which were not able to succeed without retries.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
The new log records may be observed in log/service_measurement.log
when calling bin/spring rspec spec/lib/gitlab/optimistic_locking_spec.rb
if to drop any expectations for the logger (so it would call the original).
Example log/service_measurement.log
:
{"severity":"INFO","time":"...","correlation_id":"...","message":"Optimistic Lock released with retries","name":...,"retries":1,"time_s":0.099343}
{"severity":"INFO","time":"...","correlation_id":"...","message":"Optimistic Lock released with retries","name":"...","retries":1,"time_s":0.010951}
Security
N/A
Related to #322125 (closed)
Edited by Aleksei Lipniagov