Commit 3c785a76 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Send data to InfluxDB instead of stdout

parent 897273d1
...@@ -10,11 +10,13 @@ module Gitlab ...@@ -10,11 +10,13 @@ module Gitlab
end end
def call(env) def call(env)
proxy_start = env['HTTP_GITLAB_WORHORSE_PROXY_START'].to_f / 1_000_000_000 trans = Gitlab::Metrics.current_transaction
if proxy_start > 0 proxy_start = env['HTTP_GITLAB_WORHORSE_PROXY_START'].presence
# send measurement if trans && proxy_start
puts "\n\n\n#{(Time.now - proxy_start).to_f}\n\n\n" # Time in milliseconds since gitlab-workhorse started the request
trans.set(:proxy_flight_time, Time.now.to_f * 1_000 - proxy_start.to_f / 1_000_000)
end end
@app.call(env) @app.call(env)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment