site24x7_apminsight 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -96,10 +96,8 @@ module ManageEngine
96
96
 
97
97
 
98
98
  def logException(msg,e)
99
- @apmlog.info( "#{msg} => #{e.message}")
100
- @apmlog.debug( "!!!!!!!!!!!!!!!!!!!!!!EXCEPTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!")
101
- @apmlog.debug( "Message : #{msg}\nTrace :\n#{e.backtrace}")
102
- @apmlog.debug( "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
99
+ @apmlog.warn( "#{msg} => #{e.message}")
100
+ @apmlog.warn( "Message : #{msg}\nTrace :\n#{e.backtrace}")
103
101
  end
104
102
 
105
103
  def close
@@ -27,8 +27,9 @@ module ManageEngine
27
27
  @obj.log.info "Instrumenting ActionController.. Rails Version: #{version}"
28
28
 
29
29
  ActiveSupport::Notifications.subscribe('start_processing.action_controller') do |name, start, finish, id, payload|
30
- if @obj.config.agent_enabled && @obj.txn_util.listen?(payload[:path])
31
- url = "#{payload[:path]} #{payload[:controller]}##{payload[:action]}"
30
+ path = payload[:path].partition("?")[0]
31
+ if @obj.config.agent_enabled && @obj.txn_util.listen?(path)
32
+ url = "#{path} #{payload[:controller]}##{payload[:action]}"
32
33
  railsTracker = ManageEngine::Tracker::RootTracker.new(url, start.to_f * 1000)
33
34
  Thread.current[:apminsight] = railsTracker
34
35
  end
@@ -242,18 +242,36 @@ class APMWorker
242
242
 
243
243
 
244
244
  def mapdx res,dat
245
- res[0] = res[0]+dat[0];
246
- if dat[1]<res[1]
247
- res[1]=dat[1]
248
- end
249
- if dat[2]>res[2]
250
- res[2]=dat[2]
251
- end
252
- res[3] = res[3]+dat[3]
253
- res[5] = res[5]+dat[5]
254
- res[6] = res[6]+dat[6]
255
- res[7] = res[7]+dat[7]
256
- res[4] = (res[5].to_f + (res[6].to_f/2).to_f).to_f/res[3].to_f
245
+ begin
246
+ rtData = res[0];
247
+ rtData[0] = rtData[0]+dat[0][0];
248
+ if dat[0][1]<rtData[1]
249
+ rtData[1]=dat[0][1]
250
+ end
251
+ if dat[0][2]>rtData[2]
252
+ rtData[2]=dat[0][2]
253
+ end
254
+ rtData[3] = rtData[3]+dat[0][3]
255
+ rtData[5] = rtData[5]+dat[0][5]
256
+ rtData[6] = rtData[6]+dat[0][6]
257
+ rtData[7] = rtData[7]+dat[0][7]
258
+ rtData[4] = rtData[3] != 0 ? (rtData[5].to_f + (rtData[6].to_f/2).to_f).to_f/rtData[3].to_f : 0
259
+ res[0] = rtData
260
+
261
+ resExcepData = res[1][@obj.constants.mf_logmetric]
262
+ excepData = dat[1][@obj.constants.mf_logmetric]
263
+ if (resExcepData == nil)
264
+ resExcepData = excepData
265
+ else
266
+ if (excepData != nil)
267
+ resExcepData = resExcepData.merge(excepData){|key, oldval, newval| newval + oldval}
268
+ end
269
+ end
270
+
271
+ res[1][@obj.constants.mf_logmetric] = resExcepData != nil ? resExcepData : Hash.new
272
+ rescue Exception=>e
273
+ @obj.log.logException "Exception while merging data",e
274
+ end
257
275
  res
258
276
  end
259
277
 
@@ -266,6 +284,7 @@ class APMWorker
266
284
  res[2]=dat[2]
267
285
  end
268
286
  res[3] = res[3]+dat[3]
287
+ res[4] = res[4]+dat[4]
269
288
  res
270
289
  end
271
290
 
data/lib/version.rb CHANGED
@@ -6,8 +6,8 @@
6
6
 
7
7
  module ManageEngine
8
8
  class APMInsight
9
- VERSION = '1.5.1'
9
+ VERSION = '1.5.2'
10
10
  MAJOR_VERSION = '1.5'
11
- MINOR_VERSION = '1'
11
+ MINOR_VERSION = '2'
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: site24x7_apminsight
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-08-03 00:00:00.000000000Z
12
+ date: 2017-09-13 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: shoulda
16
- requirement: &22963920 !ruby/object:Gem::Requirement
16
+ requirement: &21882576 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *22963920
24
+ version_requirements: *21882576
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &23401392 !ruby/object:Gem::Requirement
27
+ requirement: &22320048 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *23401392
35
+ version_requirements: *22320048
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: jeweler
38
- requirement: &23748876 !ruby/object:Gem::Requirement
38
+ requirement: &22667532 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.6.4
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *23748876
46
+ version_requirements: *22667532
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rcov
49
- requirement: &23913468 !ruby/object:Gem::Requirement
49
+ requirement: &22832124 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *23913468
57
+ version_requirements: *22832124
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rails
60
- requirement: &23932512 !ruby/object:Gem::Requirement
60
+ requirement: &22851168 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: 3.0.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *23932512
68
+ version_requirements: *22851168
69
69
  description: Site24x7 APMInsight gives you end-to-end web-transaction awareness of
70
70
  Rails applications enabling you to isolate performance issues and resolve them quickly.
71
71
  To monitor Rails application performance, download and deploy Ruby agent(site24x7_apminsight)