sidekiq-prometheus-exporter 0.1.4 → 0.1.6

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: 60af66510c06ea586d62aa9dfeaa490e36fa74bf
4
- data.tar.gz: eaa84891b649241bd6c503c830d2592c81517f01
3
+ metadata.gz: e34b57cc90f74e85adc6b4129a25f449973e919a
4
+ data.tar.gz: 653460d080a72bdb0c88117372f0818b93c84af9
5
5
  SHA512:
6
- metadata.gz: 7da96cc5b223bcc09bc0d8e2dd6a73f788104f9472e8107e012197336a2ccab94ebec300a375fc0178b9a9e8522c3f988aff6f062245c4c7a933d357d67be636
7
- data.tar.gz: 938191a8e3eb2fab43543a0b409e970f29b1b703fd98ef8f426534a7a7d08913fa5ebfa6fd2b9341570728a70728936b10f84f54c5f78cd7c3d258925fb9a06b
6
+ metadata.gz: 500b523d74606440583624a3caee8103251be629beced6d934a18c270c221b74f025fabba5e25f6fa3b62a5dfb90cc025690c30ba963cab960049cd6fb40762a
7
+ data.tar.gz: f707f0a1f54204c545897e3ee4d5cd009215217d832f1fad74cdf259f50bbdd6fe8f2057ee4c07f3592432e081644b0bfd6a4c2acdfbb5db8066b843b54117c0
data/.gitignore CHANGED
@@ -11,3 +11,6 @@
11
11
 
12
12
  # rspec failure tracking
13
13
  .rspec_status
14
+
15
+ # MacOs
16
+ .DS_Store
data/.travis.yml CHANGED
@@ -1,10 +1,10 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.2.9
5
- - 2.3.6
6
- - 2.4.3
7
- - 2.5.0
4
+ - 2.2.10
5
+ - 2.3.7
6
+ - 2.4.4
7
+ - 2.5.1
8
8
  gemfile:
9
9
  - gemfiles/sidekiq_3.3.1.gemfile
10
10
  - gemfiles/sidekiq_3.x.gemfile
@@ -15,6 +15,6 @@ addons:
15
15
  repo_token: $CODECLIMATE_REPO_TOKEN
16
16
 
17
17
  cache: bundler
18
- before_install: gem install bundler -v 1.16.1
18
+ before_install: gem install bundler -v 1.16.5
19
19
  after_success: bundle exec codeclimate-test-reporter
20
20
  script: bundle exec rake spec
Binary file
@@ -15,7 +15,7 @@
15
15
  "editable": true,
16
16
  "gnetId": null,
17
17
  "graphTooltip": 0,
18
- "id": 1,
18
+ "id": 5,
19
19
  "links": [],
