site24x7_apminsight 1.5 → 1.5.1
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.
|
@@ -8,7 +8,7 @@ require 'version'
|
|
|
8
8
|
module ManageEngine
|
|
9
9
|
class APMConfig
|
|
10
10
|
attr_reader :agenthost,:agentport,:instance_id,:alreadyconnected,:apmhost,:apmport,:license_key,:site24x7, :site24x7url
|
|
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
|
|
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, :dbmetric_overflow_t
|
|
12
12
|
attr_reader :proxy_host,:proxy_port ,:is_secured, :logs_dir ,:connection_retry,:agent_enabled,:connect_interval,:db_operations,:txn_skip_listen, :url_merge_pattern
|
|
13
13
|
attr_accessor :app_db,:app_dispatcher,:lastupdatedtime
|
|
14
14
|
def initialize
|
|
@@ -28,15 +28,15 @@ module ManageEngine
|
|
|
28
28
|
end
|
|
29
29
|
@db_operations =["select","insert","update","delete"]
|
|
30
30
|
urlMergePattern
|
|
31
|
-
@obj.log.
|
|
32
|
-
@obj.log.
|
|
33
|
-
@obj.log.
|
|
34
|
-
@obj.log.
|
|
35
|
-
@obj.log.
|
|
36
|
-
@obj.log.
|
|
37
|
-
@obj.log.
|
|
38
|
-
@obj.log.
|
|
39
|
-
@obj.log.
|
|
31
|
+
@obj.log.info "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
|
|
32
|
+
@obj.log.info "APP HOME #{File.absolute_path(".")} "
|
|
33
|
+
@obj.log.info "APP HOME #{Dir.pwd} "
|
|
34
|
+
@obj.log.info "Agent Version : #{ManageEngine::APMInsight::VERSION}"
|
|
35
|
+
@obj.log.info "Configuration : "
|
|
36
|
+
@obj.log.info "Hostname : #{@agenthost}"
|
|
37
|
+
@obj.log.info "Agent Already Connected : #{@alreadyconnected}"
|
|
38
|
+
@obj.log.info "Agent Enabled : #{@agent_enabled}"
|
|
39
|
+
@obj.log.info "Allowed DB Operations : #{@db_operations}"
|
|
40
40
|
@config.each do|key,val|
|
|
41
41
|
@obj.log.info "#{key} => #{val}"
|
|
42
42
|
end
|
|
@@ -44,7 +44,7 @@ module ManageEngine
|
|
|
44
44
|
@url_merge_pattern.each do |key, val|
|
|
45
45
|
@obj.log.info "#{key} => #{val}"
|
|
46
46
|
end
|
|
47
|
-
@obj.log.
|
|
47
|
+
@obj.log.info "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
|
|
48
48
|
@app_db="dummydb"
|
|
49
49
|
@app_dispatcher = getDispatcher
|
|
50
50
|
@lastupdatedtime=File.mtime(@obj.constants.apm_conf).to_i
|
|
@@ -155,7 +155,8 @@ module ManageEngine
|
|
|
155
155
|
@trans_trace_t=2
|
|
156
156
|
@sql_trace_t=3
|
|
157
157
|
@metric_overflow_t=250
|
|
158
|
-
|
|
158
|
+
@dbmetric_overflow_t=500
|
|
159
|
+
@trace_overflow_t=30
|
|
159
160
|
@site24x7url = @obj.constants.site24x7USurl #default agent communication URL
|
|
160
161
|
end
|
|
161
162
|
|
|
@@ -188,9 +189,13 @@ module ManageEngine
|
|
|
188
189
|
when "proxy.auth.password" then @proxy_pass=value
|
|
189
190
|
when "apm.protocol.https" then @is_secured=@obj.util.getBooleanValue value
|
|
190
191
|
when "apminsight.log.dir" then @logs_dir=value
|
|
192
|
+
when "apminsight.log.level" then @obj.log.setLevel value
|
|
191
193
|
when "agent.connection.retry" then @connection_retry=value #Not in Conf - yet to come
|
|
192
|
-
|
|
193
|
-
|
|
194
|
+
when "agent.polling.interval" then @connect_interval=isInteger(@connect_interval, value)#Not in Conf - yet to come
|
|
195
|
+
when "transaction.skip.listening" then @txn_skip_listen=@obj.util.getArray value.gsub("\s", ""),","
|
|
196
|
+
when "metricstore.metric.bucket.size" then @metric_overflow_t = isInteger(@metric_overflow_t, value)
|
|
197
|
+
when "metricstore.dbmetric.bucket.size" then @dbmetric_overflow_t = isInteger(@dbmetric_overflow_t, value)
|
|
198
|
+
when "transaction.tracestore.size" then @trace_overflow_t = isInteger(@trace_overflow_t, value)
|
|
194
199
|
end
|
|
195
200
|
end
|
|
196
201
|
end
|
|
@@ -19,7 +19,7 @@ module ManageEngine
|
|
|
19
19
|
@apmlog.level = Logger::INFO
|
|
20
20
|
@apmlog.datetime_format = "%Y-%m-%d %H:%M:%S"
|
|
21
21
|
@apmlog.formatter = proc do |severity, datetime, progname, msg|
|
|
22
|
-
"[#{datetime}|#{Process.pid}]:#{msg}\n"
|
|
22
|
+
"[#{datetime}|#{Process.pid}][#{severity}]:#{msg}\n"
|
|
23
23
|
end
|
|
24
24
|
@apmlog.debug("[LOGGER] APM Agent Logging Initialized")
|
|
25
25
|
|
|
@@ -172,6 +172,10 @@ module ManageEngine
|
|
|
172
172
|
if(@transaction.has_key?(path))
|
|
173
173
|
apx_stat = @transaction[path][0]
|
|
174
174
|
else
|
|
175
|
+
if @transaction.length == @obj.config.metric_overflow_t
|
|
176
|
+
@obj.log.debug "Metricstore overflow. Current Size: #{@obj.config.metric_overflow_t} #{path}"
|
|
177
|
+
return
|
|
178
|
+
end
|
|
175
179
|
apx_stat = Array.new
|
|
176
180
|
apx_stat = [0,0,0,0,0,0,0,0,0]
|
|
177
181
|
end
|
|
@@ -189,10 +193,10 @@ module ManageEngine
|
|
|
189
193
|
|
|
190
194
|
@transaction[path] = [apx_stat, additionalInfo]
|
|
191
195
|
if(dbl!=nil)
|
|
192
|
-
if @db.length < @obj.config.
|
|
196
|
+
if @db.length < @obj.config.dbmetric_overflow_t
|
|
193
197
|
updatedb dbl,path
|
|
194
|
-
elsif @db.length == @obj.config.
|
|
195
|
-
|
|
198
|
+
elsif @db.length == @obj.config.dbmetric_overflow_t
|
|
199
|
+
@obj.log.debug "DB metric overflow. Current Size: #{@obj.config.dbmetric_overflow_t} #{path}"
|
|
196
200
|
#@obj.log.info "data = #{@db}"
|
|
197
201
|
of = Hash.new
|
|
198
202
|
stats = Array.new
|
|
@@ -92,7 +92,7 @@ module ManageEngine
|
|
|
92
92
|
@obj.log.debug "dummy trace added"
|
|
93
93
|
return parseddata
|
|
94
94
|
elsif tData.length > @obj.config.trace_overflow_t
|
|
95
|
-
@obj.log.debug "trace threshold exceeded"
|
|
95
|
+
@obj.log.debug "trace threshold exceeded. Current Size: #{@obj.config.trace_overflow_t}"
|
|
96
96
|
return parseddata
|
|
97
97
|
end
|
|
98
98
|
end
|
|
@@ -42,7 +42,7 @@ module ManageEngine
|
|
|
42
42
|
def apminsight_route_eval(*args, &block)
|
|
43
43
|
|
|
44
44
|
# http://www.rubydoc.info/github/rack/rack/master/Rack/Request
|
|
45
|
-
url = env.has_key?('sinatra.route') ? env['sinatra.route'] : @request.path
|
|
45
|
+
url = (env.has_key?('sinatra.route') ? env['sinatra.route'] : @request.path).dup
|
|
46
46
|
@obj = ManageEngine::APMObjectHolder.instance
|
|
47
47
|
|
|
48
48
|
if !@obj.config.agent_enabled || !@obj.txn_util.listen?(url)
|
data/lib/version.rb
CHANGED
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:
|
|
4
|
+
version: 1.5.1
|
|
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-
|
|
12
|
+
date: 2017-08-03 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: shoulda
|
|
16
|
-
requirement: &
|
|
16
|
+
requirement: &22963920 !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: *
|
|
24
|
+
version_requirements: *22963920
|
|
25
25
|
- !ruby/object:Gem::Dependency
|
|
26
26
|
name: bundler
|
|
27
|
-
requirement: &
|
|
27
|
+
requirement: &23401392 !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: *
|
|
35
|
+
version_requirements: *23401392
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: jeweler
|
|
38
|
-
requirement: &
|
|
38
|
+
requirement: &23748876 !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: *
|
|
46
|
+
version_requirements: *23748876
|
|
47
47
|
- !ruby/object:Gem::Dependency
|
|
48
48
|
name: rcov
|
|
49
|
-
requirement: &
|
|
49
|
+
requirement: &23913468 !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: *
|
|
57
|
+
version_requirements: *23913468
|
|
58
58
|
- !ruby/object:Gem::Dependency
|
|
59
59
|
name: rails
|
|
60
|
-
requirement: &
|
|
60
|
+
requirement: &23932512 !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: *
|
|
68
|
+
version_requirements: *23932512
|
|
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)
|