summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2018-01-29 12:33:08 +0100
committerPawel Chojnacki <pawel@chojnacki.ws>2018-01-29 15:13:05 +0100
commitd4c768ce09daac5f6bcfebae2313dc943961b356 (patch)
tree2cdf2e11cb9dd27463f73ec1f6638e28420ba059 /lib
parent098cf7d257b5767625ed052b2f442cb216261daa (diff)
downloadgitlab-ce-d4c768ce09daac5f6bcfebae2313dc943961b356.tar.gz
Rename Concern -> Methods41771-reduce-cardinality-of-metrics
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/gitaly_client.rb2
-rw-r--r--lib/gitlab/metrics/influx_db.rb2
-rw-r--r--lib/gitlab/metrics/method_call.rb2
-rw-r--r--lib/gitlab/metrics/methods.rb (renamed from lib/gitlab/metrics/concern.rb)2
-rw-r--r--lib/gitlab/metrics/methods/metric_options.rb (renamed from lib/gitlab/metrics/concern/metric_options.rb)2
-rw-r--r--lib/gitlab/metrics/subscribers/action_view.rb2
-rw-r--r--lib/gitlab/metrics/subscribers/active_record.rb2
-rw-r--r--lib/gitlab/metrics/transaction.rb2
8 files changed, 8 insertions, 8 deletions
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb
index 583ef1c19e1..c5d3e944f7d 100644
--- a/lib/gitlab/gitaly_client.rb
+++ b/lib/gitlab/gitaly_client.rb
@@ -6,7 +6,7 @@ require 'grpc/health/v1/health_services_pb'
module Gitlab
module GitalyClient
- include Gitlab::Metrics::Concern
+ include Gitlab::Metrics::Methods
module MigrationStatus
DISABLED = 1
OPT_IN = 2
diff --git a/lib/gitlab/metrics/influx_db.rb b/lib/gitlab/metrics/influx_db.rb
index d64a60245db..66f30e3b397 100644
--- a/lib/gitlab/metrics/influx_db.rb
+++ b/lib/gitlab/metrics/influx_db.rb
@@ -2,7 +2,7 @@ module Gitlab
module Metrics
module InfluxDb
extend ActiveSupport::Concern
- include Gitlab::Metrics::Concern
+ include Gitlab::Metrics::Methods
EXECUTION_MEASUREMENT_BUCKETS = [0.001, 0.01, 0.1, 1].freeze
diff --git a/lib/gitlab/metrics/method_call.rb b/lib/gitlab/metrics/method_call.rb
index b0a37b8a4eb..b11520a79bb 100644
--- a/lib/gitlab/metrics/method_call.rb
+++ b/lib/gitlab/metrics/method_call.rb
@@ -4,7 +4,7 @@ module Gitlab
module Metrics
# Class for tracking timing information about method calls
class MethodCall
- include Gitlab::Metrics::Concern
+ include Gitlab::Metrics::Methods
BASE_LABELS = { module: nil, method: nil }.freeze
attr_reader :real_time, :cpu_time, :call_count, :labels
diff --git a/lib/gitlab/metrics/concern.rb b/lib/gitlab/metrics/methods.rb
index 35119611a65..cd7c1e507f7 100644
--- a/lib/gitlab/metrics/concern.rb
+++ b/lib/gitlab/metrics/methods.rb
@@ -2,7 +2,7 @@
module Gitlab
module Metrics
- module Concern
+ module Methods
extend ActiveSupport::Concern
included do
diff --git a/lib/gitlab/metrics/concern/metric_options.rb b/lib/gitlab/metrics/methods/metric_options.rb
index 1f860b9b77f..70e122d4e15 100644
--- a/lib/gitlab/metrics/concern/metric_options.rb
+++ b/lib/gitlab/metrics/methods/metric_options.rb
@@ -1,6 +1,6 @@
module Gitlab
module Metrics
- module Concern
+ module Methods
class MetricOptions
SMALL_NETWORK_BUCKETS = [0.005, 0.01, 0.1, 1, 10].freeze
diff --git a/lib/gitlab/metrics/subscribers/action_view.rb b/lib/gitlab/metrics/subscribers/action_view.rb
index ce724040bc5..274436ca2b4 100644
--- a/lib/gitlab/metrics/subscribers/action_view.rb
+++ b/lib/gitlab/metrics/subscribers/action_view.rb
@@ -3,7 +3,7 @@ module Gitlab
module Subscribers
# Class for tracking the rendering timings of views.
class ActionView < ActiveSupport::Subscriber
- include Gitlab::Metrics::Concern
+ include Gitlab::Metrics::Methods
define_histogram :gitlab_view_rendering_duration_seconds do
docstring 'View rendering time'
base_labels Transaction::BASE_LABELS.merge({ path: nil })
diff --git a/lib/gitlab/metrics/subscribers/active_record.rb b/lib/gitlab/metrics/subscribers/active_record.rb
index ff6542f6e00..4b3e8d0a6a0 100644
--- a/lib/gitlab/metrics/subscribers/active_record.rb
+++ b/lib/gitlab/metrics/subscribers/active_record.rb
@@ -3,7 +3,7 @@ module Gitlab
module Subscribers
# Class for tracking the total query duration of a transaction.
class ActiveRecord < ActiveSupport::Subscriber
- include Gitlab::Metrics::Concern
+ include Gitlab::Metrics::Methods
attach_to :active_record
def sql(event)
diff --git a/lib/gitlab/metrics/transaction.rb b/lib/gitlab/metrics/transaction.rb
index 5a1f6de92ee..45b9e14ba55 100644
--- a/lib/gitlab/metrics/transaction.rb
+++ b/lib/gitlab/metrics/transaction.rb
@@ -2,7 +2,7 @@ module Gitlab
module Metrics
# Class for storing metrics information of a single transaction.
class Transaction
- include Gitlab::Metrics::Concern
+ include Gitlab::Metrics::Methods
# base labels shared among all transactions
BASE_LABELS = { controller: nil, action: nil }.freeze