sidekiq-influxdb 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +8 -7
- data/lib/sidekiq/influxdb/server_middleware.rb +4 -2
- data/lib/sidekiq/influxdb/version.rb +1 -1
- metadata +2 -3
- data/Gemfile.lock +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2976ce8555fc4c97f6b6613cca137cafe9b47dfe
|
4
|
+
data.tar.gz: 285600fc99556547b005d02d8695b7f80359492f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 025c984edea442e90affca3752c105f69e7b10d3f17441a250412266062a0b25bfd37311bc9e71aeb280e1cda04f2bb790f0537f7e9d870195177074a0c53cdf
|
7
|
+
data.tar.gz: 39a24610b19702ac4f9beacd2bb740a8a0ae8200f0213853ff3c702acda002a04b2ca2655225d6dcc1e96eaa4cf0eee36490942c0156fc1510563e8fd4df19e9
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -31,7 +31,8 @@ Sidekiq.configure_server do |config|
|
|
31
31
|
influxdb_client: InfluxDB::Client.new(options), # REQUIRED
|
32
32
|
series_name: 'sidekiq_jobs', # optional, default shown
|
33
33
|
retention_policy: nil, # optional, default nil
|
34
|
-
start_events: true
|
34
|
+
start_events: true, # optional, default true
|
35
|
+
tags: { application: 'MyApp' } # optional, default {}
|
35
36
|
end
|
36
37
|
end
|
37
38
|
```
|
@@ -40,12 +41,12 @@ When you deploy this code, you will start getting the following series in your I
|
|
40
41
|
|
41
42
|
> select * from sidekiq_jobs
|
42
43
|
name: sidekiq_jobs
|
43
|
-
time class creation_time error event jid queue total waited worked
|
44
|
-
---- ----- ------------- ----- ----- --- ----- ----- ------ ------
|
45
|
-
1511707465061000000 FooJob 1511707459.0186539 start 51cc82fe75fbeba37b1ff18f default 6.042410135269165
|
46
|
-
1511707465061000000 FooJob 1511707459.0186539 finish 51cc82fe75fbeba37b1ff18f default 8.046684265136719 6.042410135269165 2.0042741298675537
|
47
|
-
1511707467068000000 BarJob 1511707461.019835 start 3891f241ab84d3aba728822e default 6.049134016036987
|
48
|
-
1511707467068000000 BarJob 1511707461.019835 NoMethodError error 3891f241ab84d3aba728822e default 8.056788206100464 6.049134016036987 2.0076541900634766
|
44
|
+
time application class creation_time error event jid queue total waited worked
|
45
|
+
---- ----------- ----- ------------- ----- ----- --- ----- ----- ------ ------
|
46
|
+
1511707465061000000 MyApp FooJob 1511707459.0186539 start 51cc82fe75fbeba37b1ff18f default 6.042410135269165
|
47
|
+
1511707465061000000 MyApp FooJob 1511707459.0186539 finish 51cc82fe75fbeba37b1ff18f default 8.046684265136719 6.042410135269165 2.0042741298675537
|
48
|
+
1511707467068000000 MyApp BarJob 1511707461.019835 start 3891f241ab84d3aba728822e default 6.049134016036987
|
49
|
+
1511707467068000000 MyApp BarJob 1511707461.019835 NoMethodError error 3891f241ab84d3aba728822e default 8.056788206100464 6.049134016036987 2.0076541900634766
|
49
50
|
|
50
51
|
Tags (repetitive, indexed data — for filtering and grouping by):
|
51
52
|
|
@@ -7,12 +7,14 @@ module Sidekiq
|
|
7
7
|
influxdb_client:,
|
8
8
|
series_name: 'sidekiq_jobs',
|
9
9
|
retention_policy: nil,
|
10
|
-
start_events: true
|
10
|
+
start_events: true,
|
11
|
+
tags: {}
|
11
12
|
)
|
12
13
|
@influxdb = influxdb_client
|
13
14
|
@series = series_name
|
14
15
|
@retention = retention_policy
|
15
16
|
@start_events = start_events
|
17
|
+
@tags = tags
|
16
18
|
end
|
17
19
|
|
18
20
|
def call(worker, msg, queue)
|
@@ -22,7 +24,7 @@ module Sidekiq
|
|
22
24
|
class: worker.class.name,
|
23
25
|
queue: queue,
|
24
26
|
event: 'start',
|
25
|
-
},
|
27
|
+
}.merge(@tags),
|
26
28
|
values: {
|
27
29
|
jid: msg['jid'],
|
28
30
|
creation_time: msg['created_at'],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-influxdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Vassilevsky
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: influxdb
|
@@ -77,7 +77,6 @@ files:
|
|
77
77
|
- ".ruby-version"
|
78
78
|
- CODE_OF_CONDUCT.md
|
79
79
|
- Gemfile
|
80
|
-
- Gemfile.lock
|
81
80
|
- Makefile
|
82
81
|
- README.md
|
83
82
|
- Rakefile
|
data/Gemfile.lock
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
sidekiq-influxdb (0.1.0)
|
5
|
-
influxdb (~> 0.0)
|
6
|
-
sidekiq (~> 5.0)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
concurrent-ruby (1.0.5)
|
12
|
-
connection_pool (2.2.1)
|
13
|
-
influxdb (0.5.1)
|
14
|
-
rack (2.0.3)
|
15
|
-
rack-protection (2.0.0)
|
16
|
-
rack
|
17
|
-
rake (10.5.0)
|
18
|
-
redis (4.0.1)
|
19
|
-
sidekiq (5.0.5)
|
20
|
-
concurrent-ruby (~> 1.0)
|
21
|
-
connection_pool (~> 2.2, >= 2.2.0)
|
22
|
-
rack-protection (>= 1.5.0)
|
23
|
-
redis (>= 3.3.4, < 5)
|
24
|
-
|
25
|
-
PLATFORMS
|
26
|
-
ruby
|
27
|
-
|
28
|
-
DEPENDENCIES
|
29
|
-
bundler (~> 1.16)
|
30
|
-
rake (~> 10.0)
|
31
|
-
sidekiq-influxdb!
|
32
|
-
|
33
|
-
BUNDLED WITH
|
34
|
-
1.16.0
|