whatap 1.0.2 → 1.0.3-canary.0
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/README.md +77 -33
- package/agent/darwin/arm64/whatap_nodejs +0 -0
- package/agent/linux/amd64/whatap_nodejs +0 -0
- package/agent/linux/arm64/whatap_nodejs +0 -0
- package/build.txt +4 -0
- package/lib/conf/config-default.js +3 -10
- package/lib/conf/configure.js +349 -369
- package/lib/conf/license.js +1 -1
- package/lib/control/packagectr-helper.js +3 -34
- package/lib/core/agent.js +888 -176
- package/lib/core/interceptor.js +6 -6
- package/lib/core/shimmer.js +36 -82
- package/lib/counter/counter-manager.js +8 -79
- package/lib/counter/task/activetransaction.js +17 -68
- package/lib/io/data-inputx.js +3 -13
- package/lib/io/data-outputx.js +206 -268
- package/lib/logger.js +6 -6
- package/lib/net/security-master.js +20 -139
- package/lib/observers/apollo-server-observer.js +27 -33
- package/lib/observers/global-observer.js +80 -155
- package/lib/observers/http-observer.js +236 -666
- package/lib/observers/ioredis-observer.js +294 -0
- package/lib/observers/maria-observer.js +362 -204
- package/lib/observers/mongodb-observer.js +226 -169
- package/lib/observers/mongoose-observer.js +323 -518
- package/lib/observers/mssql-observer.js +418 -177
- package/lib/observers/mysql-observer.js +449 -342
- package/lib/observers/mysql2-observer.js +358 -396
- package/lib/observers/oracle-observer.js +384 -559
- package/lib/observers/pgsql-observer.js +489 -231
- package/lib/observers/prisma-observer.js +92 -303
- package/lib/observers/process-observer.js +35 -79
- package/lib/observers/redis-observer.js +331 -166
- package/lib/observers/socket.io-observer.js +187 -226
- package/lib/observers/websocket-observer.js +301 -175
- package/lib/pack/counter-pack.js +0 -3
- package/lib/pack/log-sink-pack.js +52 -14
- package/lib/pack/tagcount-pack.js +4 -4
- package/lib/{counter/task → system}/gc-action.js +74 -27
- package/lib/trace/trace-context-manager.js +25 -113
- package/lib/trace/trace-context.js +7 -21
- package/lib/trace/trace-httpc.js +11 -17
- package/lib/trace/trace-sql.js +21 -29
- package/lib/udp/async_sender.js +119 -0
- package/lib/udp/index.js +17 -0
- package/lib/udp/packet_enum.js +52 -0
- package/lib/udp/packet_queue.js +69 -0
- package/lib/udp/packet_type_enum.js +33 -0
- package/lib/udp/param_def.js +72 -0
- package/lib/udp/udp_session.js +336 -0
- package/lib/util/escape-literal-sql.js +5 -5
- package/lib/util/hashutil.js +18 -18
- package/lib/util/keygen.js +3 -0
- package/lib/util/linkedset.js +2 -1
- package/lib/util/nodeutil.js +1 -2
- package/lib/util/sql-util.js +178 -0
- package/lib/util/trace-helper.js +91 -0
- package/lib/util/transfer.js +58 -0
- package/lib/value/map-value.js +2 -3
- package/package.json +5 -9
- package/whatap.conf +4 -1
- package/lib/conf/conf-sys-mon.js +0 -101
- package/lib/control/cmd-config.js +0 -24
- package/lib/control/control-handler.js +0 -367
- package/lib/core/request-agent.js +0 -27
- package/lib/counter/meter/meter-activex.js +0 -67
- package/lib/counter/meter/meter-httpc.js +0 -57
- package/lib/counter/meter/meter-resource.js +0 -9
- package/lib/counter/meter/meter-service.js +0 -168
- package/lib/counter/meter/meter-socket.io.js +0 -51
- package/lib/counter/meter/meter-sql.js +0 -71
- package/lib/counter/meter/meter-users.js +0 -58
- package/lib/counter/meter.js +0 -183
- package/lib/counter/task/agentinfo.js +0 -107
- package/lib/counter/task/gcstat.js +0 -34
- package/lib/counter/task/heapmem.js +0 -25
- package/lib/counter/task/httpc.js +0 -76
- package/lib/counter/task/metering-info.js +0 -125
- package/lib/counter/task/proc-cpu.js +0 -29
- package/lib/counter/task/realtimeuser.js +0 -31
- package/lib/counter/task/res/systemECSTask.js +0 -39
- package/lib/counter/task/res/systemKubeTask.js +0 -53
- package/lib/counter/task/res/util/awsEcsClientThread.js +0 -218
- package/lib/counter/task/res/util/linuxProcStatUtil.js +0 -14
- package/lib/counter/task/res-sys-cpu.js +0 -62
- package/lib/counter/task/service.js +0 -202
- package/lib/counter/task/socketio.js +0 -30
- package/lib/counter/task/sql.js +0 -105
- package/lib/counter/task/systemperf.js +0 -43
- package/lib/data/datapack-sender.js +0 -289
- package/lib/data/dataprofile-agent.js +0 -162
- package/lib/data/datatext-agent.js +0 -135
- package/lib/data/event-level.js +0 -15
- package/lib/data/test.js +0 -49
- package/lib/data/zipprofile.js +0 -197
- package/lib/env/constants.js +0 -21
- package/lib/error/error-handler.js +0 -437
- package/lib/kube/kube-client.js +0 -144
- package/lib/lang/text-types.js +0 -58
- package/lib/logsink/line-log-util.js +0 -87
- package/lib/logsink/line-log.js +0 -12
- package/lib/logsink/log-sender.js +0 -78
- package/lib/logsink/log-tracer.js +0 -40
- package/lib/logsink/sender-util.js +0 -56
- package/lib/logsink/zip/zip-send.js +0 -177
- package/lib/net/netflag.js +0 -55
- package/lib/net/receiver.js +0 -66
- package/lib/net/sender.js +0 -141
- package/lib/net/tcp-return.js +0 -18
- package/lib/net/tcp-session.js +0 -286
- package/lib/net/tcpreq-client-proxy.js +0 -70
- package/lib/net/tcprequest-mgr.js +0 -58
- package/lib/observers/cluster-observer.js +0 -22
- package/lib/observers/express-observer.js +0 -215
- package/lib/observers/file-observer.js +0 -184
- package/lib/observers/grpc-observer.js +0 -336
- package/lib/observers/memcached-observer.js +0 -56
- package/lib/observers/mongo-observer.js +0 -317
- package/lib/observers/net-observer.js +0 -77
- package/lib/observers/promise-observer.js +0 -31
- package/lib/observers/schedule-observer.js +0 -67
- package/lib/observers/stream-observer.js +0 -19
- package/lib/observers/thrift-observer.js +0 -197
- package/lib/pack/activestack-pack.js +0 -55
- package/lib/pack/apenum.js +0 -8
- package/lib/pack/errorsnap-pack.js +0 -69
- package/lib/pack/event-pack.js +0 -54
- package/lib/pack/hitmap-pack.js +0 -63
- package/lib/pack/hitmap-pack1.js +0 -152
- package/lib/pack/netstat.js +0 -15
- package/lib/pack/otype.js +0 -7
- package/lib/pack/profile-pack.js +0 -49
- package/lib/pack/realtimeuser-pack.js +0 -41
- package/lib/pack/stat-general-pack.js +0 -96
- package/lib/pack/staterror-pack.js +0 -120
- package/lib/pack/stathttpc-pack.js +0 -66
- package/lib/pack/stathttpc-rec.js +0 -78
- package/lib/pack/statremote-pack.js +0 -46
- package/lib/pack/statservice-pack.js +0 -63
- package/lib/pack/statservice-pack1.js +0 -88
- package/lib/pack/statservice-rec.js +0 -292
- package/lib/pack/statservice-rec_dep.js +0 -151
- package/lib/pack/statsql-pack.js +0 -69
- package/lib/pack/statsql-rec.js +0 -100
- package/lib/pack/statuseragent-pack.js +0 -44
- package/lib/pack/tagctr.js +0 -15
- package/lib/pack/text-pack.js +0 -50
- package/lib/pack/time-count.js +0 -25
- package/lib/pack/websocket.js +0 -15
- package/lib/pack/zip-pack.js +0 -70
- package/lib/pii/pii-item.js +0 -31
- package/lib/pii/pii-mask.js +0 -174
- package/lib/plugin/plugin-loadermanager.js +0 -57
- package/lib/plugin/plugin.js +0 -75
- package/lib/service/tx-record.js +0 -332
- package/lib/stat/stat-error.js +0 -116
- package/lib/stat/stat-httpc.js +0 -98
- package/lib/stat/stat-remote-ip.js +0 -46
- package/lib/stat/stat-remote-ipurl.js +0 -88
- package/lib/stat/stat-sql.js +0 -113
- package/lib/stat/stat-tranx.js +0 -58
- package/lib/stat/stat-tx-caller.js +0 -160
- package/lib/stat/stat-tx-domain.js +0 -111
- package/lib/stat/stat-tx-referer.js +0 -112
- package/lib/stat/stat-useragent.js +0 -48
- package/lib/stat/timingsender.js +0 -76
- package/lib/step/activestack-step.js +0 -38
- package/lib/step/dbc-step.js +0 -36
- package/lib/step/http-stepx.js +0 -67
- package/lib/step/message-step.js +0 -40
- package/lib/step/method-stepx.js +0 -45
- package/lib/step/resultset-step.js +0 -40
- package/lib/step/securemsg-step.js +0 -44
- package/lib/step/socket-step.js +0 -46
- package/lib/step/sql-stepx.js +0 -68
- package/lib/step/sqlxtype.js +0 -16
- package/lib/step/step.js +0 -66
- package/lib/step/stepenum.js +0 -54
- package/lib/topology/link.js +0 -63
- package/lib/topology/nodeinfo.js +0 -123
- package/lib/topology/status-detector.js +0 -111
- package/lib/util/anylist.js +0 -103
- package/lib/util/cardinality/hyperloglog.js +0 -106
- package/lib/util/cardinality/murmurhash.js +0 -31
- package/lib/util/cardinality/registerset.js +0 -75
- package/lib/util/errordata.js +0 -21
- package/lib/util/iputil_x.js +0 -527
- package/lib/util/kube-util.js +0 -73
- package/lib/util/paramsecurity.js +0 -80
- package/lib/util/pre-process.js +0 -13
- package/lib/util/process-seq.js +0 -166
- package/lib/util/property-util.js +0 -36
- package/lib/util/request-queue.js +0 -70
- package/lib/util/requestdouble-queue.js +0 -72
- package/lib/util/resourceprofile.js +0 -157
- package/lib/util/stop-watch.js +0 -30
- package/lib/util/system-util.js +0 -10
- package/lib/util/userid-util.js +0 -57
package/README.md
CHANGED
|
@@ -1,62 +1,106 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
# 🚀 WhaTap Node.js Agent
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
> **Comprehensive Node.js Application Performance Monitoring (APM) Solution**
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
WhaTap Node.js Agent provides real-time monitoring, tracing, and performance analysis capabilities as a professional APM agent.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## 📋 Supported Environment
|
|
9
|
+
- **Platform**: macOS (64bit), Linux (64bit)
|
|
10
|
+
- **Node.js Version**: 17.0.0 or higher
|
|
11
|
+
- **Database**: MySQL, PostgreSQL, MSSQL, Oracle, MariaDB, MongoDB, Redis
|
|
12
|
+
- **Framework**: Express, Fastify, Socket.IO, WebSocket, GraphQL
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
You can install WhaTap using npm with the following command:
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
```bash
|
|
17
|
+
$ npm install whatap
|
|
18
|
+
```
|
|
13
19
|
|
|
14
|
-
#### Npm install
|
|
15
20
|
|
|
16
|
-
npm 에서 다음과 같은 명령어를 통해 whatap을 설치 할 수 있습니다.
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
## 📝 Configuration
|
|
19
23
|
|
|
24
|
+
Copy the `whatap.conf` file from `node_modules/whatap` to your project root directory and configure it as follows:
|
|
20
25
|
|
|
26
|
+
```ini
|
|
27
|
+
# Essential Settings
|
|
28
|
+
license=XXXXXXXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXXXXXXX
|
|
29
|
+
whatap.server.host=XXX.XXX.XXX.XXX
|
|
21
30
|
|
|
22
|
-
|
|
31
|
+
# Application Identification Settings
|
|
32
|
+
app_name=MyNodeApp # Application name
|
|
33
|
+
app_process_name=node # Process name
|
|
34
|
+
```
|
|
23
35
|
|
|
24
|
-
#### License Key
|
|
25
36
|
|
|
26
|
-
node\_modules/whatap에 있는 whatap.conf파일을 루트 디렉토리로 복사 후
|
|
27
|
-
라이센스 키를 발급받은 후 추가 해 주세요.
|
|
28
37
|
|
|
29
|
-
|
|
38
|
+
## 🚀 Usage
|
|
30
39
|
|
|
31
|
-
|
|
32
|
-
whatap.server.host=XXX.XXX.XXX.XXX
|
|
40
|
+
### Agent Initialization
|
|
33
41
|
|
|
42
|
+
To activate WhaTap monitoring in your Node.js application, add the WhaTap agent initialization code to your application's **top-level entry point file**.
|
|
34
43
|
|
|
44
|
+
> **⚠️ Important**: The WhaTap agent must be loaded before all other modules.
|
|
35
45
|
|
|
36
|
-
|
|
46
|
+
### Method 1: Using require('whatap') in Code
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
```javascript
|
|
49
|
+
// app.js (or server.js)
|
|
50
|
+
var WhatapAgent = require('whatap').NodeAgent;
|
|
39
51
|
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
// Import other modules after
|
|
53
|
+
const express = require('express');
|
|
54
|
+
const app = express();
|
|
42
55
|
|
|
43
|
-
|
|
56
|
+
// Application logic...
|
|
57
|
+
```
|
|
44
58
|
|
|
59
|
+
Run with:
|
|
60
|
+
```bash
|
|
61
|
+
node app.js
|
|
62
|
+
```
|
|
45
63
|
|
|
46
|
-
|
|
47
|
-
Whatap 에이전트를 CommonJS 방식으로 가져오고 초기화하려면, 다음 코드를 애플리케이션의 진입점 파일에 추가하세요:
|
|
48
|
-
|
|
49
|
-
var WhatapAgent = require('whatap').NodeAgent;
|
|
64
|
+
### Method 2: Using -r flag (without code modification)
|
|
50
65
|
|
|
51
|
-
|
|
52
|
-
ESM 방식으로 Whatap 에이전트를 가져오고 사용하려면, 다음과 같이 코드를 작성하세요:
|
|
66
|
+
If you prefer not to modify your application code, you can use the `-r` flag:
|
|
53
67
|
|
|
54
|
-
|
|
55
|
-
|
|
68
|
+
```bash
|
|
69
|
+
node -r whatap app.js
|
|
70
|
+
```
|
|
56
71
|
|
|
57
|
-
|
|
72
|
+
### ECMAScript Module (ESM) System
|
|
58
73
|
|
|
59
|
-
|
|
74
|
+
```javascript
|
|
75
|
+
// app.js (or server.js)
|
|
76
|
+
import WhatapAgent from 'whatap';
|
|
77
|
+
WhatapAgent.NodeAgent;
|
|
78
|
+
|
|
79
|
+
// Import other modules after
|
|
80
|
+
import express from 'express';
|
|
81
|
+
const app = express();
|
|
82
|
+
|
|
83
|
+
// Application logic...
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## ✅ Run Application
|
|
87
|
+
|
|
88
|
+
Once the agent configuration is complete, restart your application to begin monitoring:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Direct Node.js execution
|
|
92
|
+
node app.js
|
|
93
|
+
|
|
94
|
+
# Using npm scripts
|
|
95
|
+
npm start
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Monitoring Dashboard
|
|
99
|
+
|
|
100
|
+
Once your application is running, you can view the following information in the WhaTap console:
|
|
101
|
+
|
|
102
|
+
- 🔍 **Real-time Transactions**: HTTP requests, database query tracking
|
|
103
|
+
- 📊 **Performance Metrics**: CPU, memory, GC information
|
|
104
|
+
- 🚨 **Error Monitoring**: Application error and exception tracking
|
|
105
|
+
- 📈 **Statistical Analysis**: Response time and throughput statistics
|
|
60
106
|
|
|
61
|
-
어플리케이션 서버가 실행되면 애플리케이션의 모니터링 정보를 수집하기
|
|
62
|
-
시작합니다.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/build.txt
ADDED
|
@@ -216,7 +216,9 @@ var ConfigDefault = {
|
|
|
216
216
|
|
|
217
217
|
"_trace_mtrace_poid_key": str("mtrace_poid_key", "x-wtap-po"),
|
|
218
218
|
"_trace_mtrace_caller_key": str("mtrace_caller_key","x-wtap-mst"),
|
|
219
|
+
"_trace_mtrace_callee_key": str("mtrace_callee_key","x-wtap-tx"),
|
|
219
220
|
"_trace_mtrace_spec_key1": str("mtrace_spec_key", "x-wtap-sp1"),
|
|
221
|
+
"_trace_mtrace_ip": str("mtrace_ip", "x-wtap-ip"),
|
|
220
222
|
|
|
221
223
|
// add apdex 2020.11.13
|
|
222
224
|
"apdex_time_t": num('apdex_time_t', 1200),
|
|
@@ -276,16 +278,7 @@ var ConfigDefault = {
|
|
|
276
278
|
"prisma_read_func_name": str("prisma_read_func_name", "read"),
|
|
277
279
|
"prisma_database_url_name": str("prisma_database_url_name", "DATABASE_URL"),
|
|
278
280
|
|
|
279
|
-
"metering_tagcount_enabled": bool("metering_tagcount_enabled", false)
|
|
280
|
-
"profile_redis_param_enabled": bool("profile_redis_param_enabled", false),
|
|
281
|
-
"profile_mongodb_param_enabled": bool("profile_mongodb_param_enabled", false),
|
|
282
|
-
|
|
283
|
-
"trace_mtrace_traceparent_key": str("trace_mtrace_traceparent_key", "traceparent"),
|
|
284
|
-
"txtext_txname_enabled": bool("txtext_txname_enabled", true),
|
|
285
|
-
"ignore_env_variable_set": str("ignore_env_variable_set", ""),
|
|
286
|
-
"profile_httpc_start_step_enabled": bool("profile_httpc_start_step_enabled", false),
|
|
287
|
-
"perfx_nodejs_gc_enabled": bool("perfx_nodejs_gc_enabled", true)
|
|
288
|
-
|
|
281
|
+
"metering_tagcount_enabled": bool("metering_tagcount_enabled", false)
|
|
289
282
|
};
|
|
290
283
|
|
|
291
284
|
ConfigDefault._hook_method_ignore_prefix = ConfigDefault.hook_method_ignore_prefixes.split(',');
|