twemproxy_exporter 0.2.1 → 0.3.1

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: 5bfeb8fee3eea74f8f84daed5f2a195b475f9464e9b0340934d77015183975f9
4
- data.tar.gz: 126b0bdd8322d4cc9ff83f3928c6fc3c5f061922504b82a72140f547c216d048
3
+ metadata.gz: 6c526524a297bbd8e6ec6756d36277d134c2099071ba8ff3134c37af63e61954
4
+ data.tar.gz: 971989dceffd599097d2ff3d07a87b8c2cc878d590f174716bf719eb2f2d076a
5
5
  SHA512:
6
- metadata.gz: 689af6028e2cda1e8d2456dc8f656239a1f2d3fbe26b39559a0a7e666d83dace4634d5cdca7f1ada6ce324a6bf6227b3636cacd5808130e230e98eb7ed1beb2c
7
- data.tar.gz: 8735a787319ae98be6edb54d58cc85da732d02aae8d0966cd6f18a8487ca0712a719e77542ba2287266ed51b547cff954afe6730311d64468b492c201a69d2f4
6
+ metadata.gz: 44c1cf6c4e423d569b4b7b046cfcb08b354da23431861852f4aac774f6e3b7f2d6aa56a31238f530f40cedcd5cf0b4c71f14edab9786eaca2d6ab9142d2fce08
7
+ data.tar.gz: a08c9480dcb77c88616b247bb409eb8096b4298a5cc50e5a4156d401761f0e7770144a1d8741fbb9f1a54cbd461a7f6575e9221f26db368d2eedd33b494c2d16
data/.gitignore CHANGED
@@ -29,8 +29,8 @@ build/
29
29
  # for a library or gem, you might want to ignore these files since the code is
30
30
  # intended to run in multiple environments; otherwise, check them in:
31
31
  Gemfile.lock
32
- # .ruby-version
33
- # .ruby-gemset
32
+ .ruby-version
33
+ .ruby-gemset
34
34
 
35
35
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
36
36
  .rvmrc
data/.travis.yml CHANGED
@@ -5,4 +5,4 @@ rvm:
5
5
  - 2.3.1
6
6
  - 2.4.0
7
7
  - 3.4.7 # Most recent Ruby release
8
- before_install: gem install bundler -v 2.1
8
+ before_install: gem install bundler -v 2.7.2
@@ -16,7 +16,8 @@ module TwemproxyExporter
16
16
  def count
17
17
  stats = self.stats
18
18
  name = stats['source']
19
- labels = {twemproxy: name}
19
+ proxy = "#{@host}:#{@port}"
20
+ labels = {twemproxy: name, proxy: proxy}
20
21
 
21
22
  @exporter.total_connections.count stats['total_connections'], labels
22
23
  @exporter.curr_connections.count stats['curr_connections'], labels
@@ -24,7 +25,7 @@ module TwemproxyExporter
24
25
 
25
26
  stats.each do |cluster, cinfo|
26
27
  next unless cinfo.is_a? Hash
27
- labels = {twemproxy: name, cluster: cluster}
28
+ labels = {twemproxy: name, proxy: proxy, cluster: cluster}
28
29
 
29
30
  @exporter.fragments.count cinfo['fragments'], labels
30
31
  @exporter.forward_error.count cinfo['forward_error'], labels
@@ -35,7 +36,7 @@ module TwemproxyExporter
35
36
 
36
37
  cinfo.each do |server, sinfo|
37
38
  next unless sinfo.is_a? Hash
38
- labels = {twemproxy: name, cluster: cluster, server: server}
39
+ labels = {twemproxy: name, proxy: proxy, cluster: cluster, server: server}
39
40
 
40
41
  @exporter.in_queue.count sinfo['in_queue'], labels
41
42
  @exporter.in_queue_bytes.count sinfo['in_queue_bytes'], labels
@@ -1,3 +1,3 @@
1
1
  module TwemproxyExporter
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twemproxy_exporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Burk