query_track 0.0.3 → 0.0.4

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
  SHA256:
3
- metadata.gz: ce34974e6c961e959cfd604448aa25dda1121f8fe8f05f92769a2bc3d3ebf0ff
4
- data.tar.gz: 829d05437a6ee4753bd39d9c45f7ca951a7d10aefb4fba7fc05d3c919cc37832
3
+ metadata.gz: eb3b0335bcb262ed0e622f44fff0b231c3c12f6ee436558c8e9a31b32862fbce
4
+ data.tar.gz: a25156b7ffcbed48303cb231c34690736bb8e391501916d7ce137c434092addc
5
5
  SHA512:
6
- metadata.gz: c359e0555148e2ef84c19059955d83a820fc8349d7a06b2d2405524f5811f085db743e9352bd176b9de8995de74a840ac8845ab69d3e29b0ed1dd12379c7979f
7
- data.tar.gz: 1a9a2ddf3089c1bb8b621d6843b0fa8a82ec05dfac5c882be29a2a130d3d13d47fc1f7d661820e01f75f0f572b82f4f58fc46cfc96e7e5052316f1ce2d72060d
6
+ metadata.gz: d5ea72a94269152ea35d4422780045ebdbdf5c70be837054cda797ce452083ac0bcfb2070aae65b653ccc9396b80d9e95efaa1ec46b2b9da764626b160a3f624
7
+ data.tar.gz: 459f9ddc1e9ee0144f90a1db2f57cd413898e0dd6c04f918974ee50a92b277c4a93d88059fdd85a9b82ea8d419b88255e4854085d4d343703f803b846290be43
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v0.0.4 2019-07-22
2
+
3
+ Added temp solution for async slack notifications. ([kirillshevch](https://github.com/kirillshevch/query_track/pull/5))
4
+
1
5
  # v0.0.3 2019-07-22
2
6
 
3
7
  Added backtrace filters. ([kirillshevch](https://github.com/kirillshevch/query_track/pull/3))
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- query_track (0.0.3)
4
+ query_track (0.0.4)
5
5
  activesupport
6
6
  dry-configurable
7
7
  slack_hook
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
- ### Slack Notifications
49
+ ### Filters
50
50
 
51
- 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:
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.notifications.slack = 'https://hooks.slack.com/services/T0000000/B0000000/C0000000'
57
+ config.filters = ['app/admin']
57
58
  end
58
59
  ```
59
60
 
60
- # <img src='https://github.com/kirillshevch/query_track/blob/master/examples/slack.jpg' alt='Incoming Hook Example' />
61
-
62
- ### Filters
61
+ ### Slack Notifications
63
62
 
64
- To avoid noisy warnings from used gems, and places where fat queries are justified, you can filters SQL by backtrace.
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.filters = ['app/admin']
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.
@@ -18,7 +18,7 @@ module QueryTrack
18
18
 
19
19
  payload = { blocks: blocks(trace) }
20
20
 
21
- slack_hook.post(payload)
21
+ Thread.new { slack_hook.post(payload) }
22
22
  end
23
23
 
24
24
  private
@@ -1,3 +1,3 @@
1
1
  module QueryTrack
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_track
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Shevchenko