Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2015-12-29 15:40:42 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2015-12-29 16:53:45 +0300
commit620e7bb3d60c3685b494b26e256b793a47621da4 (patch)
tree68291922508c3ea49ffa16f0f8c3bd92d2489ae3 /lib/gitlab/metrics/sidekiq_middleware.rb
parent03478e6d5b98a723fbb349dac2c8495f75909a08 (diff)
Write to InfluxDB directly via UDP
This removes the need for Sidekiq and any overhead/problems introduced by TCP. There are a few things to take into account: 1. When writing data to InfluxDB you may still get an error if the server becomes unavailable during the write. Because of this we're catching all exceptions and just ignore them (for now). 2. Writing via UDP apparently requires the timestamp to be in nanoseconds. Without this data either isn't written properly. 3. Due to the restrictions on UDP buffer sizes we're writing metrics one by one, instead of writing all of them at once.
Diffstat (limited to 'lib/gitlab/metrics/sidekiq_middleware.rb')
-rw-r--r--lib/gitlab/metrics/sidekiq_middleware.rb7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/gitlab/metrics/sidekiq_middleware.rb b/lib/gitlab/metrics/sidekiq_middleware.rb
index ec10707d1fb..ad441decfa2 100644
--- a/lib/gitlab/metrics/sidekiq_middleware.rb
+++ b/lib/gitlab/metrics/sidekiq_middleware.rb
@@ -5,13 +5,6 @@ module Gitlab
# This middleware is intended to be used as a server-side middleware.
class SidekiqMiddleware
def call(worker, message, queue)
- # We don't want to track the MetricsWorker itself as otherwise we'll end
- # up in an infinite loop.
- if worker.class == MetricsWorker
- yield
- return
- end
-
trans = Transaction.new
begin