logjam_agent 0.25.3 → 0.26.0

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
  SHA1:
3
- metadata.gz: cb8308e2189c845b7b6cbbc7d9935a46332aba00
4
- data.tar.gz: 7e4946075f1fe8b79cc9345cdbd2cb1f2f8f5d25
3
+ metadata.gz: 681026c8e74ca725274df2f2424eddef631f7523
4
+ data.tar.gz: 2bef380e6af893ddd67f076d3d460030ed0afaaa
5
5
  SHA512:
6
- metadata.gz: dee4d147950f1fc76ad97db7383849147fca8c12139c2636fc43b1d8578f00145a6ef314990306e37e51c3d74482279fcca88b2e7e3fb606d9721be75db2dcd0
7
- data.tar.gz: c5dbbb45fdda7b68636680c10a742d5c35ac0f13e1dd7c784e49d8090f4e26ed1902c3b96813c58b9411c8924d64ed49468a4b1f30e192b4bcafa22f72d2a436
6
+ metadata.gz: 5454182e1fb4ae45087f8427f723766e698bacb81225f0ccfd6454543518ee769ee2b768a6ac99aa98118145236ae54f6a3e4bc657654f080c97387ed902bad6
7
+ data.tar.gz: 33ad233a9ac350f2a9415a6cc70715ad08a741662d4625f7e57049b8909c7d7112836cb973afe692e46c3ed2eb099f659eb1ea8f37fffb18605182bad3ec19f3
data/README.md CHANGED
@@ -84,6 +84,10 @@ module LogjamAgent
84
84
  # for example in a Rails before_action
85
85
  # LogjamAgent.request.log_device_ignored_lines = /^\s*(?:Rendered|REDIS)/
86
86
 
87
+ # Configure maximum size of logged paremters and envronment variables sent to
88
+ # logjam. Defaults to 1024.
89
+ # self.max_logged_param_size = 1024
90
+
87
91
  # Configure maximum log line length. Defaults to 2048.
88
92
  # This setting only applies to the lines sent with the request.
89
93
  self.max_line_length = 2048
@@ -152,6 +152,9 @@ module LogjamAgent
152
152
  mattr_accessor :log_device_ignored_lines
153
153
  self.log_device_ignored_lines = nil
154
154
 
155
+ mattr_accessor :max_logged_param_size
156
+ self.max_logged_param_size = 1024
157
+
155
158
  mattr_accessor :max_line_length
156
159
  self.max_line_length = 2048
157
160
 
@@ -16,6 +16,7 @@ module LogjamAgent
16
16
  @exchanges = {}
17
17
  @bunny = nil
18
18
  @sequence = 0
19
+ @paused = nil
19
20
  ensure_bunny_gem_is_available
20
21
  end
21
22
 
@@ -147,6 +147,14 @@ module LogjamAgent
147
147
  ActiveSupport::Notifications.unsubscribe("render_partial.action_view")
148
148
  ActiveSupport::Notifications.unsubscribe("render_collection.action_view")
149
149
  end
150
+
151
+ max_size = LogjamAgent.max_logged_param_size
152
+ truncate_overlong_params = lambda { |key, value|
153
+ if value.is_a?(String) && value.bytesize > max_size
154
+ value[max_size..-1] = " ... [TRUNCATED]"
155
+ end
156
+ }
157
+ Rails.application.config.filter_parameters += [truncate_overlong_params]
150
158
  end
151
159
  end
152
160
  end
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.25.3"
2
+ VERSION = "0.26.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logjam_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.3
4
+ version: 0.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Kaes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-13 00:00:00.000000000 Z
11
+ date: 2017-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  version: '0'
186
186
  requirements: []
187
187
  rubyforge_project: logjam_agent
188
- rubygems_version: 2.6.12
188
+ rubygems_version: 2.6.14
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: Logjam client library to be used with logjam