prometheus_exporter 0.4.11 → 0.4.12

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
  SHA256:
3
- metadata.gz: 3aacb5796a775ab5ed7c872419b7ac5c7726a0117b4e7d7bfc5c5048735b412f
4
- data.tar.gz: f32c2d1bb20ce8c0385a9502ca547cb212c84057f7b22c67cd8380ef5e9fcc19
3
+ metadata.gz: 675e7d70e60c829a7b7d1a062300f23f37ae4b7ec9c413a59e172c0c244abbbc
4
+ data.tar.gz: bdf19d92ec159ede770f0166b658b397f21a63c4b946ec0cdf91af902db1dd1b
5
5
  SHA512:
6
- metadata.gz: 82c365e49940fdcb8e75f1645a96816d0e84157a7dbe8988421e0852f3059d90e7ad54fc5c1ee718665a256b96b2c9e7229a18082666c7275e6620f69f73926f
7
- data.tar.gz: 2a703b4d52c22d0a08e7ae0df5f66abed1d2e9487ebbf659bda5feefd9fdb7d61968bae3d634535991ce128c5f1d09095772d8947ea8f4d7694559142e7bdb5c
6
+ metadata.gz: e8072bc72646c5c06e8029605d76fca0e075ec99651ae0c158b4a9989d6d4a43366ca0ef5e4398168718e07f1fde9888d7b8050499ca24da44255d9ca5fccf72
7
+ data.tar.gz: 4aba5c0791a2aaed035cf42bc091b58fc4d54619ce4e815c3511e332fbda99779c6e1ee2624e78d0bae10f1e0ce6d911f859f0fe7782b9b46fa726742aa80457
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ 0.4.12 - 30-05-2019
2
+
3
+ - Fix: unicorn collector reporting incorrect number of unicorn workers
4
+
1
5
  0.4.11 - 15-05-2019
2
6
 
3
7
  - Fix: Handle stopping nil worker_threads in Client
@@ -51,13 +51,13 @@ module PrometheusExporter::Instrumentation
51
51
 
52
52
  def worker_process_count
53
53
  return nil unless File.exist?(@pid_file)
54
- pid = File.read(@pid_file)
54
+ pid = File.read(@pid_file).to_i
55
55
 
56
- return nil unless pid && pid.to_i > 0
56
+ return nil if pid < 1
57
57
 
58
58
  # find all processes whose parent is the unicorn master
59
59
  # but we're actually only interested in the number of processes (= lines of output)
60
- result = `ps --no-header -o pid --ppid #{pid}`
60
+ result = `pgrep -P #{pid} -f unicorn -a`
61
61
  result.lines.count
62
62
  end
63
63
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PrometheusExporter
4
- VERSION = "0.4.11"
4
+ VERSION = "0.4.12"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prometheus_exporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.11
4
+ version: 0.4.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-15 00:00:00.000000000 Z
11
+ date: 2019-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop