site24x7_apminsight 1.3 → 1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ require 'version'
7
7
 
8
8
  module ManageEngine
9
9
  class APMConfig
10
- attr_reader :agenthost,:agentport,:instance_id,:alreadyconnected,:apmhost,:apmport,:license_key,:site24x7
10
+ attr_reader :agenthost,:agentport,:instance_id,:alreadyconnected,:apmhost,:apmport,:license_key,:site24x7, :site24x7url
11
11
  attr_reader :appname,:proxyneeded, :apdex_t, :trans_trace, :trans_trace_t, :sql_capture, :sql_capture_params, :sql_trace_t,:proxy_user,:proxy_pass, :metric_overflow_t, :trace_overflow_t
12
12
  attr_reader :proxy_host,:proxy_port ,:is_secured, :logs_dir ,:connection_retry,:agent_enabled,:connect_interval,:db_operations,:include_packages, :url_merge_pattern
13
13
  attr_accessor :app_db,:app_dispatcher,:lastupdatedtime
@@ -23,6 +23,9 @@ module ManageEngine
23
23
  @agent_enabled = false
24
24
  @alreadyconnected = checkAgentInfo
25
25
  @site24x7 = checkLicenseFile
26
+ if (@site24x7)
27
+ @site24x7url = @license_key.start_with?('eu') ? @obj.constants.site24x7EUurl : @obj.constants.site24x7USurl
28
+ end
26
29
  @db_operations =["select","insert","update","delete"]
27
30
  urlMergePattern
28
31
  @obj.log.debug "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
@@ -153,6 +156,7 @@ module ManageEngine
153
156
  @sql_trace_t=3
154
157
  @metric_overflow_t=250
155
158
  @trace_overflow_t=60
159
+ @site24x7url = @obj.constants.site24x7USurl #default agent communication URL
156
160
  end
157
161
 
158
162
  def assignConfig
@@ -173,7 +173,7 @@ module ManageEngine
173
173
 
174
174
  apx_stat = nil
175
175
  if(@transaction.has_key?(path))
176
- apx_stat = @transaction[path]
176
+ apx_stat = @transaction[path][0]
177
177
  else
178
178
  apx_stat = Array.new
179
179
  apx_stat = [0,0,0,0,0,0,0,0,0]
@@ -238,7 +238,7 @@ module ManageEngine
238
238
  # Updates resp time, min rt and max rt in apdex metric
239
239
  def updatert apx_stat,rt
240
240
  # Apmagent::ApmLogger.instance.info "updatert : start"
241
- apx_stat[3] = apx_stat[3] +1
241
+ apx_stat[3] = apx_stat[3] + 1
242
242
  apx_stat[0] = apx_stat[0] + rt
243
243
  if(apx_stat[1] == 0 || rt < apx_stat[1])
244
244
  apx_stat[1] = rt
@@ -40,7 +40,8 @@ module ManageEngine
40
40
  @obj.constants.mf_loginfo_level=>@obj.constants.mf_loginfo_level_warn,
41
41
  @obj.constants.mf_loginfo_str=>exception[1],
42
42
  @obj.constants.mf_loginfo_err_clz=>exception[0],
43
- @obj.constants.mf_loginfo_st=>formatStacktrace(arr["payload"][:exception_object].backtrace)}
43
+ @obj.constants.mf_loginfo_st=>arr["payload"][:exception_object] != nil ?
44
+ formatStacktrace(arr["payload"][:exception_object].backtrace) : nil}
44
45
  exceptionInfo.push(logInfo)
45
46
  end
46
47
 
@@ -75,7 +75,7 @@ module ManageEngine
75
75
  if(@obj.config.apmhost != nil && !@obj.config.apmhost.empty?)
76
76
  u = @obj.config.apmhost+uri
77
77
  else
78
- u = @obj.constants.site24x7url+uri
78
+ u = @obj.config.site24x7url+uri
79
79
  end
80
80
  else
81
81
  #empty license key - print error
@@ -12,9 +12,9 @@ module ManageEngine
12
12
  @obj.log.debug "[ instrumenter ] [ Subscriber for Agent ]"
13
13
  @subscriber = ActiveSupport::Notifications.subscribe do |name, start, finish, id, payload|
14
14
  if(ManageEngine::APMObjectHolder.instance.config.agent_enabled)
15
- rt = (finish-start).to_i
15
+ #rt = (finish-start).to_i
16
16
  ManageEngine::APMWorker.getInstance.start
