whatap 1.0.3-canary.0 → 1.0.3
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.
- package/lib/core/agent.js +11 -11
- package/lib/observers/maria-observer.js +2 -2
- package/lib/observers/mongoose-observer.js +3 -3
- package/lib/observers/oracle-observer.js +1 -1
- package/lib/observers/pgsql-observer.js +2 -2
- package/lib/udp/async_sender.js +0 -1
- package/lib/util/sql-util.js +1 -1
- package/package.json +2 -2
package/lib/core/agent.js
CHANGED
|
@@ -646,14 +646,8 @@ NodeAgent.prototype.startGoAgent = function(opts = {}) {
|
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
648
|
|
|
649
|
-
// 포트
|
|
650
|
-
|
|
651
|
-
if (!port) {
|
|
652
|
-
Logger.printError("WHATAP-AGENT", "Failed to configure UDP port for agent", null, true);
|
|
653
|
-
try { fs.unlinkSync(sharedLockFile); } catch (e) {}
|
|
654
|
-
return;
|
|
655
|
-
}
|
|
656
|
-
Logger.print("WHATAP-AGENT", `Configured agent to use UDP port: ${port}`, false);
|
|
649
|
+
// 포트 설정은 initUdp()에서 처리됨
|
|
650
|
+
Logger.print("WHATAP-AGENT", "Port configuration will be handled during UDP initialization", false);
|
|
657
651
|
|
|
658
652
|
try {
|
|
659
653
|
// 바이너리 경로 설정
|
|
@@ -695,7 +689,6 @@ NodeAgent.prototype.startGoAgent = function(opts = {}) {
|
|
|
695
689
|
newEnv['whatap.enabled'] = 'True';
|
|
696
690
|
newEnv['WHATAP_PID_FILE'] = sharedPidFile; // 공유 PID 파일 사용
|
|
697
691
|
newEnv['NODEJS_PARENT_APP_PID'] = process.pid.toString();
|
|
698
|
-
newEnv['net_udp_port'] = port.toString();
|
|
699
692
|
newEnv['APP_IDENTIFIER'] = appIdentifier;
|
|
700
693
|
newEnv['APP_NAME'] = this.getApplicationName();
|
|
701
694
|
|
|
@@ -811,7 +804,7 @@ NodeAgent.prototype.startGoAgent = function(opts = {}) {
|
|
|
811
804
|
agentProcess.unref();
|
|
812
805
|
|
|
813
806
|
Logger.print("WHATAP-AGENT",
|
|
814
|
-
`AGENT UP! (process name: ${AGENT_NAME},
|
|
807
|
+
`AGENT UP! (process name: ${AGENT_NAME}, app: ${appIdentifier})`,
|
|
815
808
|
false);
|
|
816
809
|
|
|
817
810
|
// 잠금 해제
|
|
@@ -985,7 +978,14 @@ NodeAgent.prototype.initUdp = function() {
|
|
|
985
978
|
var self = this;
|
|
986
979
|
Logger.print('WHATAP-UDP', 'Initializing UDP connection...', false);
|
|
987
980
|
|
|
988
|
-
//
|
|
981
|
+
// Configure the port before initializing UDP
|
|
982
|
+
const configuredPort = self.configurePort();
|
|
983
|
+
if (configuredPort) {
|
|
984
|
+
self._conf['net_udp_port'] = configuredPort;
|
|
985
|
+
Logger.print('WHATAP-UDP', `Using configured port: ${configuredPort}`, false);
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
// Initialize the UDP session with updated config
|
|
989
989
|
UdpSession.udp(self._conf);
|
|
990
990
|
|
|
991
991
|
// Initialize the async sender
|
|
@@ -96,7 +96,7 @@ function setupDbcInfo(args) {
|
|
|
96
96
|
function hookConnectionMethods(connection, agent) {
|
|
97
97
|
if (connection && !hookedInstances.has(connection)) {
|
|
98
98
|
hookedInstances.add(connection);
|
|
99
|
-
Logger.print('WHATAP-MARIADB-CONNECTION', 'Hooking new connection object', false);
|
|
99
|
+
// Logger.print('WHATAP-MARIADB-CONNECTION', 'Hooking new connection object', false);
|
|
100
100
|
|
|
101
101
|
// query와 execute 메서드 후킹
|
|
102
102
|
if (connection.query && !connection.query.__whatap_wrapped__) {
|
|
@@ -279,7 +279,7 @@ function escapeLiteral(sql) {
|
|
|
279
279
|
checkedSql.clear();
|
|
280
280
|
nonLiteSql.clear();
|
|
281
281
|
date = DateUtil.yyyymmdd();
|
|
282
|
-
Logger.print('WHATAP-SQL-CLEAR', 'MariaObserver CLEAR OK!!!!!!!!!!!!!!!!', false);
|
|
282
|
+
// Logger.print('WHATAP-SQL-CLEAR', 'MariaObserver CLEAR OK!!!!!!!!!!!!!!!!', false);
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
var sqlHash = HashUtil.hashFromString(sql);
|
|
@@ -47,7 +47,7 @@ function setupDbcInfo(connectionString) {
|
|
|
47
47
|
if (dbc_hash === 0 && connectionString) {
|
|
48
48
|
dbc = connectionString;
|
|
49
49
|
dbc_hash = HashUtil.hashFromString(dbc);
|
|
50
|
-
Logger.print('WHATAP-MONGOOSE-DBC', 'DBC setup: ' + dbc, false);
|
|
50
|
+
// Logger.print('WHATAP-MONGOOSE-DBC', 'DBC setup: ' + dbc, false);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -327,9 +327,9 @@ function wrapModelMethods(ModelConstructor) {
|
|
|
327
327
|
createModelMethodWrapper(methodName));
|
|
328
328
|
ModelConstructor.prototype[methodName].__whatap_wrapped__ = true;
|
|
329
329
|
}
|
|
330
|
-
|
|
330
|
+
});
|
|
331
331
|
ModelConstructor.__whatap_wrapped__ = true;
|
|
332
|
-
Logger.print('WHATAP-MONGOOSE-MODEL', 'Model methods wrapped', false);
|
|
332
|
+
// Logger.print('WHATAP-MONGOOSE-MODEL', 'Model methods wrapped', false);
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
|
|
@@ -91,7 +91,7 @@ function setupDbcInfo(connectionInfo) {
|
|
|
91
91
|
function hookConnectionMethods(connection, agent) {
|
|
92
92
|
if (connection && !hookedInstances.has(connection)) {
|
|
93
93
|
hookedInstances.add(connection);
|
|
94
|
-
Logger.print('WHATAP-ORACLE-CONNECTION', 'Hooking new Oracle connection object', false);
|
|
94
|
+
// Logger.print('WHATAP-ORACLE-CONNECTION', 'Hooking new Oracle connection object', false);
|
|
95
95
|
|
|
96
96
|
if (connection.execute && !connection.execute.__whatap_wrapped__) {
|
|
97
97
|
shimmer.wrap(connection, 'execute', createExecuteWrapper(agent, dbc));
|
|
@@ -93,7 +93,7 @@ function setupDbcInfo(args) {
|
|
|
93
93
|
function hookConnectionMethods(connection, agent) {
|
|
94
94
|
if (connection && !hookedInstances.has(connection)) {
|
|
95
95
|
hookedInstances.add(connection);
|
|
96
|
-
Logger.print('WHATAP-201', 'Hooking new connection object', false);
|
|
96
|
+
// Logger.print('WHATAP-201', 'Hooking new connection object', false);
|
|
97
97
|
|
|
98
98
|
if (dbc_hash === 0 && connection.connectionParameters) {
|
|
99
99
|
var info = connection.connectionParameters;
|
|
@@ -215,7 +215,7 @@ var createQueryWrapper = function(agent, dbcUrl) {
|
|
|
215
215
|
if (typeof finalSql === 'string' && finalSql.length > 0) {
|
|
216
216
|
try {
|
|
217
217
|
psql = escapeLiteral(finalSql);
|
|
218
|
-
Logger.print('WHATAP-202', 'Processing SQL: ' + finalSql.substring(0, 200), false);
|
|
218
|
+
// Logger.print('WHATAP-202', 'Processing SQL: ' + finalSql.substring(0, 200), false);
|
|
219
219
|
} catch (e) {
|
|
220
220
|
Logger.printError('WHATAP-206', 'PgSqlObserver escapeliteral error', e, false);
|
|
221
221
|
}
|
package/lib/udp/async_sender.js
CHANGED
package/lib/util/sql-util.js
CHANGED
|
@@ -115,7 +115,7 @@ function checkAndClearCache(checkedSqlCache, nonLiteSqlCache, lastDate, observer
|
|
|
115
115
|
if (lastDate !== currentDate) {
|
|
116
116
|
checkedSqlCache.clear();
|
|
117
117
|
nonLiteSqlCache.clear();
|
|
118
|
-
Logger.print('WHATAP-SQL-CLEAR', `${observerName} CLEAR OK!!!!!!!!!!!!!!!!`, false);
|
|
118
|
+
// Logger.print('WHATAP-SQL-CLEAR', `${observerName} CLEAR OK!!!!!!!!!!!!!!!!`, false);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
return currentDate;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "whatap",
|
|
3
3
|
"homepage": "http://www.whatap.io",
|
|
4
|
-
"version": "1.0.3
|
|
5
|
-
"releaseDate": "
|
|
4
|
+
"version": "1.0.3",
|
|
5
|
+
"releaseDate": "20250925",
|
|
6
6
|
"description": "Monitoring and Profiling Service",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"scripts": {},
|