Skip to content

Commit

Permalink
Logging to get a better idea why request queue times are higher
Browse files Browse the repository at this point in the history
  • Loading branch information
bjonord committed Aug 29, 2024
1 parent 57ec644 commit 95e4e1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/request_queue_time/middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ class Metrics
def initialize(env)
@network_time = env["puma.request_body_wait"].to_i
@request_start = env["HTTP_X_REQUEST_START"]

@now = Time.now
Rails.logger.info("Network Time: #{@network_time}; Request Start: #{@request_start.to_i}; Now: #{@now.to_i}; Started At: #{started_at.to_i}")
@request_size = env["rack.input"].respond_to?(:size) ? env["rack.input"].size : 0
end

Expand Down

0 comments on commit 95e4e1c

Please sign in to comment.