Log measurements for project Import export services

Merged Nikola Milojevic requested to merge 21300-log-measurement-for-services into master

This MR will move Gitlab::Utils::Measuring module to the service layer, and it will enable us to measure and log service execution in structured (JSON) format in the new log file service_measurement.log.

It will enable measuring for:

  • Projects::ImportExport::ExportService - it will be behind the feature flag measure_project_export_service
  • Projects::ImportService - it will be behind the feature flag measure_project_import_service
  • Projects::CreateService - it will be behind the feature flag measure_project_create_service

Since measuring is behind Gitlab::Measurable module, it can be easily adapted to monitor any service that prepend Gitlab::Measurable module.

With this, we should be able to take measurements of import and export via our performance CI pipeline, which is currently based on API integration.

Since we will use a structured JSON log instead of logging plain text to stdout, these logs could be indexed by Kibana...

Related to: #213100 (closed)


Note This MR introduces new service_measurement.log file:

Edited by 🤖 GitLab Bot 🤖