sidekiq-prometheus-exporter 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 158112bb6619ff47bb38fd43801aaa1a01c95103
4
- data.tar.gz: 99c35a1b67a403f17ee15eb4f576dcc6e30f8930
3
+ metadata.gz: ec16fe52b1993a1ebe0197a64a6a97863ea3540c
4
+ data.tar.gz: 4d232882329ca1318c8ce5509c39eba890286e3a
5
5
  SHA512:
6
- metadata.gz: a5a4dcd286f353895888195d80e1a2c59a9142dc6a81e6b891d07cab307880e567a787892aa902a0bae7c549409663d9c56bfeb85ffffcc30e3e256a141356c7
7
- data.tar.gz: 3fe0b5c64ff492697c149a13c68aea5fe0cad985d0e78c898047b2b6b876fb6fe559e3741114012aba377f66fab9dc993acf85570b0dbb7862c707c23c13ed6f
6
+ metadata.gz: c9677f43e862ee9dd0f8a59b09f3de2374d2b61dad95be7e4d23fa48ab52030fa6133192a47eac47337ac86f9c81c75d6a1289a885498b3886d1b283961a7e3f
7
+ data.tar.gz: 56a7c8ee6f3c09a1d4c8c6cedd44190897c8af250806132abf392fd2590b7ff139860c81101866c33ef110e758793d71d2940d8a14f3f39d9077e874047f8278
data/README.md CHANGED
@@ -52,7 +52,7 @@ Open [dashboard example file](/examples/sidekiq.json), then open `https://<your
52
52
  Add this line to your application's Gemfile:
53
53
 
54
54
  ```ruby
55
- gem 'sidekiq-prometheus-exporter'
55
+ gem 'sidekiq-prometheus-exporter', '~> 0.1'
56
56
  ```
57
57
 
58
58
  And then execute:
@@ -126,6 +126,19 @@ Sidekiq::Prometheus::Exporter.configure do |config|
126
126
  end
127
127
  ```
128
128
 
129
+ # Tips&Tricks
130
+
131
+ If you want to see at the exporter startup time a banner about which exporters
132
+ are enabled add this call to your `config.ru` (but after exporter `configure` statement)
133
+
134
+ ```ruby
135
+ require 'sidekiq/prometheus/exporter'
136
+
137
+ puts Sidekiq::Prometheus::Exporter.banner
138
+ ```
139
+
140
+ :anger: if you don't see your banner try to output into `STDERR` instead of `STDOUT`
141
+
129
142
  ## Contributing
130
143
 
131
144
  Bug reports and pull requests to support earlier versions of Sidekiq are welcome on GitHub at https://github.com/Strech/sidekiq-prometheus-exporter/issues.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- sidekiq-prometheus-exporter (0.1.10)
4
+ sidekiq-prometheus-exporter (0.1.11)
5
5
  sidekiq (>= 3.3.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- sidekiq-prometheus-exporter (0.1.10)
4
+ sidekiq-prometheus-exporter (0.1.11)
5
5
  sidekiq (>= 3.3.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- sidekiq-prometheus-exporter (0.1.10)
4
+ sidekiq-prometheus-exporter (0.1.11)
5
5
  sidekiq (>= 3.3.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- sidekiq-prometheus-exporter (0.1.10)
4
+ sidekiq-prometheus-exporter (0.1.11)
5
5
  sidekiq (>= 3.3.1)
6
6
 
7
7
  GEM
@@ -15,6 +15,15 @@ module Sidekiq
15
15
  EXPORTERS = Exporters.new
16
16
 
17
17
  class << self
18
+ def banner
19
+ exporters =
20
+ EXPORTERS.enabled
21
+ .map { |klass| " - #{klass.name.split('::').last.downcase}" }
22
+ .join("\n".freeze)
23
+
24
+ "Enabled Sidekiq Prometheus exporters:\n#{exporters}"
25
+ end
26
+
18
27
  def configure
19
28
  yield(EXPORTERS)
20
29
  end
@@ -10,9 +10,12 @@ module Sidekiq
10
10
  class Exporters
11
11
  AVAILABLE_EXPORTERS = {
12
12
  standard: Sidekiq::Prometheus::Exporter::Standard,
13
- cron: Sidekiq::Prometheus::Exporter::Cron
13
+ cron: Sidekiq::Prometheus::Exporter::Cron,
14
+ scheduler: Sidekiq::Prometheus::Exporter::Scheduler
14
15
  }.freeze
15
16
 
17
+ attr_reader :enabled
18
+
16
19
  def initialize
17
20
  @enabled = AVAILABLE_EXPORTERS.values.select(&:available?)
18
21
  end
@@ -3,7 +3,7 @@
3
3
  module Sidekiq
4
4
  module Prometheus
5
5
  module Exporter
6
- VERSION = '0.1.10'.freeze
6
+ VERSION = '0.1.11'.freeze
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-prometheus-exporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Fedorov