17
- ManageEngine::APMObjectHolder.instance.log.debug "[ Notifications for Agent ] #{Thread.current} #{id} #{name} - #{rt} - #{payload[:path]}"
17
+ ManageEngine::APMObjectHolder.instance.log.debug "[ Notifications for Agent ] #{Thread.current} #{id} #{name} - #{payload[:path]}"
18
18
  #trace= caller;
19
19
  id = "#{Thread.current}"
20
20
  stats = Hash.new
@@ -23,7 +23,7 @@ module ManageEngine
23
23
  stats["end"] = finish.to_f * 1000;
24
24
  stats["id"] = id;
25
25
  stats["payload"] = payload;
26
- if (name=="sql.active_record" && (finish-start)>=(ManageEngine::APMObjectHolder.instance.config.sql_trace_t * 1000 ).to_i)
26
+ if (name=="sql.active_record" && (finish.to_f - start.to_f)>=(ManageEngine::APMObjectHolder.instance.config.sql_trace_t).to_f)
27
27
  stats["trace"] = caller(20); # Taking stacktrace of depth 20
28
28
  end
29
29
  stats["ctime"] =ManageEngine::APMObjectHolder.instance.util.currenttimemillis;
@@ -2,7 +2,7 @@
2
2
  module ManageEngine
3
3
  class APMConstants
4
4
 
5
- attr_reader :apm_gem,:s247_apm_gem,:apm_conf,:agent_conf,:connection_open_timeout,:connection_read_timeout,:connect_uri,:connect_data_uri,:connect_trace_uri,:connect_config_update_uri,:site24x7url, :mergepattern_conf
5
+ attr_reader :apm_gem,:s247_apm_gem,:apm_conf,:agent_conf,:connection_open_timeout,:connection_read_timeout,:connect_uri,:connect_data_uri,:connect_trace_uri,:connect_config_update_uri,:site24x7USurl, :site24x7EUurl, :mergepattern_conf
6
6
  attr_reader :licence_exceeds,:licence_expired,:unmanage_agent,:manage_agent,:agent_config_updated,:error_notfound,:error_server,:delete_agent,:response_code,:custom_config_info
7
7
  attr_reader :mf_transaction,:mf_separator,:mf_db,:mf_apdex,:mf_namespace,:mf_name,:mf_all,:agent_store,:agent_lock,:mf_overflow
8
8
  attr_reader :mf_logmetric, :mf_logmetric_warning, :mf_exception_st, :mf_err_st, :mf_loginfo, :mf_loginfo_time, :mf_loginfo_level, :mf_loginfo_str, :mf_loginfo_err_clz, :mf_loginfo_st, :mf_loginfo_level_warn
@@ -48,8 +48,10 @@ module ManageEngine
48
48
  @connect_config_update_uri="arh/agent_config_update?instance_id="
49
49
 
50
50
  #Site24x7 url for agent communication
51
- @site24x7url="https://plusinsight.site24x7.com/"
51
+ @site24x7USurl="https://plusinsight.site24x7.com/"
52
52
 
53
+ @site24x7EUurl = "https://plusinsight.site24x7.eu/"
54
+
53
55
  #Response Codes
54
56
  @licence_expired = 701
55
57
  @licence_exceeds = 702
data/lib/version.rb CHANGED
@@ -6,8 +6,8 @@
6
6
 
7
7
  module ManageEngine
8
8
  class APMInsight
9
- VERSION = '1.3'
10
- MAJOR_VERSION = '1.3'
9
+ VERSION = '1.4'
10
+ MAJOR_VERSION = '1.4'
11
11
  MINOR_VERSION = '0'
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.3'
4
+ version: '1.4'
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-01-25 00:00:00.000000000Z
12
+ date: 2017-04-13 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: shoulda
16
- requirement: &27221448 !ruby/object:Gem::Requirement
16
+ requirement: &23037804 !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: *27221448
24
+ version_requirements: *23037804
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &27221160 !ruby/object:Gem::Requirement
27
+ requirement: &23037516 !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: *27221160
35
+ version_requirements: *23037516
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: jeweler
38
- requirement: &27220872 !ruby/object:Gem::Requirement
38
+ requirement: &23037228 !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: *27220872
46
+ version_requirements: *23037228
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rcov
49
- requirement: &27220584 !ruby/object:Gem::Requirement
49
+ requirement: &23036940 !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: *27220584
57
+ version_requirements: *23036940
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rails
60
- requirement: &27220296 !ruby/object:Gem::Requirement
60
+ requirement: &23036652 !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: *27220296
68
+ version_requirements: *23036652
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)