query_track 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +9 -9
- data/lib/query_track/notifications/slack.rb +1 -1
- data/lib/query_track/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eb3b0335bcb262ed0e622f44fff0b231c3c12f6ee436558c8e9a31b32862fbce
|
|
4
|
+
data.tar.gz: a25156b7ffcbed48303cb231c34690736bb8e391501916d7ce137c434092addc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d5ea72a94269152ea35d4422780045ebdbdf5c70be837054cda797ce452083ac0bcfb2070aae65b653ccc9396b80d9e95efaa1ec46b2b9da764626b160a3f624
|
|
7
|
+
data.tar.gz: 459f9ddc1e9ee0144f90a1db2f57cd413898e0dd6c04f918974ee50a92b277c4a93d88059fdd85a9b82ea8d419b88255e4854085d4d343703f803b846290be43
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -46,31 +46,31 @@ end
|
|
|
46
46
|
|
|
47
47
|
# <img src='https://github.com/kirillshevch/query_track/blob/master/examples/console.jpg' alt='Log Example' />
|
|
48
48
|
|
|
49
|
-
###
|
|
49
|
+
### Filters
|
|
50
50
|
|
|
51
|
-
To
|
|
51
|
+
To avoid noisy warnings from used gems, and places where fat queries are justified, you can filters SQL by backtrace.
|
|
52
|
+
For example, you have installed `activeadmin` and want to skip everything from `app/admin`:
|
|
52
53
|
|
|
53
54
|
```ruby
|
|
54
55
|
QueryTrack::Settings.configure do |config|
|
|
55
56
|
config.duration = 0.5
|
|
56
|
-
config.
|
|
57
|
+
config.filters = ['app/admin']
|
|
57
58
|
end
|
|
58
59
|
```
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
### Filters
|
|
61
|
+
### Slack Notifications
|
|
63
62
|
|
|
64
|
-
To
|
|
65
|
-
For example, you have installed `activeadmin` and want to skip everything from `app/admin`:
|
|
63
|
+
To receive notifications about slow queries into Slack, you need to install [incoming-webhooks](https://reflow-files.slack.com/apps/A0F7XDUAZ-incoming-webhooks) and put link into config file:
|
|
66
64
|
|
|
67
65
|
```ruby
|
|
68
66
|
QueryTrack::Settings.configure do |config|
|
|
69
67
|
config.duration = 0.5
|
|
70
|
-
config.
|
|
68
|
+
config.notifications.slack = 'https://hooks.slack.com/services/T0000000/B0000000/C0000000'
|
|
71
69
|
end
|
|
72
70
|
```
|
|
73
71
|
|
|
72
|
+
# <img src='https://github.com/kirillshevch/query_track/blob/master/examples/slack.jpg' alt='Incoming Hook Example' />
|
|
73
|
+
|
|
74
74
|
## Contributing
|
|
75
75
|
|
|
76
76
|
Bug reports and pull requests are welcome on GitHub at https://github.com/kirillshevch/query_track.
|
data/lib/query_track/version.rb
CHANGED