Add Project Export granular exporter timings

mentions #356957 (closed)

What does this MR do and why?

This MR adds granular exporter timings to the Project Export Service in order to have a better visibility into how long individual exporters take, so that it helps with debugging and gives us ideas into where and how to improve its performance.

Log example:

{
{
  "severity": "INFO",
  "time": "2022-04-05T15:05:00.454Z",
  "retry": 0,
  "queue": "default",
  "backtrace": 5,
  "version": 0,
  "dead": false,
  "status_expiration": 21600,
  "args": [
    "1",
    "596"
  ],
  "class": "ProjectExportWorker",
...
  "extra.project_export_worker.version_saver_duration_s": 0.001476,
  "extra.project_export_worker.avatar_saver_duration_s": null,
  "extra.project_export_worker.tree_saver_duration_s": 0.378151,
  "extra.project_export_worker.uploads_saver_duration_s": 0.002553,
  "extra.project_export_worker.repo_saver_duration_s": 0.149198,
  "extra.project_export_worker.wiki_repo_saver_duration_s": null,
  "extra.project_export_worker.lfs_saver_duration_s": 0.00383,
  "extra.project_export_worker.snippets_repo_saver_duration_s": 0.002391,
  "extra.project_export_worker.design_repo_saver_duration_s": null,
  "duration_s": 1.136254,
  "completed_at": "2022-04-05T15:05:00.454Z",
  "load_balancing_strategy": "primary",
  "db_duration_s": 0.089287
}

}

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

  1. Create a new project
  2. Export newly created project and observe the logfile tail -f log/importer.log
  3. Verify exporter timing loglines are present

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by George Koltsov

Merge request reports

Loading