summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-08-28 15:21:05 +0200
committerJarka Kadlecova <jarka@gitlab.com>2017-08-28 15:21:34 +0200
commit7ba19ab620f5e89a6ff15df8603b315cd154bc6c (patch)
tree4fc98ff8e4a9fd0ec29d37259ef0680e101563f8
parent04c092b58d2fe68da10b6291955fd5fd50ac1877 (diff)
downloadgitlab-ce-7ba19ab620f5e89a6ff15df8603b315cd154bc6c.tar.gz
Instrument MergeRequest#ensure_ref_fetched36061-mr-ref
-rw-r--r--changelogs/unreleased/36061-mr-ref.yml5
-rw-r--r--config/initializers/8_metrics.rb3
2 files changed, 8 insertions, 0 deletions
diff --git a/changelogs/unreleased/36061-mr-ref.yml b/changelogs/unreleased/36061-mr-ref.yml
new file mode 100644
index 00000000000..039666070a7
--- /dev/null
+++ b/changelogs/unreleased/36061-mr-ref.yml
@@ -0,0 +1,5 @@
+---
+title: Instrument MergeRequest#ensure_ref_fetched
+merge_request:
+author:
+type: other
diff --git a/config/initializers/8_metrics.rb b/config/initializers/8_metrics.rb
index 2aeb94d47cd..370a976b64a 100644
--- a/config/initializers/8_metrics.rb
+++ b/config/initializers/8_metrics.rb
@@ -119,6 +119,9 @@ def instrument_classes(instrumentation)
# Needed for https://gitlab.com/gitlab-org/gitlab-ce/issues/30224#note_32306159
instrumentation.instrument_instance_method(MergeRequestDiff, :load_commits)
+
+ # Needed for https://gitlab.com/gitlab-org/gitlab-ce/issues/36061
+ instrumentation.instrument_instance_method(MergeRequest, :ensure_ref_fetched)
end
# rubocop:enable Metrics/AbcSize