notable 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +8 -26
- data/lib/notable.rb +1 -0
- data/lib/notable/job_extensions.rb +2 -2
- data/lib/notable/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dffa6e740a343d9d94cb914e52fa0627c33e42eaa20c9d9600365ff9fc70a4bf
|
4
|
+
data.tar.gz: 7928839098511ba32cb90106f5aa771e64886284f833da98eade40b5fa8637f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80f40eecda17a03ad548ac6faa75b049b83c3e57121a65418dbc0bc2508ad1a0c04424cfe551feb2283d0e366c44968732cd9e00d5df01faa23d1c02f663946f
|
7
|
+
data.tar.gz: 1a931594bca9c6c5907592542c40e1f87b3f92731086403c04ca7e486dcf7390a46a4d886b44cd00e9a0b19fed1f6882dbd5de6b7736ad9a7d34c8f11b5c699a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
# Notable
|
2
2
|
|
3
|
-
:star2:
|
3
|
+
:star2: :star2: :star2:
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
#### Introducing Notable
|
8
|
-
|
9
|
-
Notable tracks notable requests and background jobs and stores them in your database. What makes a request or job notable? There are a number of default situations, but ultimately you decide what interests you.
|
5
|
+
Notable tracks notable requests and background jobs and stores them in your database. What makes a request or job notable? There are a number of default situations, but ultimately you decide what interests you.
|
10
6
|
|
11
7
|
By default, Notable tracks:
|
12
8
|
|
@@ -43,26 +39,18 @@ rails db:migrate
|
|
43
39
|
|
44
40
|
To explore the data, check out [Blazer](https://github.com/ankane/blazer).
|
45
41
|
|
46
|
-
##
|
42
|
+
## How It Works
|
47
43
|
|
48
44
|
A `Notable::Request` is created for:
|
49
45
|
|
50
46
|
- errors
|
51
47
|
- 404s
|
52
48
|
- slow requests
|
53
|
-
- timeouts
|
49
|
+
- timeouts from [Slowpoke](https://github.com/ankane/slowpoke)
|
54
50
|
- validation failures
|
55
51
|
- [CSRF failures](https://guides.rubyonrails.org/security.html#cross-site-request-forgery-csrf)
|
56
52
|
- unpermitted parameters
|
57
|
-
- blocked and throttled requests
|
58
|
-
|
59
|
-
For timeouts, use [Slowpoke](https://github.com/ankane/slowpoke).
|
60
|
-
|
61
|
-
For blocked and throttled requests, use [Rack Attack](https://github.com/kickstarter/rack-attack).
|
62
|
-
|
63
|
-
## Jobs
|
64
|
-
|
65
|
-
Wouldn’t it be great to have a record of exact jobs that fail?
|
53
|
+
- blocked and throttled requests from [Rack Attack](https://github.com/kickstarter/rack-attack)
|
66
54
|
|
67
55
|
A `Notable::Job` is created for:
|
68
56
|
|
@@ -70,19 +58,13 @@ A `Notable::Job` is created for:
|
|
70
58
|
- slow jobs
|
71
59
|
- validation failures
|
72
60
|
|
73
|
-
|
74
|
-
|
75
|
-
```ruby
|
76
|
-
Notable.track(note_type, note)
|
77
|
-
```
|
78
|
-
|
79
|
-
Like
|
61
|
+
Create a custom note inside a request or job with:
|
80
62
|
|
81
63
|
```ruby
|
82
|
-
Notable.track("
|
64
|
+
Notable.track("Note Type", "Optional extra info")
|
83
65
|
```
|
84
66
|
|
85
|
-
##
|
67
|
+
## Customization
|
86
68
|
|
87
69
|
Disable tracking in certain environments
|
88
70
|
|
data/lib/notable.rb
CHANGED
@@ -4,8 +4,8 @@ module Notable
|
|
4
4
|
|
5
5
|
included do
|
6
6
|
around_perform do |job, block|
|
7
|
-
#
|
8
|
-
Notable.track_job(job.class.name, job.job_id, job.queue_name,
|
7
|
+
# enqueued_at is only available in Active Job 6+
|
8
|
+
Notable.track_job(job.class.name, job.job_id, job.queue_name, job.try(:enqueued_at), try(:notable_slow_job_threshold)) do
|
9
9
|
block.call
|
10
10
|
end
|
11
11
|
end
|
data/lib/notable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|