infinum_graylog 0.6.0 → 0.7.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 +1 -0
- data/lib/infinum_graylog/configuration.rb +2 -1
- data/lib/infinum_graylog/sql_active_record.rb +5 -1
- data/lib/infinum_graylog/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: 793411c3aa680bcc6f1495db27f360bff8458c85bb423b3f45f182974b315db7
|
4
|
+
data.tar.gz: 63fc654cf10a48e1531126116c43f13b740485eeda29c84997708eb7e983dae4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1eb84853ea1e6155584486d11916821101517f43d62cfdcbb8be34eef6327af45c970e075757c122f91347f1d1ad78dca50af42a8f3c9cabbffcca72146b18f
|
7
|
+
data.tar.gz: 5d5ad2c7364eb034e4c8c32941f591e17e341339de85d143fe59a48981a68913423bd3121555349cc97ec15f6d98e99b1556400760db402ad8ceea70abc1e0bd
|
data/README.md
CHANGED
@@ -22,6 +22,7 @@ Create `config/initializers/infinum_graylog.rb`
|
|
22
22
|
InfinumGraylog.configure do |config|
|
23
23
|
# config.skip_environments = ['development', 'test']
|
24
24
|
# config.skip_statuses = [404, 500]
|
25
|
+
# config.skippable_sql_actions = ['PhrasingPhrase Load', 'PhrasingImage Load']
|
25
26
|
end
|
26
27
|
|
27
28
|
InfinumGraylog::Subscriber.subscribe
|
@@ -10,7 +10,7 @@ module InfinumGraylog
|
|
10
10
|
|
11
11
|
class Configuration
|
12
12
|
attr_accessor :application, :protocol, :level, :options, :host, :port, :skip_environments
|
13
|
-
attr_accessor :skip_statuses
|
13
|
+
attr_accessor :skip_statuses, :skippable_sql_actions
|
14
14
|
|
15
15
|
def initialize
|
16
16
|
@application = "#{Rails.application.class.parent_name.underscore}-#{Rails.env}"
|
@@ -27,6 +27,7 @@ module InfinumGraylog
|
|
27
27
|
@port = 12201 # rubocop:disable NumericLiterals
|
28
28
|
@skip_environments = ['development', 'test']
|
29
29
|
@skip_statuses = [404, 500]
|
30
|
+
@skippable_sql_actions = []
|
30
31
|
end
|
31
32
|
end
|
32
33
|
end
|
@@ -10,7 +10,7 @@ module InfinumGraylog
|
|
10
10
|
|
11
11
|
def format
|
12
12
|
return if event.payload[:statement_name].nil? && event.payload[:name].nil?
|
13
|
-
return if
|
13
|
+
return if skippable_actions.include?(event_name)
|
14
14
|
|
15
15
|
{
|
16
16
|
short_message: event_name,
|
@@ -40,6 +40,10 @@ module InfinumGraylog
|
|
40
40
|
sql
|
41
41
|
end
|
42
42
|
|
43
|
+
def skippable_actions
|
44
|
+
SKIPPABLE_ACTIONS + configuration.skippable_sql_actions
|
45
|
+
end
|
46
|
+
|
43
47
|
def configuration
|
44
48
|
InfinumGraylog.configuration
|
45
49
|
end
|