site24x7_apminsight 1.9.1 → 1.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.rdoc +18 -20
- data/Rakefile +4 -4
- data/VERSION +1 -1
- data/lib/agent/configuration/am_configuration.rb +37 -0
- data/lib/agent/handler/sequence_book.rb +32 -28
- data/lib/agent/logging/am_logger.rb +2 -2
- data/lib/agent/metrics/am_metricsformatter.rb +43 -5
- data/lib/agent/metrics/am_metricsparser.rb +143 -79
- data/lib/agent/server/instrument/rails.rb +21 -18
- data/lib/agent/server/worker/am_worker.rb +24 -2
- data/lib/agent/trackers/database_tracker.rb +35 -4
- data/lib/agent/trackers/default_tracker.rb +33 -2
- data/lib/agent/trackers/root_tracker.rb +15 -10
- data/lib/agent/util/am_constants.rb +12 -0
- data/lib/agent/version.rb +2 -2
- metadata +6 -7
- data/conf/apminsight.conf +0 -86
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef71f92d00c156ed7effd7fa726820409f00bab68076033c970d6ceec197c8d5
|
4
|
+
data.tar.gz: '095a029352700363cfdc03029946c7d76d1e529c5e9d421bb0526fe25f9ccd53'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c187ad0e32c93c24e772b470c7b732285187bccf36687981ab28ae41935ad0bbfebe2ca04a60cafd4a3af2e08837ebb70e8e6ff8b269c8f4a8aa497284566cd5
|
7
|
+
data.tar.gz: 6b0233843a2a86cca28cdf2f29531c546eebbfafb59ff9909efa371d16250a1cd3f8f9738a8a68d6ac165c40b9e742b40235e78418136b2d7b724ac96af6bc71
|
data/LICENSE.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
This License Agreement details the policy for license of
|
1
|
+
This License Agreement details the policy for license of Site24x7 APM Insight Ruby Agent ("Licensed Software")
|
2
2
|
Please read the following license carefully, before either (i) downloading the Licensed Software from an authorized website, or (ii) installing the Licensed Software. You acknowledge that you have read this License Agreement, have understood it, and agree to be bound by its terms. If you do not agree to the terms and conditions of this Agreement, do not download or install the Licensed Software.
|
3
3
|
|
4
4
|
1. LICENSE GRANT
|
data/README.rdoc
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
APM Insight Ruby Agent
|
2
|
-
|
2
|
+
Site24x7 APM Insight Ruby agent gives you end-to-end web-transaction awareness enabling you to isolate performance issues and resolve them quickly. Site24x7 APM Insight requires a monitoring agent (ruby gem) to be deployed in your application server to monitor Ruby application performance. Download the latest Ruby Agent(site24x7_apminsight.gem) and deploy it in your application server. The agent collects application performance metrics and sends it to the central Site24x7 server at fixed intervals i.e. every 60 seconds. You can view them at https://site24x7.com in your accounts page.
|
3
3
|
|
4
4
|
Installing APM Insight Agent
|
5
5
|
|
@@ -7,13 +7,13 @@ Installing APM Insight Agent
|
|
7
7
|
|
8
8
|
* Install from RubyGems by using the following command in the system where Ruby is installed :
|
9
9
|
|
10
|
-
|
10
|
+
gem install site24x7_apminsight
|
11
11
|
|
12
12
|
OR
|
13
13
|
|
14
|
-
|
14
|
+
* Download the site24x7_apminsight.gem file from your accounts page in https://site24x7.com (after sign in) or the RubyGems website and run the command
|
15
15
|
|
16
|
-
gem install
|
16
|
+
gem install site24x7_apminsight.gem
|
17
17
|
|
18
18
|
Configuration
|
19
19
|
|
@@ -21,30 +21,28 @@ Configuration
|
|
21
21
|
|
22
22
|
For each of your applications, add the following line to the application gemfile:
|
23
23
|
|
24
|
-
gem '
|
24
|
+
gem 'site24x7_apminsight'
|
25
25
|
|
26
26
|
OR
|
27
27
|
|
28
28
|
For each of your applications, add the following line to the application initializer block:
|
29
29
|
|
30
|
-
require '
|
30
|
+
require 'site24x7_apminsight'
|
31
31
|
|
32
|
-
A copy of the configuration file apminsight.conf will be available in the <Gem Installed folder> /
|
32
|
+
A copy of the configuration file apminsight.conf will be available in the <Gem Installed folder> /site24x7_apminsight/conf/. Configure the class name in the configuration file(include.packages), so that all the methods in that class can be instrumented and details will be reported in tracedata.
|
33
33
|
|
34
34
|
|
35
35
|
The following configuration options are mandatory and should be provided for the agent to be initialized:
|
36
36
|
|
37
|
-
application.name - The application's name to be displayed in
|
37
|
+
application.name - The application's name to be displayed in Site24x7 server.
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
apm.port - The HTTP port of Applications Manager.
|
39
|
+
license.key - The license api key from your account page after sign in (https://site24x7.com)
|
42
40
|
|
43
41
|
behind.proxy - The proxy network under which the agent is installed
|
44
42
|
|
45
43
|
agent.server.port - The HTTP listening port of the Application Server.
|
46
44
|
|
47
|
-
More configuration options of APM Insight Ruby Agent can be found here.
|
45
|
+
More configuration options of APM Insight Ruby Agent can be found here. https://www.site24x7.com/help/apm/apm-insight-configuration.html
|
48
46
|
|
49
47
|
Supported Environments :
|
50
48
|
|
@@ -54,16 +52,16 @@ Supported Environments :
|
|
54
52
|
|
55
53
|
References
|
56
54
|
|
57
|
-
*
|
58
|
-
|
59
|
-
http://www.manageengine.com/products/applications_manager/
|
55
|
+
* Create an apminsight account in Site24x7 server (https://www.site24x7.com)
|
60
56
|
|
61
|
-
* Download link for
|
57
|
+
* Download link for site24x7_apminsight gem
|
62
58
|
|
63
|
-
|
64
|
-
|
59
|
+
From your account page after valid sign in
|
60
|
+
or
|
61
|
+
http://rubygems.org/gems/site24x7_apminsight
|
65
62
|
|
66
63
|
* Help Documentation for apminsight
|
67
64
|
|
68
|
-
|
69
|
-
|
65
|
+
https://www.site24x7.com/help/apm/ruby-agent.html
|
66
|
+
https://support.site24x7.com/portal/helpcenter/site24x7/apm-insight/ruby-monitoring
|
67
|
+
|
data/Rakefile
CHANGED
@@ -14,13 +14,13 @@ require 'rake'
|
|
14
14
|
require 'jeweler'
|
15
15
|
Jeweler::Tasks.new do |gem|
|
16
16
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
-
gem.name = "
|
18
|
-
gem.homepage = "
|
17
|
+
gem.name = "site24x7_apminsight"
|
18
|
+
gem.homepage = "https://www.site24x7.com/help/apm/ruby-agent.html"
|
19
19
|
gem.license = "MIT"
|
20
20
|
gem.summary = %Q{Application Performace Monitor}
|
21
21
|
gem.description = %Q{Application Performace Monitor : Monitor the web tranasactions}
|
22
22
|
gem.email = "apm-insight@zohocorp.com"
|
23
|
-
gem.authors = ["
|
23
|
+
gem.authors = ["Rajalakshmi Ezhilan"]
|
24
24
|
gem.files=Dir.glob('lib/**/*.*')
|
25
25
|
# dependencies defined in Gemfile
|
26
26
|
end
|
@@ -48,7 +48,7 @@ Rake::RDocTask.new do |rdoc|
|
|
48
48
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
49
49
|
|
50
50
|
rdoc.rdoc_dir = 'rdoc'
|
51
|
-
rdoc.title = "
|
51
|
+
rdoc.title = "site24x7_apminsight #{version}"
|
52
52
|
rdoc.rdoc_files.include('README*')
|
53
53
|
rdoc.rdoc_files.include('lib/**/*.*')
|
54
54
|
rdoc.rdoc_files.include('lib/agent/**/*.*')
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.8.2
|
1
|
+
1.8.2
|
@@ -267,6 +267,28 @@ module ManageEngine
|
|
267
267
|
end
|
268
268
|
|
269
269
|
def getHostType
|
270
|
+
begin
|
271
|
+
# Checking for OpenShift
|
272
|
+
if (ENV.has_key?('OPENSHIFT_BUILD_NAMESPACE'))
|
273
|
+
@obj.log.info "Agent is hosted in OpenShift"
|
274
|
+
@hostType = "DOCKER"
|
275
|
+
return @hostType
|
276
|
+
end
|
277
|
+
# Checking for k8s env
|
278
|
+
if (ENV.has_key?('KUBERNETES_SERVICE_HOST'))
|
279
|
+
@obj.log.info "Agent is hosted in Kubernetes"
|
280
|
+
@hostType = "DOCKER"
|
281
|
+
return @hostType
|
282
|
+
end
|
283
|
+
# Checking for Docker
|
284
|
+
if (File.exist?('/.dockerenv') || File.read('/proc/1/cgroup').include?('docker'))
|
285
|
+
@obj.log.info "Agent is hosted in DOCKER"
|
286
|
+
@hostType = "DOCKER"
|
287
|
+
return @hostType
|
288
|
+
end
|
289
|
+
rescue Exception => e
|
290
|
+
end
|
291
|
+
|
270
292
|
begin
|
271
293
|
# Check for AWS environment
|
272
294
|
url = URI.parse('http://169.254.169.254/latest/meta-data/') # AWS metadata url
|
@@ -275,6 +297,20 @@ module ManageEngine
|
|
275
297
|
if (response.kind_of? Net::HTTPOK)
|
276
298
|
@hostType = "AWS"
|
277
299
|
return @hostType
|
300
|
+
elsif (response.kind_of? Net::HTTPUnauthorized)
|
301
|
+
uri = URI('http://169.254.169.254/latest/api/token')
|
302
|
+
request = Net::HTTP::Put.new(uri)
|
303
|
+
request['X-aws-ec2-metadata-token-ttl-seconds'] = '30'
|
304
|
+
response = Net::HTTP.start(uri.hostname, uri.port) {|http| http.request(request)}
|
305
|
+
token = response.body
|
306
|
+
url = URI.parse('http://169.254.169.254/latest/meta-data/instance-id') # AWS metadata url
|
307
|
+
request = Net::HTTP::Get.new(url.path)
|
308
|
+
request['X-aws-ec2-metadata-token'] = token
|
309
|
+
response = Net::HTTP.start(url.host, url.port, :read_timeout => 2) {|http| http.request(request)}
|
310
|
+
if (response.kind_of? Net::HTTPOK)
|
311
|
+
@hostType = "AWS"
|
312
|
+
return @hostType
|
313
|
+
end
|
278
314
|
end
|
279
315
|
rescue Exception => e
|
280
316
|
end
|
@@ -294,6 +330,7 @@ module ManageEngine
|
|
294
330
|
begin
|
295
331
|
# Check for Heroku env. In the backgroud it is using AWS EC2, hence sending as AWS
|
296
332
|
if (ENV.has_key?('DYNO') || ENV.has_key?('STACK'))
|
333
|
+
@obj.log.info "Agent is hosted in Heroku"
|
297
334
|
@hostType = "AWS"
|
298
335
|
return @hostType
|
299
336
|
end
|
@@ -3,11 +3,11 @@ require 'agent/metrics/exception_record'
|
|
3
3
|
module APMInsight
|
4
4
|
module Agent
|
5
5
|
class SequenceBook
|
6
|
-
attr_reader :openTracker, :
|
6
|
+
attr_reader :openTracker, :rootTracker, :trackerCount, :exceptionBag, :listenFlag
|
7
7
|
|
8
8
|
def initialize
|
9
|
-
@rootTracker =
|
10
|
-
|
9
|
+
@rootTracker = nil
|
10
|
+
#@closedTracker = @rootTracker
|
11
11
|
@openTracker = nil
|
12
12
|
|
13
13
|
@trackerCount = 0
|
@@ -22,32 +22,34 @@ module APMInsight
|
|
22
22
|
end
|
23
23
|
|
24
24
|
# If RootTracker is not set, check type and set
|
25
|
-
if @rootTracker ==
|
25
|
+
if @rootTracker == nil
|
26
26
|
if !tracker.is_a?(ManageEngine::Tracker::RootTracker)
|
27
27
|
closeSequence()
|
28
28
|
return nil
|
29
29
|
end
|
30
30
|
@rootTracker = tracker
|
31
|
-
|
32
31
|
updateListenFlag()
|
33
32
|
end
|
34
33
|
|
34
|
+
tracker.setParent(openTracker)
|
35
|
+
@openTracker = tracker
|
36
|
+
|
35
37
|
|
36
38
|
# Attach tracker as Sibling or Child and set nominee
|
37
|
-
if @closedTracker != nil
|
38
|
-
tracker.sibling = @closedTracker
|
39
|
-
@closedTracker.sibling = tracker # Nominee - if dropped/corrupted, defaults to this tracker
|
40
|
-
@openTracker = tracker
|
41
|
-
@closedTracker = nil
|
42
|
-
else
|
43
|
-
if tracker.equal?(@openTracker)
|
44
|
-
return nil
|
45
|
-
end
|
46
|
-
|
47
|
-
@openTracker.child = tracker
|
48
|
-
tracker.sibling = @openTracker
|
49
|
-
@openTracker = tracker
|
50
|
-
end
|
39
|
+
# if @closedTracker != nil
|
40
|
+
# tracker.sibling = @closedTracker
|
41
|
+
# @closedTracker.sibling = tracker # Nominee - if dropped/corrupted, defaults to this tracker
|
42
|
+
# @openTracker = tracker
|
43
|
+
# @closedTracker = nil
|
44
|
+
# else
|
45
|
+
# if tracker.equal?(@openTracker)
|
46
|
+
# return nil
|
47
|
+
# end
|
48
|
+
#
|
49
|
+
# @openTracker.child = tracker
|
50
|
+
# tracker.sibling = @openTracker
|
51
|
+
# @openTracker = tracker
|
52
|
+
# end
|
51
53
|
|
52
54
|
checkAndArrestSequence()
|
53
55
|
|
@@ -55,24 +57,26 @@ module APMInsight
|
|
55
57
|
end
|
56
58
|
|
57
59
|
def closeTracker tracker
|
58
|
-
@closedTrackerCount += 1
|
59
|
-
@closedTracker = tracker
|
60
|
-
tracker.sibling = nil
|
61
|
-
@openTracker = nil
|
60
|
+
# @closedTrackerCount += 1
|
61
|
+
# @closedTracker = tracker
|
62
|
+
# tracker.sibling = nil
|
63
|
+
# @openTracker = nil
|
64
|
+
@openTracker = tracker.parent;
|
62
65
|
|
63
66
|
# Marks end of transaction
|
64
|
-
if @rootTracker == tracker
|
67
|
+
# if @rootTracker == tracker
|
68
|
+
if @openTracker == nil
|
65
69
|
if @listenFlag < 1 || (@listenFlag >= 1 && @trackerCount > 0)
|
66
70
|
# if some trackers are not closed, while processing the metrics, it may go into infinite loop
|
67
|
-
if (@closedTrackerCount - @trackerCount) == 0
|
71
|
+
# if (@closedTrackerCount - @trackerCount) == 0
|
68
72
|
sequenceBag = Hash.new
|
69
73
|
sequenceBag["roottracker"] = @rootTracker
|
70
74
|
sequenceBag["exceptions"] = @exceptionBag
|
71
75
|
|
72
76
|
ManageEngine::APMObjectHolder.instance.collector.updateTransaction(@rootTracker.url, sequenceBag)
|
73
|
-
else
|
74
|
-
ManageEngine::APMObjectHolder.instance.log.warn "Some trackers are not closed, dropping the metrics for #{@rootTracker.url}"
|
75
|
-
end
|
77
|
+
# else
|
78
|
+
# ManageEngine::APMObjectHolder.instance.log.warn "Some trackers are not closed, dropping the metrics for #{@rootTracker.url}"
|
79
|
+
# end
|
76
80
|
end
|
77
81
|
closeSequence()
|
78
82
|
end
|
@@ -107,8 +107,8 @@ module ManageEngine
|
|
107
107
|
|
108
108
|
|
109
109
|
def logException(msg,e)
|
110
|
-
@apmlog.warn( "#{msg} => #{e.message}")
|
111
|
-
|
110
|
+
@apmlog.warn( "#{msg} => #{e.message} => #{e.backtrace}")
|
111
|
+
#@apmlog.warn( "Message : #{msg}\nTrace :\n#{e.backtrace}")
|
112
112
|
end
|
113
113
|
|
114
114
|
def close
|
@@ -124,6 +124,8 @@ module ManageEngine
|
|
124
124
|
ins_apdx = [0,-1,-1,0,0,0,0,0,0]
|
125
125
|
logmetric = Hash.new
|
126
126
|
error_rt = 0
|
127
|
+
httpstatus = Hash.new
|
128
|
+
|
127
129
|
@transaction.each do |key,value|
|
128
130
|
apdexValue = value[0]
|
129
131
|
ins_apdx[0] += apdexValue[0]
|
@@ -150,16 +152,23 @@ module ManageEngine
|
|
150
152
|
end
|
151
153
|
exceptions = value[1][@obj.constants.mf_logmetric]
|
152
154
|
if (exceptions != nil)
|
153
|
-
|
154
|
-
|
155
|
-
|
155
|
+
logmetric = logmetric.merge(exceptions) { |key, oldval, newval| oldval + newval }
|
156
|
+
# exceptions.each do |name, count|
|
157
|
+
# logmetric[name] = logmetric[name].to_i + count
|
158
|
+
# end
|
156
159
|
end
|
160
|
+
|
161
|
+
status = value[1][@obj.constants.httpstatus]
|
162
|
+
if (status != nil)
|
163
|
+
httpstatus = httpstatus.merge(status) { |key, oldval, newval| oldval + newval }
|
164
|
+
end
|
157
165
|
end
|
158
166
|
if (ins_apdx[3] > 0)
|
159
167
|
ins_apdx[4] = (ins_apdx[5].to_f + (ins_apdx[6]/2).to_f).to_f/ins_apdx[3].to_f
|
160
168
|
ins_apdx[0] = ins_apdx[0].round(2)
|
161
169
|
end
|
162
|
-
|
170
|
+
|
171
|
+
@instance[":apdex"]=[ins_apdx, {@obj.constants.mf_logmetric=>logmetric, @obj.constants.error_rt=>error_rt, @obj.constants.httpstatus=>httpstatus}]
|
163
172
|
end
|
164
173
|
|
165
174
|
def updatebginstance
|
@@ -233,6 +242,7 @@ module ManageEngine
|
|
233
242
|
pl = d["td"]
|
234
243
|
dbl = d["db"]
|
235
244
|
exc = d["exception"]
|
245
|
+
# comp = d["comp"]
|
236
246
|
|
237
247
|
rt = pl["rt"].round(2)
|
238
248
|
# path = @obj.constants.mf_transaction + @obj.constants.mf_separator + pl["path"]
|
@@ -266,6 +276,20 @@ module ManageEngine
|
|
266
276
|
apx_stat = apxarray apx_stat,rt
|
267
277
|
end
|
268
278
|
|
279
|
+
if (pl.has_key?("status"))
|
280
|
+
statusHash = additionalInfo[@obj.constants.httpstatus]
|
281
|
+
if (statusHash == nil)
|
282
|
+
statusHash = Hash.new
|
283
|
+
additionalInfo[@obj.constants.httpstatus] = statusHash
|
284
|
+
end
|
285
|
+
|
286
|
+
if (statusHash.has_key?(pl["status"]))
|
287
|
+
statusHash[pl["status"]] += 1
|
288
|
+
else
|
289
|
+
statusHash[pl["status"]] = 1
|
290
|
+
end
|
291
|
+
end
|
292
|
+
|
269
293
|
if (exc != nil)
|
270
294
|
logmetric = additionalInfo[@obj.constants.mf_logmetric]
|
271
295
|
if (logmetric == nil)
|
@@ -277,6 +301,20 @@ module ManageEngine
|
|
277
301
|
end
|
278
302
|
end
|
279
303
|
|
304
|
+
# if (comp != nil)
|
305
|
+
# begin
|
306
|
+
# compData = additionalInfo[@obj.constants.components]
|
307
|
+
# if (compData == nil)
|
308
|
+
# compData = Array.new
|
309
|
+
# additionalInfo[@obj.constants.components] = compData
|
310
|
+
# end
|
311
|
+
# comp.each do |name, info|
|
312
|
+
# if (compData.has)
|
313
|
+
# end
|
314
|
+
# rescue Exception=>e
|
315
|
+
# end
|
316
|
+
# end
|
317
|
+
|
280
318
|
@transaction[path] = [apx_stat, additionalInfo]
|
281
319
|
else
|
282
320
|
stat = nil
|
@@ -417,7 +455,7 @@ module ManageEngine
|
|
417
455
|
opstats = @dboperations[operation]
|
418
456
|
else
|
419
457
|
opstats = Array.new;
|
420
|
-
opstats = [0
|
458
|
+
opstats = [0,rt,rt,0,0]
|
421
459
|
end
|
422
460
|
|
423
461
|
if (isError)
|
@@ -25,6 +25,10 @@ module ManageEngine
|
|
25
25
|
tdata["td"] = getTransData(rootTracker,tdata)
|
26
26
|
tdata["db"] = getDBData(rootTracker, tdata, exceptionInfo)
|
27
27
|
|
28
|
+
if (rootTracker.error?) # root tracker will be left out in above flow
|
29
|
+
updateExceptionMetric(rootTracker.error, tdata) # <= previously it was 'ret'
|
30
|
+
updateExceptionInfo(exceptionInfo, rootTracker.endtime.to_i, rootTracker.error)
|
31
|
+
end
|
28
32
|
exceptionBag = seqData["exceptions"]
|
29
33
|
if exceptionBag != nil
|
30
34
|
exceptionBag.each do |exceptionRecord|
|
@@ -87,14 +91,15 @@ module ManageEngine
|
|
87
91
|
tData.push(trac)
|
88
92
|
parseddata["trace-data"]=tData
|
89
93
|
@obj.log.debug "dummy trace added"
|
94
|
+
@obj.log.debug "trace threshold exceeded. Current Size: #{@obj.config.trace_overflow_t}"
|
90
95
|
return parseddata
|
91
96
|
elsif tData.length > @obj.config.trace_overflow_t
|
92
|
-
@obj.log.debug "trace threshold exceeded. Current Size: #{@obj.config.trace_overflow_t}"
|
93
97
|
return parseddata
|
94
98
|
end
|
95
99
|
end
|
96
100
|
begin
|
97
|
-
trdata = getTrace(rootTracker)
|
101
|
+
#trdata = getTrace(rootTracker)
|
102
|
+
trdata = rootTracker.getTrace()
|
98
103
|
trac = updateTrace(rootTracker, trdata, exceptionInfo)
|
99
104
|
if(parseddata.has_key?("trace-data"))
|
100
105
|
traceData = parseddata["trace-data"];
|
@@ -141,6 +146,10 @@ module ManageEngine
|
|
141
146
|
ret["error"] = true
|
142
147
|
end
|
143
148
|
end
|
149
|
+
if (rootTracker.getStatus != nil && rootTracker.getStatus >= 400)
|
150
|
+
ret["status"] = rootTracker.getStatus
|
151
|
+
ret["error"] = true
|
152
|
+
end
|
144
153
|
rescue Exception=>e
|
145
154
|
#@obj.log.logException "Exception in getTranseData: #{e.message}",e
|
146
155
|
raise e
|
@@ -150,38 +159,92 @@ module ManageEngine
|
|
150
159
|
|
151
160
|
# Generates DB metric
|
152
161
|
def getDBData(tracker, tdata, exceptionInfo)
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
162
|
+
if (tracker != nil)
|
163
|
+
children = tracker.children
|
164
|
+
children.each do |child|
|
165
|
+
tdata["db"] = getDBData(child, tdata, exceptionInfo)
|
166
|
+
if child.kind_of?(ManageEngine::Tracker::DatabaseTracker)
|
167
|
+
if tdata["db"] == nil
|
168
|
+
tdata["db"] = Array.new
|
169
|
+
end
|
170
|
+
queryInfo = child.getQueryInfo
|
171
|
+
sqlStrip = queryInfo[0] + "/" + queryInfo[1] + "/dummydb"
|
172
|
+
ret ={"rt"=>child.duration, "sql"=>child.getRawQuery,
|
173
|
+
"sql-strip"=>sqlStrip, "name"=>child.name, "operation"=>queryInfo[0]}
|
174
|
+
|
175
|
+
if (child.error?)
|
176
|
+
ret["error"] = true
|
177
|
+
end
|
178
|
+
|
179
|
+
tdata["db"].push(ret)
|
180
|
+
end ## DBTracker check
|
181
|
+
|
182
|
+
# updateComponentData(child, tdata)
|
183
|
+
if (child.error?)
|
184
|
+
updateExceptionMetric(child.error, tdata) # <= previously it was 'ret'
|
185
|
+
updateExceptionInfo(exceptionInfo, child.endtime.to_i, child.error)
|
186
|
+
end
|
187
|
+
end #end of children iteration
|
188
|
+
|
189
|
+
# tdata["db"] = getDBData(tracker.child, tdata, exceptionInfo)
|
190
|
+
#
|
191
|
+
# if tracker.kind_of?(ManageEngine::Tracker::DatabaseTracker)
|
192
|
+
# if tdata["db"] == nil
|
193
|
+
# tdata["db"] = Array.new
|
194
|
+
# end
|
195
|
+
#
|
196
|
+
# queryInfo = tracker.getQueryInfo
|
197
|
+
# sqlStrip = queryInfo[0] + "/" + queryInfo[1] + "/dummydb"
|
198
|
+
#
|
199
|
+
# ret ={"rt"=>tracker.duration, "sql"=>tracker.getRawQuery,
|
200
|
+
# "sql-strip"=>sqlStrip, "name"=>tracker.name, "operation"=>queryInfo[0]}
|
201
|
+
#
|
202
|
+
# if (tracker.error?)
|
203
|
+
# ret["error"] = true
|
204
|
+
# end
|
205
|
+
#
|
206
|
+
# tdata["db"].push(ret)
|
207
|
+
# end ## DBTracker check
|
208
|
+
#
|
209
|
+
# if (tracker.error?)
|
210
|
+
# updateExceptionMetric(tracker.error, tdata) # <= previously it was 'ret'
|
211
|
+
# updateExceptionInfo(exceptionInfo, tracker.endtime.to_i, tracker.error)
|
212
|
+
# end
|
213
|
+
#
|
214
|
+
# tracker = tracker.sibling
|
215
|
+
end ## if tracker nil
|
181
216
|
|
182
217
|
tdata["db"]
|
183
218
|
end
|
184
219
|
|
220
|
+
def updateComponentData (tracker, tdata)
|
221
|
+
begin
|
222
|
+
compData = tdata["comp"]
|
223
|
+
if (compData == nil)
|
224
|
+
compData = Hash.new
|
225
|
+
tdata["comp"] = compData
|
226
|
+
end
|
227
|
+
info = compData[tracker.component]
|
228
|
+
if (info == nil)
|
229
|
+
info = Hash.new
|
230
|
+
compData[tracker.component] = info
|
231
|
+
info[@obj.constants.component_name] = tracker.component
|
232
|
+
info[@obj.constants.component_time] = tracker.duration
|
233
|
+
info[@obj.constants.component_count] = 1
|
234
|
+
if (tracker.error?)
|
235
|
+
info[@obj.constants.component_error_count] = 1
|
236
|
+
end
|
237
|
+
else
|
238
|
+
info[@obj.constants.component_time] += tracker.duration
|
239
|
+
info[@obj.constants.component_count] += 1
|
240
|
+
if (tracker.error?)
|
241
|
+
info[@obj.constants.component_error_count] += 1
|
242
|
+
end
|
243
|
+
end
|
244
|
+
rescue Exception=>e
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
185
248
|
def updateExceptionMetric (exception, tdata)
|
186
249
|
excData = tdata["exception"]
|
187
250
|
if (excData == nil)
|
@@ -197,7 +260,8 @@ module ManageEngine
|
|
197
260
|
# {"thread_name":"http-8080-6","s_time":1326276180289,"t_name":"transaction\/http\/Test-App\/login","r_time":18,"thread_id":141}
|
198
261
|
top = Array.new
|
199
262
|
path = roottracker.getTxnName
|
200
|
-
det = {"
|
263
|
+
det = {"s_time"=>trans[0],"t_name"=>path,"r_time"=>trans[3]}
|
264
|
+
det = det.merge(roottracker.getTraceInfo)
|
201
265
|
|
202
266
|
exception = trans[5] != nil ? trans[5][@obj.constants.mf_exception_st] : nil
|
203
267
|
if (exception != nil)
|
@@ -213,54 +277,54 @@ module ManageEngine
|
|
213
277
|
top
|
214
278
|
end
|
215
279
|
|
216
|
-
def getTrace(rootTracker)
|
217
|
-
trace = Array.new
|
218
|
-
traceDetails(rootTracker, trace)
|
219
|
-
|
220
|
-
return trace[0]
|
221
|
-
end
|
222
|
-
|
223
|
-
def traceDetails tracker, traceArr
|
224
|
-
|
225
|
-
siblingDuration = 0
|
226
|
-
|
227
|
-
while tracker != nil
|
228
|
-
|
229
|
-
childTrace = Array.new
|
230
|
-
childDuration = traceDetails tracker.child, childTrace
|
231
|
-
|
232
|
-
traceItem = Array.new
|
233
|
-
traceItem[0] = tracker.starttime
|
234
|
-
if tracker.kind_of?(ManageEngine::Tracker::DatabaseTracker)
|
235
|
-
queryInfo = tracker.getQueryInfo
|
236
|
-
traceItem[1] = queryInfo[0] + " - " + queryInfo[1]
|
237
|
-
else
|
238
|
-
traceItem[1] = tracker.name
|
239
|
-
end
|
240
|
-
traceItem[2] = ""
|
241
|
-
traceItem[3] = tracker.duration
|
242
|
-
traceItem[4] = tracker.duration - childDuration
|
243
|
-
traceItem[5] = tracker.getAdditionalInfo
|
244
|
-
traceItem[6] = childTrace.empty? ? nil : childTrace
|
245
|
-
|
246
|
-
traceArr.push(traceItem)
|
247
|
-
|
248
|
-
siblingDuration += tracker.duration
|
249
|
-
|
250
|
-
tracker = tracker.sibling
|
251
|
-
end
|
252
|
-
|
253
|
-
return siblingDuration
|
254
|
-
end
|
255
|
-
|
256
|
-
|
257
|
-
def updateExclusiveTrace data
|
258
|
-
childs = data[6]
|
259
|
-
childs.each do |arr|
|
260
|
-
data[4] = data[4] - (updateExclusiveTrace arr)[3]
|
261
|
-
end
|
262
|
-
data
|
263
|
-
end
|
280
|
+
# def getTrace(rootTracker)
|
281
|
+
# trace = Array.new
|
282
|
+
# traceDetails(rootTracker, trace)
|
283
|
+
#
|
284
|
+
# return trace[0]
|
285
|
+
# end
|
286
|
+
#
|
287
|
+
# def traceDetails tracker, traceArr
|
288
|
+
#
|
289
|
+
# siblingDuration = 0
|
290
|
+
#
|
291
|
+
# while tracker != nil
|
292
|
+
#
|
293
|
+
# childTrace = Array.new
|
294
|
+
# childDuration = traceDetails tracker.child, childTrace
|
295
|
+
#
|
296
|
+
# traceItem = Array.new
|
297
|
+
# traceItem[0] = tracker.starttime
|
298
|
+
# if tracker.kind_of?(ManageEngine::Tracker::DatabaseTracker)
|
299
|
+
# queryInfo = tracker.getQueryInfo
|
300
|
+
# traceItem[1] = queryInfo[0] + " - " + queryInfo[1]
|
301
|
+
# else
|
302
|
+
# traceItem[1] = tracker.name
|
303
|
+
# end
|
304
|
+
# traceItem[2] = ""
|
305
|
+
# traceItem[3] = tracker.duration
|
306
|
+
# traceItem[4] = tracker.duration - childDuration
|
307
|
+
# traceItem[5] = tracker.getAdditionalInfo
|
308
|
+
# traceItem[6] = childTrace.empty? ? nil : childTrace
|
309
|
+
#
|
310
|
+
# traceArr.push(traceItem)
|
311
|
+
#
|
312
|
+
# siblingDuration += tracker.duration
|
313
|
+
#
|
314
|
+
# tracker = tracker.sibling
|
315
|
+
# end
|
316
|
+
#
|
317
|
+
# return siblingDuration
|
318
|
+
# end
|
319
|
+
#
|
320
|
+
#
|
321
|
+
# def updateExclusiveTrace data
|
322
|
+
# childs = data[6]
|
323
|
+
# childs.each do |arr|
|
324
|
+
# data[4] = data[4] - (updateExclusiveTrace arr)[3]
|
325
|
+
# end
|
326
|
+
# data
|
327
|
+
# end
|
264
328
|
|
265
329
|
|
266
330
|
end
|
@@ -24,34 +24,37 @@ module ManageEngine
|
|
24
24
|
'Rails'
|
25
25
|
end
|
26
26
|
|
27
|
-
# https://edgeguides.rubyonrails.org/active_support_instrumentation.html#rails-framework-hooks
|
28
|
-
|
29
27
|
def instrument
|
30
28
|
@obj = ManageEngine::APMObjectHolder.instance
|
31
29
|
@obj.log.info "Instrumenting ActionController.. Rails Version: #{version}"
|
32
|
-
@railsTracker = nil
|
33
30
|
|
34
31
|
ActiveSupport::Notifications.subscribe('start_processing.action_controller') do |name, start, finish, id, payload|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
32
|
+
result = payload[:path].partition("?")
|
33
|
+
railsTracker = ManageEngine::Tracker::RootTracker.new("#{payload[:controller]}.#{payload[:action]}", start.to_f * 1000)
|
34
|
+
railsTracker.url=(result[0])
|
35
|
+
railsTracker.queryString(result[2]) # even if value not available empty string will be returned
|
36
|
+
railsTracker.http_method(payload[:method])
|
37
|
+
railsTracker.http_params(payload[:params])
|
38
|
+
|
39
|
+
railsTracker = ManageEngine::Agent::TrackerHandler.invokeTracker(railsTracker)
|
40
|
+
Thread.current[:railsTracker] = railsTracker
|
42
41
|
end # subscribe
|
43
42
|
|
44
43
|
|
45
44
|
ActiveSupport::Notifications.subscribe('process_action.action_controller') do |name, start, finish, id, payload|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
45
|
+
begin
|
46
|
+
railsTracker = Thread.current[:railsTracker]
|
47
|
+
if (railsTracker != nil)
|
48
|
+
railsTracker.finish(finish.to_f * 1000)
|
49
|
+
railsTracker.setStatus(payload[:status])
|
50
|
+
exception = payload[:exception_object]
|
51
|
+
if exception != nil
|
52
|
+
railsTracker.setError(exception)
|
53
|
+
end
|
54
|
+
ManageEngine::Agent::TrackerHandler.exitTracker(railsTracker)
|
53
55
|
end
|
54
|
-
|
56
|
+
rescue Exception=>e
|
57
|
+
@obj.log.logException("Unable to process controller event #{name}. Exception: " ,e)
|
55
58
|
end
|
56
59
|
end
|
57
60
|
|
@@ -265,7 +265,18 @@ class APMWorker
|
|
265
265
|
rtData[7] = rtData[7]+dat[0][7]
|
266
266
|
rtData[4] = rtData[3] != 0 ? (rtData[5].to_f + (rtData[6].to_f/2).to_f).to_f/rtData[3].to_f : 0
|
267
267
|
res[0] = rtData
|
268
|
-
|
268
|
+
|
269
|
+
# error_rt merge
|
270
|
+
res_error_rt = res[1][@obj.constants.error_rt];
|
271
|
+
dat_error_rt = dat[1][@obj.constants.error_rt];
|
272
|
+
if (res_error_rt != nil)
|
273
|
+
if (dat_error_rt != nil)
|
274
|
+
res[1][@obj.constants.error_rt] = res_error_rt + dat_error_rt;
|
275
|
+
end
|
276
|
+
elsif (dat_error_rt != nil)
|
277
|
+
res[1][@obj.constants.error_rt] = dat_errror_rt;
|
278
|
+
end
|
279
|
+
|
269
280
|
resExcepData = res[1][@obj.constants.mf_logmetric]
|
270
281
|
excepData = dat[1][@obj.constants.mf_logmetric]
|
271
282
|
if (resExcepData == nil)
|
@@ -296,7 +307,18 @@ class APMWorker
|
|
296
307
|
rtData[3] = rtData[3]+dat[0][3]
|
297
308
|
rtData[4] = rtData[4]+dat[0][4]
|
298
309
|
res[0] = rtData
|
299
|
-
|
310
|
+
|
311
|
+
# error_rt merge
|
312
|
+
res_error_rt = res[1][@obj.constants.error_rt];
|
313
|
+
dat_error_rt = dat[1][@obj.constants.error_rt];
|
314
|
+
if (res_error_rt != nil)
|
315
|
+
if (dat_error_rt != nil)
|
316
|
+
res[1][@obj.constants.error_rt] = res_error_rt + dat_errror_rt;
|
317
|
+
end
|
318
|
+
elsif (dat_error_rt != nil)
|
319
|
+
res[1][@obj.constants.error_rt] = dat_errror_rt;
|
320
|
+
end
|
321
|
+
|
300
322
|
resExcepData = res[1][@obj.constants.mf_logmetric]
|
301
323
|
excepData = dat[1][@obj.constants.mf_logmetric]
|
302
324
|
if (resExcepData == nil)
|
@@ -2,6 +2,11 @@ module ManageEngine
|
|
2
2
|
module Tracker
|
3
3
|
class DatabaseTracker < DefaultTracker
|
4
4
|
|
5
|
+
def initialize(name = "unknown", time = ManageEngine::APMObjectHolder.instance.util.currenttimemillis)
|
6
|
+
super(name, time)
|
7
|
+
@component = "DATABASE"
|
8
|
+
end
|
9
|
+
|
5
10
|
def sql(query)
|
6
11
|
@query = format(query.dup)
|
7
12
|
end
|
@@ -48,10 +53,28 @@ module ManageEngine
|
|
48
53
|
|
49
54
|
begin
|
50
55
|
tableName = case sqlArr[0]
|
51
|
-
when "select" then
|
52
|
-
|
56
|
+
when "select" then
|
57
|
+
fromIndex = sqlArr.index("from");
|
58
|
+
if(fromIndex != nil)
|
59
|
+
sqlArr[fromIndex+1]
|
60
|
+
else
|
61
|
+
"-"
|
62
|
+
end
|
63
|
+
when "insert" then
|
64
|
+
intoIndex = sqlArr.index("into");
|
65
|
+
if(intoIndex != nil)
|
66
|
+
sqlArr[intoIndex+1]
|
67
|
+
else
|
68
|
+
"-"
|
69
|
+
end
|
53
70
|
when "update" then sqlArr[1]
|
54
|
-
when "delete" then
|
71
|
+
when "delete" then
|
72
|
+
fromIndex = sqlArr.index("from");
|
73
|
+
if(fromIndex != nil)
|
74
|
+
sqlArr[fromIndex+1]
|
75
|
+
else
|
76
|
+
"-"
|
77
|
+
end
|
55
78
|
when "create" then sqlArr[1] + sqlArr[2]
|
56
79
|
when "alter" then sqlArr[1] + sqlArr[2]
|
57
80
|
when "drop" then sqlArr[1] + sqlArr[2]
|
@@ -59,11 +82,12 @@ module ManageEngine
|
|
59
82
|
when "describe" then sqlArr[1]
|
60
83
|
else "-"
|
61
84
|
end
|
62
|
-
|
85
|
+
@signature = sqlArr[0] + " - " + tableName
|
63
86
|
return [sqlArr[0], tableName]
|
64
87
|
|
65
88
|
rescue Exception=>e
|
66
89
|
@logger.logException "Error processing query #{sql} Exception: #{e.message}",e
|
90
|
+
@signature = sqlArr[0] + " - "
|
67
91
|
return [sqlArr[0], '-']
|
68
92
|
end
|
69
93
|
end
|
@@ -102,6 +126,13 @@ module ManageEngine
|
|
102
126
|
"#{@name} - #{@query}"
|
103
127
|
end
|
104
128
|
|
129
|
+
def getTrace
|
130
|
+
trace = super
|
131
|
+
if (@signature != nil)
|
132
|
+
trace[1] = @signature
|
133
|
+
end
|
134
|
+
trace
|
135
|
+
end
|
105
136
|
end
|
106
137
|
end
|
107
138
|
end
|
@@ -3,11 +3,13 @@ module ManageEngine
|
|
3
3
|
|
4
4
|
class DefaultTracker
|
5
5
|
|
6
|
-
attr_accessor :name, :error, :endtime, :starttime, :
|
6
|
+
attr_accessor :name, :error, :endtime, :starttime, :component, :children, :parent
|
7
7
|
|
8
|
-
def initialize(name = "
|
8
|
+
def initialize(name = "unknown", time = ManageEngine::APMObjectHolder.instance.util.currenttimemillis)
|
9
9
|
@starttime = time.to_i
|
10
10
|
@name = name
|
11
|
+
@component = "APP CODE"
|
12
|
+
@children = Array.new
|
11
13
|
@logger = ManageEngine::APMObjectHolder.instance.log
|
12
14
|
end
|
13
15
|
|
@@ -15,6 +17,17 @@ module ManageEngine
|
|
15
17
|
@endtime = time.to_i
|
16
18
|
end
|
17
19
|
|
20
|
+
def setParent(parentTracker)
|
21
|
+
@parent = parentTracker
|
22
|
+
if parentTracker != nil
|
23
|
+
parentTracker.children[parentTracker.children.length]=self
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def component
|
28
|
+
@component
|
29
|
+
end
|
30
|
+
|
18
31
|
def error?
|
19
32
|
@error != nil
|
20
33
|
end
|
@@ -56,6 +69,24 @@ module ManageEngine
|
|
56
69
|
end
|
57
70
|
end
|
58
71
|
|
72
|
+
def getTrace
|
73
|
+
trace = Array.new(7)
|
74
|
+
trace[0] = @starttime
|
75
|
+
trace[1] = @name
|
76
|
+
trace[2] = @component
|
77
|
+
trace[3] = duration()
|
78
|
+
trace[4] = trace[3] #exclusive time
|
79
|
+
trace[5] = getAdditionalInfo()
|
80
|
+
if (children.length > 0)
|
81
|
+
trace[6] = Array.new
|
82
|
+
children.each do |child|
|
83
|
+
trace[4] -= child.duration() #computing exclusive time of parent
|
84
|
+
trace[6].push(child.getTrace())
|
85
|
+
end
|
86
|
+
end # children exists check
|
87
|
+
trace
|
88
|
+
end # getTrace
|
89
|
+
|
59
90
|
end
|
60
91
|
|
61
92
|
end
|
@@ -34,13 +34,19 @@ module ManageEngine
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def queryString(querystring)
|
37
|
-
|
37
|
+
if (!querystring.empty?)
|
38
|
+
@queryString = querystring
|
39
|
+
end
|
38
40
|
end
|
39
41
|
|
40
42
|
def setStatus(httpcode)
|
41
43
|
@status = httpcode
|
42
44
|
end
|
43
45
|
|
46
|
+
def getStatus
|
47
|
+
@status
|
48
|
+
end
|
49
|
+
|
44
50
|
def addCustomParam key, value
|
45
51
|
if (@params == nil)
|
46
52
|
@params = Hash.new
|
@@ -52,20 +58,19 @@ module ManageEngine
|
|
52
58
|
@params = param
|
53
59
|
end
|
54
60
|
|
55
|
-
def
|
56
|
-
info =
|
57
|
-
if (@http_method != nil
|
58
|
-
if (info == nil)
|
59
|
-
info = Hash.new
|
60
|
-
end
|
61
|
+
def getTraceInfo
|
62
|
+
info = Hash.new
|
63
|
+
if (@http_method != nil) #&& @queryString != nil && @status != nil
|
61
64
|
info["http_method_name"] = @http_method
|
65
|
+
end
|
66
|
+
if (@queryString != nil)
|
62
67
|
info["http_query_str"] = @queryString
|
68
|
+
info["http_input_params"] = nil
|
69
|
+
end
|
70
|
+
if (@status != nil)
|
63
71
|
info["httpcode"] = @status
|
64
72
|
end
|
65
73
|
if (@params != nil)
|
66
|
-
if (info == nil)
|
67
|
-
info = Hash.new
|
68
|
-
end
|
69
74
|
info["custom_params"] = @params
|
70
75
|
end
|
71
76
|
info
|
@@ -7,6 +7,7 @@ module ManageEngine
|
|
7
7
|
attr_reader :licence_exceeds,:licence_expired,:unmanage_agent,:manage_agent,:agent_config_updated,:error_notfound,:error_server,:delete_agent,:response_code,:custom_config_info, :agent_specific_info
|
8
8
|
attr_reader :mf_transaction,:mf_separator,:mf_db,:mf_apdex,:mf_http,:mf_bckgrnd,:mf_namespace,:mf_name,:mf_all,:agent_store,:agent_lock,:mf_overflow
|
9
9
|
attr_reader :error_rt, :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
|
10
|
+
attr_reader :components,:component_name,:component_time,:component_count,:component_error_count,:component_isExternal,:component_ext_host,:component_ext_port,:component_ext_ip,:httpstatus
|
10
11
|
attr_reader :en_alphabets, :en_numerals
|
11
12
|
|
12
13
|
def initialize
|
@@ -88,6 +89,17 @@ module ManageEngine
|
|
88
89
|
@mf_http = "http"
|
89
90
|
@mf_bckgrnd = "bckgrnd"
|
90
91
|
|
92
|
+
@components = "components"
|
93
|
+
@component_name = "name"
|
94
|
+
@component_time = "rt"
|
95
|
+
@component_count = "ct"
|
96
|
+
@component_error_count = "error"
|
97
|
+
@component_isExternal = "isExt"
|
98
|
+
@component_ext_host = "host"
|
99
|
+
@component_ext_port = "port"
|
100
|
+
@component_ext_ip = "ip"
|
101
|
+
|
102
|
+
@httpstatus = "httpcode"
|
91
103
|
@error_rt = "error_rt"
|
92
104
|
@mf_logmetric = "logmetric"
|
93
105
|
@mf_logmetric_warning = "warning"
|
data/lib/agent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: site24x7_apminsight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adithyan P
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shoulda
|
@@ -97,7 +97,6 @@ files:
|
|
97
97
|
- README.rdoc
|
98
98
|
- Rakefile
|
99
99
|
- VERSION
|
100
|
-
- conf/apminsight.conf
|
101
100
|
- lib/agent/am_objectholder.rb
|
102
101
|
- lib/agent/api/custom_tracker.rb
|
103
102
|
- lib/agent/configuration/am_configuration.rb
|
@@ -135,7 +134,7 @@ files:
|
|
135
134
|
homepage: https://www.site24x7.com/help/apm/ruby-agent.html
|
136
135
|
licenses: []
|
137
136
|
metadata: {}
|
138
|
-
post_install_message:
|
137
|
+
post_install_message:
|
139
138
|
rdoc_options: []
|
140
139
|
require_paths:
|
141
140
|
- lib
|
@@ -150,8 +149,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
149
|
- !ruby/object:Gem::Version
|
151
150
|
version: '0'
|
152
151
|
requirements: []
|
153
|
-
rubygems_version: 3.
|
154
|
-
signing_key:
|
152
|
+
rubygems_version: 3.3.7
|
153
|
+
signing_key:
|
155
154
|
specification_version: 3
|
156
155
|
summary: Site24x7 APMInsight gives you end-to-end web-transaction awareness of Rails
|
157
156
|
applications enabling you to isolate performance issues and resolve them quickly.
|
data/conf/apminsight.conf
DELETED
@@ -1,86 +0,0 @@
|
|
1
|
-
# $Id$
|
2
|
-
#
|
3
|
-
################### APM Insight Agent Configuration File ###################
|
4
|
-
#
|
5
|
-
#This file contains configuration options for APM Insight agent installation in your Application Server.
|
6
|
-
#
|
7
|
-
#NOTE: Though the properties can be defined in any different order, it is advisable to maintain
|
8
|
-
#the below order for related properties and ease of reference.
|
9
|
-
#
|
10
|
-
#All the configuration options defaults to factory configuration if commented or not supported values
|
11
|
-
|
12
|
-
#License key of your Site24x7 APM Insight account.
|
13
|
-
license.key=
|
14
|
-
|
15
|
-
#Logical name of your application. Say for example you have "Order Processing" applications running in
|
16
|
-
#10 instances of Tomcat server. Specify the name as "Order Processing" for the name in all the 10
|
17
|
-
#instances while deploying the agent. Site24x7 will group the data from 10 instances of
|
18
|
-
#Tomcat and provide response time, throughput etc.
|
19
|
-
application.name=My Application
|
20
|
-
|
21
|
-
#APM Insight agent communicates to the Site24x7 through the HTTP/HTTPS protocol.
|
22
|
-
#Specify Proxy server configuration when there is a proxy server between APM Insight agent and
|
23
|
-
#Site24x7 server.
|
24
|
-
#
|
25
|
-
behind.proxy=false
|
26
|
-
#proxy.server.host=proxyserver
|
27
|
-
#proxy.server.port=proxyport
|
28
|
-
#proxy.auth.username=proxyuser
|
29
|
-
#proxy.auth.password=proxypassword
|
30
|
-
|
31
|
-
#Application Server HTTP/HTTPS listening port.Say for example when you are deploying the agent in Tomcat
|
32
|
-
#Server running in 8080 port, specify the value as 8080.
|
33
|
-
#[Mandatory]
|
34
|
-
agent.server.port=8080
|
35
|
-
|
36
|
-
#The Apdex (Application Performance Index) threshold is used to calculate application performance score.
|
37
|
-
#More at http://www.apdex.org.
|
38
|
-
#A Transaction is said to be satisfied, if the response time is equal to or below the apdex.threshold.
|
39
|
-
#A Transaction is said to be tolerating, if the response time is greater than apdex.threshold and less
|
40
|
-
#than 4 times of apdex.threshold. A Transaction is said to be frustrated, if the response time is greater
|
41
|
-
#than 4 times of apdex.threshold. Say for example when you specify the value as 2, transactions with response
|
42
|
-
#time less than 2 seconds is considered as satisfied, transactions with response time greater than 2 and
|
43
|
-
#less than 8 is considered as tolerating and transactions with response time greater than 8 seconds is
|
44
|
-
#considered as frustrating.
|
45
|
-
#default value: 0.5 (second)
|
46
|
-
apdex.threshold=0.5
|
47
|
-
|
48
|
-
#Whether SQL queries getting executed in your application need to be tracked or not.
|
49
|
-
#default value: true
|
50
|
-
sql.capture.enabled=true
|
51
|
-
|
52
|
-
#Whether the transaction trace is enabled or not. Setting this value to true will send the trace of the
|
53
|
-
#slow transaction.
|
54
|
-
#default value: true
|
55
|
-
transaction.trace.enabled=true
|
56
|
-
|
57
|
-
#Threshold to construct the trace for slow transactions. Transaction Traces violating this threshold will be
|
58
|
-
#collected and sent to the server. Used to analyze and troubleshoot the Transaction by the user.
|
59
|
-
#default value: 2 (second)
|
60
|
-
transaction.trace.threshold=2
|
61
|
-
|
62
|
-
#Enabling this option will parametrize all SQL Queries in Slow Transaction Traces (if sql.capture.enabled
|
63
|
-
#set to true & transaction.trace.enabled set to true). Disabling this option will give you the real query
|
64
|
-
#with actual parameters. It is recommended to enable this option if there are queries getting executed
|
65
|
-
#using confidential parameters like credit card number, passwords, etc.
|
66
|
-
#default value: true
|
67
|
-
transaction.trace.sql.parametrize=true
|
68
|
-
|
69
|
-
#Threshold value to generate a stack trace to identify the caller who executed a slow query. This stack
|
70
|
-
#trace is sent to the server for the user to analyze and troubleshoot
|
71
|
-
#default value: 3 (second)
|
72
|
-
transaction.trace.sql.stacktrace.threshold=3
|
73
|
-
|
74
|
-
#Stop listening transactions with specified URL pattern.
|
75
|
-
transaction.skip.listening=*.css, *.js, *.gif, *.jpg, *.jpeg, *.bmp, *.png, *.ico
|
76
|
-
|
77
|
-
#Directory where agent logs information separately.
|
78
|
-
#Defaults to the directory where apminsight-javaagent.jar is installed.
|
79
|
-
#Use forward slash(/) as path separator.
|
80
|
-
#apminsight.log.dir=./apminsight/logs
|
81
|
-
|
82
|
-
#The log level at which the APM Insight agent should record logging
|
83
|
-
#information. The levels are SEVERE, WARNING, INFO, FINE in the order
|
84
|
-
#respectively. Defaults to the level INFO if commented or mentioned
|
85
|
-
#incorrectly.
|
86
|
-
apminsight.log.level=INFO
|