Skip to content

Resolve "Instrumentation for timing of mergeability checks"

What does this MR do and why?

We would like to have more information about the different mergability checks we do, and to see which would be more suited to add caching for. This is behind a feature flag.

To Test:

Turn on the feature flag mergeability_checks_logger

Open up log/application_json.log and load a merge request page.

The log should have the service information:

{"severity":"INFO","time":"2022-08-30T10:50:49.111Z","correlation_id":"01GBQ603AYBYQH82ZJAJ00ETDY","mergeability_caller":"GraphqlController#execute","project_id":6,"merge_request_id":3753,"MergeRequests::Mergeability::CheckApprovedService_duration_s":{"count":2,"min":0.0006549999816343188,"max":0.07547799998428673,"avg":0.03806649998296052},"MergeRequests::Mergeability::CheckApprovedService_db_count":{"count":1,"min":10,"max":10,"avg":10},"MergeRequests::Mergeability::CheckApprovedService_db_cached_count":{"count":1,"min":2,"max":2,"avg":2},"MergeRequests::Mergeability::CheckApprovedService_db_primary_count":{"count":1,"min":10,"max":10,"avg":10},"MergeRequests::Mergeability::CheckApprovedService_db_main_count":{"count":1,"min":10,"max":10,"avg":10},"MergeRequests::Mergeability::CheckApprovedService_db_primary_cached_count":{"count":1,"min":2,"max":2,"avg":2},"MergeRequests::Mergeability::CheckApprovedService_db_main_cached_count":{"count":1,"min":2,"max":2,"avg":2},"MergeRequests::Mergeability::CheckApprovedService_db_primary_duration_s":{"count":1,"min":0.045,"max":0.045,"avg":0.045},"MergeRequests::Mergeability::CheckApprovedService_db_main_duration_s":{"count":1,"min":0.045,"max":0.045,"avg":0.045}}

Related to #342333 (closed)

Edited by Marc Shaw

Merge request reports