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 +4 -4
- data/README.md +14 -1
- data/gemfiles/sidekiq_3.3.1.gemfile.lock +1 -1
- data/gemfiles/sidekiq_3.x.gemfile.lock +1 -1
- data/gemfiles/sidekiq_4.x.gemfile.lock +1 -1
- data/gemfiles/sidekiq_5.x.gemfile.lock +1 -1
- data/lib/sidekiq/prometheus/exporter.rb +9 -0
- data/lib/sidekiq/prometheus/exporter/exporters.rb +4 -1
- data/lib/sidekiq/prometheus/exporter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec16fe52b1993a1ebe0197a64a6a97863ea3540c
|
4
|
+
data.tar.gz: 4d232882329ca1318c8ce5509c39eba890286e3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
@@ -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
|