diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-01-12 15:41:22 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-01-12 15:41:22 +0100 |
commit | 355c341fe7c6b7c503386cf0b0e39cc02dbc8902 (patch) | |
tree | efb68612b2dd9858b0ae311d63e56bd075bafa74 /lib | |
parent | 587f850170a38e2642c0de76fb69efdeae930d66 (diff) | |
download | gitlab-ce-remove-application-frames-from-views.tar.gz |
Stop tracking call stacks for instrumented viewsremove-application-frames-from-views
Where a vew is called from doesn't matter as much. We already know what
action they belong to and this is more than enough information. By
removing the file/line number from the list of tags we should also be
able to reduce the number of series stored in InfluxDB.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/metrics.rb | 14 | ||||
-rw-r--r-- | lib/gitlab/metrics/subscribers/action_view.rb | 10 |
2 files changed, 1 insertions, 23 deletions
diff --git a/lib/gitlab/metrics.rb b/lib/gitlab/metrics.rb index 44356a0e42c..cdf7c168ff2 100644 --- a/lib/gitlab/metrics.rb +++ b/lib/gitlab/metrics.rb @@ -36,20 +36,6 @@ module Gitlab @pool end - # Returns a relative path and line number based on the last application call - # frame. - def self.last_relative_application_frame - frame = caller_locations.find do |l| - l.path.start_with?(RAILS_ROOT) && !l.path.start_with?(METRICS_ROOT) - end - - if frame - return frame.path.sub(PATH_REGEX, ''), frame.lineno - else - return nil, nil - end - end - def self.submit_metrics(metrics) prepared = prepare_metrics(metrics) diff --git a/lib/gitlab/metrics/subscribers/action_view.rb b/lib/gitlab/metrics/subscribers/action_view.rb index 7c0105d543a..2e9dd4645e3 100644 --- a/lib/gitlab/metrics/subscribers/action_view.rb +++ b/lib/gitlab/metrics/subscribers/action_view.rb @@ -33,16 +33,8 @@ module Gitlab def tags_for(event) path = relative_path(event.payload[:identifier]) - tags = { view: path } - file, line = Metrics.last_relative_application_frame - - if file and line - tags[:file] = file - tags[:line] = line - end - - tags + { view: path } end def current_transaction |