site24x7_apminsight 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/agent/am_objectholder.rb +22 -16
- data/lib/agent/logging/am_logger.rb +10 -4
- data/lib/version.rb +2 -2
- metadata +3 -3
@@ -19,22 +19,28 @@ module ManageEngine
|
|
19
19
|
@@objects = nil
|
20
20
|
#Don't Change the Order of Initialize
|
21
21
|
def initializeObjects
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
22
|
+
begin
|
23
|
+
@agent_initialized = false
|
24
|
+
@shutdown = false
|
25
|
+
@constants = ManageEngine::APMConstants.new
|
26
|
+
@log = ManageEngine::APMLogger.new
|
27
|
+
@util = ManageEngine::APMUtil.new
|
28
|
+
@util.setLogger @log
|
29
|
+
@config = ManageEngine::APMConfig.new
|
30
|
+
@connector = ManageEngine::APMConnector.new
|
31
|
+
@store = ManageEngine::APMMetricsStore.new
|
32
|
+
@collector = ManageEngine::APMMetricsCollector.new
|
33
|
+
@txn_util = ManageEngine::TransactionUtil.new
|
34
|
+
@formatter = ManageEngine::APMMetricsFormatter.new
|
35
|
+
@parser = ManageEngine::APMMetricsParser.new
|
36
|
+
@agent = ManageEngine::APMAgent.new
|
37
|
+
@last_dispatch_time = @@objects.util.currenttimemillis
|
38
|
+
@@objects.log.debug "[APMObjectHolder] [ All Objects Initialized ] "
|
39
|
+
rescue Exception => e
|
40
|
+
puts "Error initializing APM Insight Ruby agent. #{e.message}"
|
41
|
+
@shutdown = true
|
42
|
+
@agent_initialized = false
|
43
|
+
end
|
38
44
|
end
|
39
45
|
|
40
46
|
def self.instance
|
@@ -14,10 +14,16 @@ module ManageEngine
|
|
14
14
|
path= path + '/apm.log'
|
15
15
|
#puts "#{path}"
|
16
16
|
# file = open(path, File::WRONLY | File::APPEND | File::CREAT)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
begin
|
18
|
+
@apmlog = Logger.new(path, 10, 5 * 1024 * 1024)
|
19
|
+
@apmlog.level = Logger::INFO
|
20
|
+
rescue Exception => e
|
21
|
+
puts "Unable to create/edit the log file #{path}. Writing agent logs to STDOUT.\nError: #{e.message}"
|
22
|
+
@apmlog = Logger.new(STDOUT)
|
23
|
+
@apmlog.level = Logger::WARN
|
24
|
+
end
|
25
|
+
# @apmlog = Logger.new(file)
|
26
|
+
@apmlog.datetime_format = "%Y-%m-%d %H:%M:%S"
|
21
27
|
@apmlog.formatter = proc do |severity, datetime, progname, msg|
|
22
28
|
"[#{datetime}|#{Process.pid}][#{severity}]:#{msg}\n"
|
23
29
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 8
|
8
|
-
-
|
9
|
-
version: 1.8.
|
8
|
+
- 1
|
9
|
+
version: 1.8.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Adithyan P
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2019-
|
17
|
+
date: 2019-05-08 00:00:00 +05:30
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|