redis_prometheus 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f38638e623619cd951213c1335e7c47c060563e5
4
- data.tar.gz: 8b67bfe408c7b6999535f643ca6cbb277dd467ad
3
+ metadata.gz: 057c01c6b5674330724729626b61ea92d4dbed94
4
+ data.tar.gz: c593b85ae67eb4110232daca8d3bf18684afdad9
5
5
  SHA512:
6
- metadata.gz: d8e221182408749db2826d335616a25fe6667ed08f2244a6d1b1fe8b3063b31cb5a69a68a0a1a85b1272a9a121510734a1a7aeee0779a641e3ab1afaf9a6ba0a
7
- data.tar.gz: 21655a4dfaa171de13762ead30221d4e8c97c243de3496695005593419cd36b6d9fbcef805ccaa393af900c34bf0f35f45fb992baa6326f0f3a60bd04ae5f7fd
6
+ metadata.gz: f17669ba7f08c7e57cef7e25c80a4ab512c0ee7308bd72196599ccfe2822282fc2982ef404135d6a1980fbd36aa1b29f7baa738f7a99aa7dfc2d5b29455d5967
7
+ data.tar.gz: e99b4ce1fe12a2dd0a4a3702e9130ffc3c0aec8bde0dce9871e607173ba46a7bbd32bb245593e3671f4091a57e2253d2d28200bfe93bb661371c57dd62951241
@@ -74,6 +74,18 @@ module RedisPrometheus
74
74
  requests = Redis.current.get("http_request_server_errors_counter/#{ENV["REDIS_PROMETHEUS_SERVICE"]}") || 0
75
75
  response << "http_request_server_errors_counter{service=\"#{ENV["REDIS_PROMETHEUS_SERVICE"]}\"} #{requests.to_f}\n"
76
76
 
77
+ if defined?(Resque)
78
+ stats = Resque.info
79
+
80
+ response << "# TYPE http_request_queue_length gauge\n"
81
+ response << "# HELP http_request_queue_length The length of Resque's pending queues.\n"
82
+ response << "http_request_queue_length{service=\"#{ENV["REDIS_PROMETHEUS_SERVICE"]}\"} #{stats[:pending]}\n"
83
+
84
+ response << "# TYPE http_request_queue_failed gauge\n"
85
+ response << "# HELP http_request_queue_failed The length of Resque's failed queue.\n"
86
+ response << "http_request_queue_failed{service=\"#{ENV["REDIS_PROMETHEUS_SERVICE"]}\"} #{stats[:failed]}\n"
87
+ end
88
+
77
89
  headers['Content-Encoding'] = "gzip"
78
90
  headers['Content-Type'] = "text/plain"
79
91
  gzip = Zlib::GzipWriter.new(StringIO.new)
@@ -1,3 +1,3 @@
1
1
  module RedisPrometheus
2
- VERSION = "0.5.2"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_prometheus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-28 00:00:00.000000000 Z
11
+ date: 2018-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler