sidekiq-influxdb 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -3
- data/lib/sidekiq/influxdb/server_middleware.rb +8 -1
- data/lib/sidekiq/influxdb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 692630f32205c66fd6e128130b5287f683e5d4da
|
4
|
+
data.tar.gz: 413d701195b97631f683d6c1706fca6436a49218
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8097a92929fc14d7eaecbb93d3695cbe2a0b39ad20c710167e13b14a2868248f6eddabaee7b5efd2c4b449096b3a3574bf9d17849911d28d3eec964220b9615
|
7
|
+
data.tar.gz: 479455da95330526bf9116cf942502bd02dd8c6a6e54309fe393c4f7aefbdfd41c525edc7bc9460180332f06e9c4b4734c216b3b28bc48f959beffcfdd3913c7
|
data/README.md
CHANGED
@@ -32,7 +32,8 @@ Sidekiq.configure_server do |config|
|
|
32
32
|
series_name: 'sidekiq_jobs', # optional, default shown
|
33
33
|
retention_policy: nil, # optional, default nil
|
34
34
|
start_events: true, # optional, default true
|
35
|
-
tags: { application: 'MyApp' }
|
35
|
+
tags: { application: 'MyApp' }, # optional, default {}
|
36
|
+
except: [UnimportantJob1, UnimportantJob2] # optional, default []
|
36
37
|
end
|
37
38
|
end
|
38
39
|
```
|
@@ -52,9 +53,10 @@ Tags (repetitive, indexed data — for filtering and grouping by):
|
|
52
53
|
|
53
54
|
* `time` — Standard InfluxDB timestamp. Precision of the supplied client is respected. Only `s`, `ms`, and `u` precisions are supported.
|
54
55
|
* `queue` — Queue name.
|
55
|
-
* `class` — Job class name.
|
56
|
-
* `event` — What happened to the job at the specified `time`: `start`, `finish`, or `error`. If you initialize the middleware with `start_events: false`, there will be no `start` events.
|
56
|
+
* `class` — Job class name. Classes from `except:` keyword argument are skipped (no data is sent to InfluxDB).
|
57
|
+
* `event` — What happened to the job at the specified `time`: `start`, `finish`, or `error`. If you initialize the middleware with `start_events: false`, there will be no `start` events.
|
57
58
|
* `error` — If `event=error`, this tag contains the exception class name.
|
59
|
+
* your own tags from the initializer
|
58
60
|
|
59
61
|
Values (unique, non-indexed data — for aggregation):
|
60
62
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'set'
|
1
2
|
require 'influxdb'
|
2
3
|
|
3
4
|
module Sidekiq
|
@@ -8,16 +9,22 @@ module Sidekiq
|
|
8
9
|
series_name: 'sidekiq_jobs',
|
9
10
|
retention_policy: nil,
|
10
11
|
start_events: true,
|
11
|
-
tags: {}
|
12
|
+
tags: {},
|
13
|
+
except: []
|
12
14
|
)
|
13
15
|
@influxdb = influxdb_client
|
14
16
|
@series = series_name
|
15
17
|
@retention = retention_policy
|
16
18
|
@start_events = start_events
|
17
19
|
@tags = tags
|
20
|
+
@secret_agents = Set.new(except)
|
18
21
|
end
|
19
22
|
|
20
23
|
def call(worker, msg, queue)
|
24
|
+
if @secret_agents.include?(worker.class)
|
25
|
+
yield
|
26
|
+
return
|
27
|
+
end
|
21
28
|
t = Time.now.to_f
|
22
29
|
data = {
|
23
30
|
tags: {
|
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.4.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-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: influxdb
|