rack-queue-metrics 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZGM2N2FlNzhmYmZlYWI4ZmVlNTYwOTYzZDVhODljZTUzZTJjYWI3NQ==
4
+ MjliYTU3ZTUxNmM4NmMxMjUxYWUwNGU1ODI5N2E2OWNkYjM2YzQ5Mg==
5
5
  data.tar.gz: !binary |-
6
- ZGNiZGRlMjAwM2QxNDJhZjAzMWM5OGQ0YzEwOTE2MmE3ZDZiMjQ2ZQ==
6
+ MzQ3ZTkwZGQ4MDE1MjY1NjU1NjZhMzRmNTdmMjc3NTI0NTQ2YWQwNQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ODQ1ZmI1MjU2MDBhZDI0Y2FkNmFmN2EwMDg0ZGFjOWVkNDM1YWY0NjIyN2Y1
10
- NmRkNTI5MTBkOWY5YzI5MGMxMGM3MGU4ZjQ1YTYwODk5MDdmM2NhMGYyZjZh
11
- ZDMwNWM4OWI2MjVhMzY3ZmU5MTVjOGJmM2MxYWUxMGM2NmY0Mjk=
9
+ ZTMzMTY3MDI0MWUxM2UxYjkxMmFhNjI0ZTRlOGZkYThkYzg4NDVhNzg5YjVj
10
+ M2U2M2E5MDc0M2EyYjNkOTRjYTEyNjdiMjUwMjVmYmFiNDkxZTA0NmM5N2Rh
11
+ MDY1NjUyN2RkMzcwOWM2NzdmODM2YmQwNjU0ZTg4MmM2Y2M0Yzc=
12
12
  data.tar.gz: !binary |-
13
- Y2I3ZGFjOTkyZDZjMmUxMDYyMmJiNjZmNDVlYTY3OWYxNjcwYWJmNTA3MjZm
14
- OTQ5YjJiZDdhNTg4MTJhMzQ2ZDZmOGNkZmVmNDRkYzNkN2JkYjQwOGIzMTU4
15
- ZGEzNjYwYzYzODEzMDQ2NTY2M2YzYzI4YTVjOWMyMTYwZjEyZjQ=
13
+ ZTExOTcyZTNhYzkzZmE1MDRiY2E1MTY0OTMwZDdmYjg0Y2Y1NzgyZTE0NWRh
14
+ ZDQwMDY4YTNiMjFjNmI0NzQ5ZTEzYmZjMDIwMDE0NDQ1OTdiNjgyMzFhZDgw
15
+ YmFkMjUwZDQ4Y2U1MmYwNzQ5Y2M2MDFkZGRjNjljY2U0Mzc0YzQ=
@@ -17,7 +17,7 @@ module Rack
17
17
  status, headers, body = @app.call(env)
18
18
 
19
19
  stats[:addr] = IPSocket.getaddress(Socket.gethostname).to_s + ':'+ENV['PORT']
20
- stats[:queue_time] = headers['X-Request-Start'] ? (start_time - headers['X-Request-Start'].to_f).round : 0
20
+ stats[:queue_time] = env["HTTP_X_REQUEST_START"] ? (start_time - env["HTTP_X_REQUEST_START"].to_f).round : 0
21
21
 
22
22
  puts "at=metric measure=rack.queue-metrics addr=#{stats[:addr]} queue_time=#{stats[:queue_time]} queue_depth=#{stats[:requests][:queued]}"
23
23
  ActiveSupport::Notifications.instrument("rack.queue-metrics", stats) if defined?(ActiveSupport::Notifications)
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module QueueMetrics
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-queue-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - dominic (Dominic Dagradi)