whatap 1.0.0 β†’ 1.0.1-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 CHANGED
@@ -1,62 +1,106 @@
1
1
 
2
- [![WhaTap Logo](https://login.whatap.io/static/whatap_logo.png)](http://www.whatap.io/)
2
+ # πŸš€ WhaTap Node.js Agent
3
3
 
4
- # Whatap for Node.js
4
+ > **Comprehensive Node.js Application Performance Monitoring (APM) Solution**
5
5
 
6
- Whatap allows for application performance monitoring.
6
+ WhaTap Node.js Agent provides real-time monitoring, tracing, and performance analysis capabilities as a professional APM agent.
7
7
 
8
- Works on Linux(32bit, 64bit), MacOSx(32bit, 64bit), Windows(32bit, 64bit).
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
- *Node.js 지원 버젼: 16.4.0 이상
14
+ You can install WhaTap using npm with the following command:
11
15
 
12
- ![step01](http://apm.whatap.io/images/icon_step01.png)
16
+ ```bash
17
+ $ npm install whatap
18
+ ```
13
19
 
14
- #### Npm install
15
20
 
16
- npm μ—μ„œ λ‹€μŒκ³Ό 같은 λͺ…λ Ήμ–΄λ₯Ό 톡해 whatap을 μ„€μΉ˜ ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
17
21
 
18
- $ npm install whatap
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
- ![step02](http://apm.whatap.io/images/icon_step02.png)
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
- whatap.conf νŒŒμΌμ€ λ‹€μŒκ³Ό 같은 λ‚΄μš©μ„ ν¬ν•¨ν•©λ‹ˆλ‹€.
38
+ ## πŸš€ Usage
30
39
 
31
- license=XXXXXXXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXXXXXXX
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
- ![step03](http://apm.whatap.io/images/icon_step03.png)
46
+ ### Method 1: Using require('whatap') in Code
37
47
 
38
- #### Usage
48
+ ```javascript
49
+ // app.js (or server.js)
50
+ var WhatapAgent = require('whatap').NodeAgent;
39
51
 
40
- 루트 디렉토리에 μœ„μΉ˜ν•œ Node.js μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ—μ„œ Whatap λͺ¨λ‹ˆν„°λ§ κΈ°λŠ₯을 ν™œμ„±ν™”ν•˜λ €λ©΄,
41
- μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ˜ μ§„μž…μ  νŒŒμΌμ— Whatap μ—μ΄μ „νŠΈλ₯Ό μ΄ˆκΈ°ν™”ν•˜λŠ” μ½”λ“œλ₯Ό μΆ”κ°€ν•΄μ•Ό ν•©λ‹ˆλ‹€.
52
+ // Import other modules after
53
+ const express = require('express');
54
+ const app = express();
42
55
 
43
- Node.js μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ— Whatap λͺ¨λ‹ˆν„°λ§μ„ μ μš©ν•˜λŠ” 방법은 λͺ¨λ“ˆ μ‹œμŠ€ν…œμ˜ μ’…λ₯˜(CommonJS λ˜λŠ” ECMAScript Modules, ESM)에 따라 μ•½κ°„ λ‹€λ¦…λ‹ˆλ‹€. μ•„λž˜μ—μ„œλŠ” 두 κ°€μ§€ λͺ¨λ“ˆ μ‹œμŠ€ν…œμ— λŒ€ν•΄ Whatap μ—μ΄μ „νŠΈλ₯Ό μ΄ˆκΈ°ν™”ν•˜κ³  μ‚¬μš©ν•˜λŠ” 방법을 μ„€λͺ…ν•©λ‹ˆλ‹€.
56
+ // Application logic...
57
+ ```
44
58
 
59
+ Run with:
60
+ ```bash
61
+ node app.js
62
+ ```
45
63
 
46
- #### CommonJS λͺ¨λ“ˆ μ‹œμŠ€ν…œ μ‚¬μš© μ‹œ
47
- Whatap μ—μ΄μ „νŠΈλ₯Ό CommonJS λ°©μ‹μœΌλ‘œ κ°€μ Έμ˜€κ³  μ΄ˆκΈ°ν™”ν•˜λ €λ©΄, λ‹€μŒ μ½”λ“œλ₯Ό μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ˜ μ§„μž…μ  νŒŒμΌμ— μΆ”κ°€ν•˜μ„Έμš”:
48
-
49
- var WhatapAgent = require('whatap').NodeAgent;
64
+ ### Method 2: Using -r flag (without code modification)
50
65
 
51
- #### ECMAScript λͺ¨λ“ˆ(ESM) μ‹œμŠ€ν…œ μ‚¬μš© μ‹œ
52
- ESM λ°©μ‹μœΌλ‘œ Whatap μ—μ΄μ „νŠΈλ₯Ό κ°€μ Έμ˜€κ³  μ‚¬μš©ν•˜λ €λ©΄, λ‹€μŒκ³Ό 같이 μ½”λ“œλ₯Ό μž‘μ„±ν•˜μ„Έμš”:
66
+ If you prefer not to modify your application code, you can use the `-r` flag:
53
67
 
54
- import WhatapAgent from 'whatap';
55
- WhatapAgent.NodeAgent;
68
+ ```bash
69
+ node -r whatap app.js
70
+ ```
56
71
 
57
- ![step04](http://apm.whatap.io/images/icon_step04.png)
72
+ ### ECMAScript Module (ESM) System
58
73
 
59
- #### Restart
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
- μ‹œμž‘ν•©λ‹ˆλ‹€.
@@ -60,7 +60,7 @@ class UdpSession {
60
60
  self.serverHost = conf.net_udp_host || PacketEnum.SERVER;
61
61
  self.serverPort = parseInt(conf.net_udp_port || PacketEnum.PORT);
62
62
 
63
- console.log(`UDP initialized with server ${self.serverHost}:${self.serverPort}`);
63
+ // console.log(`UDP initialized with server ${self.serverHost}:${self.serverPort}`);
64
64
 
65
65
  // "connected UDP" 둜 μ „ν™˜: lsofμ—μ„œ peerκ°€ 보이도둝
66
66
  self.socket.connect(self.serverPort, self.serverHost, () => {
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.0",
5
- "releaseDate": "20250324",
4
+ "version": "1.0.1-canary.0",
5
+ "releaseDate": "20250924",
6
6
  "description": "Monitoring and Profiling Service",
7
7
  "main": "index.js",
8
8
  "scripts": {},
@@ -15,7 +15,8 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "long": "^3.2.0",
18
- "proper-lockfile": "^4.1.2"
18
+ "proper-lockfile": "^4.1.2",
19
+ "uuid": "^13.0.0"
19
20
  },
20
21
  "devDependencies": {
21
22
  "long": "^3.2.0"
package/whatap.conf CHANGED
@@ -1,2 +1,5 @@
1
1
  license=XXXXXXXXXXXXXX-XXXXXXXXXXXXXX-XXXXXXXXXXXXXX
2
- whatap.server.host=XXX.XXX.XXX.XXX
2
+ whatap.server.host=XXX.XXX.XXX.XXX
3
+
4
+ app_name=XXX
5
+ app_process_name=node