query_track 0.0.6 → 0.0.7
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/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/query_track/event_processor.rb +7 -3
- 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: 5a5320848472a969d0dc55f439d35104de7d6ccfd9ca0fb95ea145f2d5022303
|
4
|
+
data.tar.gz: 76c6cb3371cd2b40d78cf457feef9f84f21d1f46dfe6bcb39be7734ba2974dde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1e97dc237c4ff865286f48bed33996dcf3fb6c180bc0d491f38f3c3793cb7ee57fbd9eed640cc1943566171b387d1ecdca1df856c0d93ce3daa144aa9decc23
|
7
|
+
data.tar.gz: 67b0dd2dddf045db93614eea9584c692f5e8cae8b7cecc688730f85ce84849a5dba8537098251e12bcce09c56b372ac7212e33c96592818cc6d1831af3597991
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -11,14 +11,18 @@ module QueryTrack
|
|
11
11
|
|
12
12
|
return if under_filter?(caller)
|
13
13
|
|
14
|
-
if
|
15
|
-
QueryTrack::Notifications::Slack.new(event.payload[:sql],
|
16
|
-
QueryTrack::Notifications::Log.new(event.payload[:sql],
|
14
|
+
if duration_seconds > QueryTrack::Settings.config.duration
|
15
|
+
QueryTrack::Notifications::Slack.new(event.payload[:sql], duration_seconds).call
|
16
|
+
QueryTrack::Notifications::Log.new(event.payload[:sql], duration_seconds).call
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
|
+
def duration_seconds
|
23
|
+
event.duration / 1000
|
24
|
+
end
|
25
|
+
|
22
26
|
def under_filter?(trace)
|
23
27
|
QueryTrack::Filters.new(caller).call
|
24
28
|
end
|
data/lib/query_track/version.rb
CHANGED