tcell_agent 0.2.29.rc1 → 0.2.29.rc2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7187e43ef14d4d44c243350059f6ad1f35ee6250
4
- data.tar.gz: 88c22c716397a69145bfc37451fe166af979fa5d
3
+ metadata.gz: 72bdaa2198617a42be424cb88f1944cfa867ee7b
4
+ data.tar.gz: 876dccbc46bcfcb9d927369744db83741bb03e3e
5
5
  SHA512:
6
- metadata.gz: 5693216de6e554dde2dde7605c705b82d7568458fa030604fc67479f22be29c85bb3e317c2b121893fa7c6b701250b6ecefec8153550f6ce4094e98cc68f54e2
7
- data.tar.gz: b5e8b9af7495ffc68addd549f7b858170bbea42e46ee6c928bb54c4e0324fa326dadc23931c61de6585237d64795c6b8e69d91a6c7da6448407c96c30168de24
6
+ metadata.gz: 1940cc2ca2ca9d3d2cafec1b3addc5f1d2b04140391d53923ae7f1230594baf5291adf9ccc596306f3a68397a0a783d174a4e125b2a9e185d65a0555499a4a83
7
+ data.tar.gz: 9163fd10bae3bc0c05de4ff1af96040dea0068851598612caad8ee8d55ca5720d79d7cad9e570dc8329c4a5c844155655a80c5d2402ec6c69aa3b12c691ea3f6
@@ -199,6 +199,7 @@ module TCellAgent
199
199
  def queue_forked_event(event)
200
200
  begin
201
201
  self.ensure_fork_event_thread_running
202
+ TCellAgent.logger.debug("fork_event_queue length: #{@fork_event_queue.length}")
202
203
  if (@fork_event_queue.length() > 100)
203
204
  TCellAgent.logger.debug("Dropping (forked) event because queue full")
204
205
  return
@@ -255,6 +256,7 @@ module TCellAgent
255
256
  return if TCellAgent.configuration.should_consume_event? == false
256
257
  begin
257
258
  self.ensure_metrics_event_thread_running
259
+ TCellAgent.logger.debug("metrics_event_queue length: #{@metrics_event_queue.length}")
258
260
  if (@metrics_event_queue.length() > 100)
259
261
  TCellAgent.logger.debug("Dropping (forked) metric because queue full")
260
262
  return
@@ -275,6 +277,7 @@ module TCellAgent
275
277
 
276
278
  begin
277
279
  self.ensure_event_processor_running
280
+ TCellAgent.logger.debug("eventQueue length: #{@eventQueue.size}")
278
281
  @event_queue_monitor.synchronize {
279
282
  @eventQueue.push(event, 10)
280
283
  }
@@ -108,9 +108,11 @@ module TCellAgent
108
108
  @@event_pipe_manager.is_parent?
109
109
  end
110
110
  def self.send_to_metrics_pipe(hash_value)
111
+ TCellAgent.logger.debug("Send metric to parent")
111
112
  @@metrics_pipe_manager.send_to_parent(hash_value)
112
113
  end
113
114
  def self.send_to_event_pipe(event)
115
+ TCellAgent.logger.debug("Send event to parent")
114
116
  @@event_pipe_manager.send_to_parent(event)
115
117
  end
116
118
 
@@ -1,4 +1,3 @@
1
- require 'libinjection/libinjection'
2
1
  require 'tcell_agent/policies/appsensor/injection_sensor'
3
2
 
4
3
  module TCellAgent
@@ -22,8 +21,11 @@ module TCellAgent
22
21
  end
23
22
 
24
23
  def find_vulnerability(param_name, param_value)
25
- if @libinjection && Libinjection.is_sqli(param_value) == 1
26
- return {"param" => param_name, "value" => param_value, "pattern" => "li"}
24
+ if @libinjection
25
+ require 'libinjection/libinjection'
26
+ if Libinjection.is_sqli(param_value) == 1
27
+ return {"param" => param_name, "value" => param_value, "pattern" => "li"}
28
+ end
27
29
  end
28
30
 
29
31
  super(param_name, param_value)
@@ -1,4 +1,3 @@
1
- require 'libinjection/libinjection'
2
1
  require 'tcell_agent/policies/appsensor/injection_sensor'
3
2
 
4
3
  module TCellAgent
@@ -22,8 +21,11 @@ module TCellAgent
22
21
  end
23
22
 
24
23
  def find_vulnerability(param_name, param_value)
25
- if @libinjection && Libinjection.is_xss(param_value) == 1
26
- return {"param" => param_name, "value" => param_value, "pattern" => "li"}
24
+ if @libinjection
25
+ require 'libinjection/libinjection'
26
+ if Libinjection.is_xss(param_value) == 1
27
+ return {"param" => param_name, "value" => param_value, "pattern" => "li"}
28
+ end
27
29
  end
28
30
 
29
31
  super(param_name, param_value)
@@ -187,7 +187,7 @@ module TCellAgent
187
187
  appsensor_policy = TCellAgent.policy(TCellAgent::PolicyTypes::AppSensor)
188
188
  if appsensor_policy
189
189
  event = TCellAgent::SensorEvents::AppSensorMetaEvent.build(
190
- request, content_length, status_code, response_headers
190
+ request, content_length, status_code.to_i, response_headers
191
191
  )
192
192
  TCellAgent.send_event(event)
193
193
 
@@ -2,6 +2,12 @@
2
2
  require 'tcell_agent/configuration'
3
3
 
4
4
  if (TCellAgent.configuration.disable_all == false)
5
+ require 'objspace'
6
+
7
+ if ObjectSpace.respond_to?(:trace_object_allocations_start)
8
+ ObjectSpace.trace_object_allocations_start
9
+ end
10
+
5
11
  require 'tcell_agent/logger'
6
12
  require 'tcell_agent/agent'
7
13
  require 'thread'
@@ -12,6 +18,7 @@ if (TCellAgent.configuration.disable_all == false)
12
18
  def self.run_instrumentation(server_name, send_startup_events=true)
13
19
 
14
20
  require 'tcell_agent/rails/on_start' if defined?(Rails)
21
+ require 'rbtrace'
15
22
 
16
23
  TCellAgent::Instrumentation.safe_block("Starting thread agent") do
17
24
  TCellAgent.logger.debug("Instrumenting: #{server_name}")
@@ -1,5 +1,5 @@
1
1
  # See the file "LICENSE" for the full license governing this code.
2
2
 
3
3
  module TCellAgent
4
- VERSION = "0.2.29.rc1"
4
+ VERSION = "0.2.29.rc2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tcell_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.29.rc1
4
+ version: 0.2.29.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garrett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-27 00:00:00.000000000 Z
11
+ date: 2017-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client