20
20
  "panels": [
21
21
  {
@@ -48,12 +48,10 @@
48
48
  "mappingType": 1,
49
49
  "mappingTypes": [
50
50
  {
51
- "$$hashKey": "object:2694",
52
51
  "name": "value to text",
53
52
  "value": 1
54
53
  },
55
54
  {
56
- "$$hashKey": "object:2695",
57
55
  "name": "range to text",
58
56
  "value": 2
59
57
  }
@@ -81,7 +79,6 @@
81
79
  "tableColumn": "",
82
80
  "targets": [
83
81
  {
84
- "$$hashKey": "object:2559",
85
82
  "expr": "rate(sidekiq_enqueued_jobs[1m])",
86
83
  "format": "time_series",
87
84
  "intervalFactor": 1,
@@ -94,7 +91,6 @@
94
91
  "valueFontSize": "80%",
95
92
  "valueMaps": [
96
93
  {
97
- "$$hashKey": "object:2697",
98
94
  "op": "=",
99
95
  "text": "N/A",
100
96
  "value": "null"
@@ -132,12 +128,10 @@
132
128
  "mappingType": 1,
133
129
  "mappingTypes": [
134
130
  {
135
- "$$hashKey": "object:1808",
136
131
  "name": "value to text",
137
132
  "value": 1
138
133
  },
139
134
  {
140
- "$$hashKey": "object:1809",
141
135
  "name": "range to text",
142
136
  "value": 2
143
137
  }
@@ -165,7 +159,6 @@
165
159
  "tableColumn": "",
166
160
  "targets": [
167
161
  {
168
- "$$hashKey": "object:1387",
169
162
  "expr": "rate(sidekiq_processed_jobs_total[1m])",
170
163
  "format": "time_series",
171
164
  "intervalFactor": 1,
@@ -178,7 +171,6 @@
178
171
  "valueFontSize": "80%",
179
172
  "valueMaps": [
180
173
  {
181
- "$$hashKey": "object:1811",
182
174
  "op": "=",
183
175
  "text": "N/A",
184
176
  "value": "null"
@@ -216,12 +208,10 @@
216
208
  "mappingType": 1,
217
209
  "mappingTypes": [
218
210
  {
219
- "$$hashKey": "object:1808",
220
211
  "name": "value to text",
221
212
  "value": 1
222
213
  },
223
214
  {
224
- "$$hashKey": "object:1809",
225
215
  "name": "range to text",
226
216
  "value": 2
227
217
  }
@@ -249,7 +239,6 @@
249
239
  "tableColumn": "",
250
240
  "targets": [
251
241
  {
252
- "$$hashKey": "object:1387",
253
242
  "expr": "increase(sidekiq_failed_jobs_total[1m])",
254
243
  "format": "time_series",
255
244
  "intervalFactor": 1,
@@ -262,7 +251,6 @@
262
251
  "valueFontSize": "80%",
263
252
  "valueMaps": [
264
253
  {
265
- "$$hashKey": "object:1811",
266
254
  "op": "=",
267
255
  "text": "N/A",
268
256
  "value": "null"
@@ -300,12 +288,10 @@
300
288
  "mappingType": 1,
301
289
  "mappingTypes": [
302
290
  {
303
- "$$hashKey": "object:1808",
304
291
  "name": "value to text",
305
292
  "value": 1
306
293
  },
307
294
  {
308
- "$$hashKey": "object:1809",
309
295
  "name": "range to text",
310
296
  "value": 2
311
297
  }
@@ -333,7 +319,6 @@
333
319
  "tableColumn": "",
334
320
  "targets": [
335
321
  {
336
- "$$hashKey": "object:1387",
337
322
  "expr": "sidekiq_retry_jobs",
338
323
  "format": "time_series",
339
324
  "intervalFactor": 1,
@@ -346,7 +331,6 @@
346
331
  "valueFontSize": "80%",
347
332
  "valueMaps": [
348
333
  {
349
- "$$hashKey": "object:1811",
350
334
  "op": "=",
351
335
  "text": "N/A",
352
336
  "value": "null"
@@ -415,7 +399,6 @@
415
399
  "tableColumn": "",
416
400
  "targets": [
417
401
  {
418
- "$$hashKey": "object:1387",
419
402
  "expr": "sidekiq_dead_jobs",
420
403
  "format": "time_series",
421
404
  "intervalFactor": 1,
@@ -496,7 +479,6 @@
496
479
  "tableColumn": "",
497
480
  "targets": [
498
481
  {
499
- "$$hashKey": "object:1387",
500
482
  "expr": "sidekiq_enqueued_jobs",
501
483
  "format": "time_series",
502
484
  "intervalFactor": 1,
@@ -546,12 +528,10 @@
546
528
  "mappingType": 1,
547
529
  "mappingTypes": [
548
530
  {
549
- "$$hashKey": "object:1142",
550
531
  "name": "value to text",
551
532
  "value": 1
552
533
  },
553
534
  {
554
- "$$hashKey": "object:1143",
555
535
  "name": "range to text",
556
536
  "value": 2
557
537
  }
@@ -579,7 +559,6 @@
579
559
  "tableColumn": "",
580
560
  "targets": [
581
561
  {
582
- "$$hashKey": "object:897",
583
562
  "expr": "sidekiq_busy_workers",
584
563
  "format": "time_series",
585
564
  "intervalFactor": 1,
@@ -592,7 +571,6 @@
592
571
  "valueFontSize": "80%",
593
572
  "valueMaps": [
594
573
  {
595
- "$$hashKey": "object:1145",
596
574
  "op": "=",
597
575
  "text": "N/A",
598
576
  "value": "null"
@@ -630,12 +608,10 @@
630
608
  "mappingType": 1,
631
609
  "mappingTypes": [
632
610
  {
633
- "$$hashKey": "object:1282",
634
611
  "name": "value to text",
635
612
  "value": 1
636
613
  },
637
614
  {
638
- "$$hashKey": "object:1283",
639
615
  "name": "range to text",
640
616
  "value": 2
641
617
  }
@@ -663,7 +639,6 @@
663
639
  "tableColumn": "",
664
640
  "targets": [
665
641
  {
666
- "$$hashKey": "object:1192",
667
642
  "expr": "sidekiq_scheduled_jobs",
668
643
  "format": "time_series",
669
644
  "intervalFactor": 1,
@@ -676,7 +651,6 @@
676
651
  "valueFontSize": "80%",
677
652
  "valueMaps": [
678
653
  {
679
- "$$hashKey": "object:1285",
680
654
  "op": "=",
681
655
  "text": "N/A",
682
656
  "value": "null"
@@ -693,7 +667,7 @@
693
667
  "fill": 1,
694
668
  "gridPos": {
695
669
  "h": 14,
696
- "w": 24,
670
+ "w": 13,
697
671
  "x": 0,
698
672
  "y": 4
699
673
  },
@@ -717,7 +691,6 @@
717
691
  "renderer": "flot",
718
692
  "seriesOverrides": [
719
693
  {
720
- "$$hashKey": "object:2088",
721
694
  "alias": "processing rate",
722
695
  "color": "#447ebc",
723
696
  "fill": 0,
@@ -729,7 +702,6 @@
729
702
  "steppedLine": false,
730
703
  "targets": [
731
704
  {
732
- "$$hashKey": "object:2024",
733
705
  "expr": "rate(sidekiq_queue_latency_seconds[1m])",
734
706
  "format": "time_series",
735
707
  "intervalFactor": 1,
@@ -737,7 +709,6 @@
737
709
  "refId": "A"
738
710
  },
739
711
  {
740
- "$$hashKey": "object:2045",
741
712
  "expr": "rate(sidekiq_processed_jobs_total[1m])",
742
713
  "format": "time_series",
743
714
  "intervalFactor": 1,
@@ -764,7 +735,6 @@
764
735
  },
765
736
  "yaxes": [
766
737
  {
767
- "$$hashKey": "object:2097",
768
738
  "format": "s",
769
739
  "label": null,
770
740
  "logBase": 1,
@@ -773,7 +743,89 @@
773
743
  "show": true
774
744
  },
775
745
  {
776
- "$$hashKey": "object:2098",
746
+ "format": "short",
747
+ "label": null,
748
+ "logBase": 1,
749
+ "max": null,
750
+ "min": null,
751
+ "show": false
752
+ }
753
+ ]
754
+ },
755
+ {
756
+ "aliasColors": {},
757
+ "bars": false,
758
+ "dashLength": 10,
759
+ "dashes": false,
760
+ "datasource": null,
761
+ "fill": 1,
762
+ "gridPos": {
763
+ "h": 14,
764
+ "w": 11,
765
+ "x": 13,
766
+ "y": 4
767
+ },
768
+ "id": 16,
769
+ "legend": {
770
+ "avg": false,
771
+ "current": false,
772
+ "max": false,
773
+ "min": false,
774
+ "show": true,
775
+ "total": false,
776
+ "values": false
777
+ },
778
+ "lines": true,
779
+ "linewidth": 1,
780
+ "links": [],
781
+ "nullPointMode": "null",
782
+ "percentage": false,
783
+ "pointradius": 5,
784
+ "points": false,
785
+ "renderer": "flot",
786
+ "seriesOverrides": [],
787
+ "spaceLength": 10,
788
+ "stack": false,
789
+ "steppedLine": false,
790
+ "targets": [
791
+ {
792
+ "$$hashKey": "object:957",
793
+ "expr": "sidekiq_queue_enqueued_jobs",
794
+ "format": "time_series",
795
+ "intervalFactor": 1,
796
+ "legendFormat": "{{name}}",
797
+ "refId": "A"
798
+ }
799
+ ],
800
+ "thresholds": [],
801
+ "timeFrom": null,
802
+ "timeShift": null,
803
+ "title": "Queue enqueued jobs",
804
+ "tooltip": {
805
+ "shared": true,
806
+ "sort": 0,
807
+ "value_type": "individual"
808
+ },
809
+ "type": "graph",
810
+ "xaxis": {
811
+ "buckets": null,
812
+ "mode": "time",
813
+ "name": null,
814
+ "show": true,
815
+ "values": []
816
+ },
817
+ "yaxes": [
818
+ {
819
+ "$$hashKey": "object:1150",
820
+ "format": "none",
821
+ "label": null,
822
+ "logBase": 1,
823
+ "max": null,
824
+ "min": null,
825
+ "show": true
826
+ },
827
+ {
828
+ "$$hashKey": "object:1151",
777
829
  "format": "short",
778
830
  "label": null,
779
831
  "logBase": 1,
@@ -823,5 +875,5 @@
823
875
  "timezone": "",
824
876
  "title": "Sidekiq",
825
877
  "uid": "SwCwV7qkz",
826
- "version": 6
878
+ "version": 2
827
879
  }
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- sidekiq-prometheus-exporter (0.1.4)
4
+ sidekiq-prometheus-exporter (0.1.5)
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.4)
4
+ sidekiq-prometheus-exporter (0.1.5)
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.4)
4
+ sidekiq-prometheus-exporter (0.1.5)
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.4)
4
+ sidekiq-prometheus-exporter (0.1.5)
5
5
  sidekiq (>= 3.3.1)
6
6
 
7
7
  GEM
@@ -2,23 +2,27 @@
2
2
 
3
3
  require 'sidekiq/api'
4
4
 
5
- class Metrics
6
- QueueStats = Struct.new(:name, :size, :latency)
5
+ module Sidekiq
6
+ module Prometheus
7
+ class Metrics
8
+ QueueStats = Struct.new(:name, :size, :latency)
7
9
 
8
- def initialize
9
- @overview_stats = Sidekiq::Stats.new
10
- @queues_stats = queues_stats
11
- end
10
+ def initialize
11
+ @overview_stats = Sidekiq::Stats.new
12
+ @queues_stats = queues_stats
13
+ end
12
14
 
13
- def __binding__
14
- binding
15
- end
15
+ def __binding__
16
+ binding
17
+ end
16
18
 
17
- private
19
+ private
18
20
 
19
- def queues_stats
20
- Sidekiq::Queue.all.map do |queue|
21
- QueueStats.new(queue.name, queue.size, queue.latency)
21
+ def queues_stats
22
+ Sidekiq::Queue.all.map do |queue|
23
+ QueueStats.new(queue.name, queue.size, queue.latency)
24
+ end
25
+ end
22
26
  end
23
27
  end
24
28
  end
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Sidekiq
2
4
  module Prometheus
3
5
  module Exporter
4
- VERSION = '0.1.4'.freeze
6
+ VERSION = '0.1.6'
5
7
  end
6
8
  end
7
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-prometheus-exporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Fedorov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-04 00:00:00.000000000 Z
11
+ date: 2018-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq