whatap 2.0.1 → 2.0.2-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.
@@ -0,0 +1,77 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(grep -n \"ECONNREFUSED\" /Users/seunghunlee/agent_workspace/nodejs_agent/lib/observers/*.js /Users/seunghunlee/agent_workspace/nodejs_agent/lib/core/agent.js 2>/dev/null)",
5
+ "WebSearch",
6
+ "Bash(go env *)",
7
+ "Bash(ls -l \"$\\(go env GOPATH\\)/bin/govulncheck\")",
8
+ "Bash(brew list *)",
9
+ "Bash(brew search *)",
10
+ "Bash(brew info *)",
11
+ "Bash(echo \"--- exit $? ---\")",
12
+ "Bash(go version *)",
13
+ "WebFetch(domain:github.com)",
14
+ "Read(//Users/seunghunlee/workspace/**)",
15
+ "Read(//Users/seunghunlee/workspace/nodejs_docker_sample/**)",
16
+ "Bash(npm i *)",
17
+ "Bash(chmod +x /Users/seunghunlee/workspace/nodejs_docker_sample/repro.sh)",
18
+ "Bash(docker exec 273976be9e71 *)",
19
+ "Bash(docker rm *)",
20
+ "Bash(docker build *)",
21
+ "Bash(docker run *)",
22
+ "Bash(docker exec zombie-test *)",
23
+ "Bash(curl -s http://localhost:3000/)",
24
+ "Bash(curl -s http://localhost:3000/health)",
25
+ "Bash(curl -s http://localhost:3000/slow)",
26
+ "Bash(curl -s -o /dev/null -w \"status: %{http_code}\\\\n\" http://localhost:3000/error)",
27
+ "Bash(curl -s -o /dev/null -w \"%{http_code} \" http://localhost:3000/)",
28
+ "Bash(/usr/local/bin/docker exec *)",
29
+ "Bash(/usr/local/bin/docker build *)",
30
+ "Bash(/usr/local/bin/docker rm *)",
31
+ "Bash(/usr/local/bin/docker run *)",
32
+ "Bash(/bin/sleep 30)",
33
+ "Bash(echo \"[$\\(date +%T\\)] zombies=$\\(/usr/local/bin/docker exec zombie-test sh -c \"ps -eo stat | awk '\\\\$1 ~ /^Z/' | wc -l\"\\)\")",
34
+ "Bash(/bin/sleep 5)",
35
+ "Bash(/usr/local/bin/docker ps *)",
36
+ "Bash(/bin/sleep 6)",
37
+ "Bash(/usr/local/bin/docker logs *)",
38
+ "Bash(/usr/bin/curl -s http://localhost:3000/)",
39
+ "Bash(/usr/bin/curl -s http://localhost:3000/health)",
40
+ "Bash(/bin/sleep 7)",
41
+ "Bash(cat agent/index.js)",
42
+ "Bash(cat agent/writer.js)",
43
+ "Bash(node -e \"const d=require\\('./config/defaults.js'\\); console.log\\('flushInterval=', d.flushInterval\\)\")",
44
+ "Bash(cd *)",
45
+ "Bash(ls /Users/seunghunlee/workspace/nodejs_docker_sample/node_modules/whatap/lib)",
46
+ "Bash(ls /Users/seunghunlee/workspace/nodejs_docker_sample/node_modules/whatap/index.js)",
47
+ "Bash(node -e ' *)",
48
+ "Bash(export WHATAP_HOME=/tmp)",
49
+ "Bash(node --expose-gc -e ' *)",
50
+ "Bash(node -p \"process.platform+'/'+process.arch+' node '+process.version\")",
51
+ "Read(//Users/seunghunlee/agent_workspace/apm-go-agent/**)",
52
+ "Bash(node -e \"require\\('./lib/counter/task/metering-info'\\); console.log\\('module load OK'\\);\")",
53
+ "Bash(node --check lib/counter/task/metering-info.js)",
54
+ "Bash(node --check lib/util/cgroup-cpu.js)",
55
+ "Bash(node -e \"var m=require\\('./index.js'\\); console.log\\('exports keys:', Object.keys\\(m\\)\\);\")",
56
+ "Bash(docker version *)",
57
+ "Bash(rm -rf whatap-local)",
58
+ "Bash(rsync -a --exclude=.git --exclude=node_modules --exclude=logs --exclude=*.log /Users/seunghunlee/agent_workspace/nodejs_agent/ ./whatap-local/)",
59
+ "Bash(node *)",
60
+ "Bash(npm view *)",
61
+ "Bash(rsync -a --delete --exclude=.git --exclude=node_modules --exclude=logs --exclude=*.log /Users/seunghunlee/agent_workspace/nodejs_agent/ ./whatap-local/)",
62
+ "Bash(docker exec *)",
63
+ "Bash(curl -s --max-time 5 http://localhost:3001/health)",
64
+ "Bash(curl -s --max-time 5 http://localhost:3002/health)",
65
+ "Bash(sed -n '66,71p' lib/counter/counter-manager.js)",
66
+ "Bash(sed -n '166,168p' lib/conf/configure.js)",
67
+ "Bash(sed -n '40,70p' lib/kube/kube-client.js)",
68
+ "Bash(docker info *)",
69
+ "Bash(« stray *)",
70
+ "Bash(awk '{print $1}')",
71
+ "Bash(xargs -r docker rm -f)",
72
+ "Read(//Users/seunghunlee/agent_workspace/**)",
73
+ "Bash(net_udp_packet_queue_size=500 node -e ' *)",
74
+ "Bash(max_send_queue_size=500 node -e ' *)"
75
+ ]
76
+ }
77
+ }
@@ -52,6 +52,7 @@ var ConfigDefault = {
52
52
  "net_send_max_bytes": 5 * 1024 * 1024,
53
53
  "net_send_queue1_size": 512,
54
54
  "net_send_queue2_size": 1024,
55
+ "max_send_queue_size": num('max_send_queue_size', 2000),
55
56
  "hook_connection_open_patterns": "",
56
57
  "log_datasource_lookup_enabled": true,
57
58
 
@@ -148,7 +148,7 @@ HttpObserver.prototype.__createTransactionObserver = function (callback, isHttps
148
148
  return callback(req, res);
149
149
  }
150
150
 
151
- let hostname = ctx.host && ctx.host.includes(':') ? ctx.host.split(':')[0] : '';
151
+ let hostname = ctx.host ? ctx.host.split(':')[0] : '';
152
152
  let datas = [
153
153
  hostname,
154
154
  ctx.service_name,
@@ -3,8 +3,17 @@
3
3
  * Implemented as a singleton to ensure only one queue exists.
4
4
  */
5
5
 
6
+ const conf = require('../conf/configure');
7
+
8
+ const DEFAULT_MAX_SIZE = 2000;
9
+
10
+ function getConfiguredMaxSize() {
11
+ const size = parseInt(conf.getProperty('max_send_queue_size', DEFAULT_MAX_SIZE));
12
+ return isNaN(size) || size <= 0 ? DEFAULT_MAX_SIZE : size;
13
+ }
14
+
6
15
  class PacketQueue {
7
- constructor(maxSize = 1000) {
16
+ constructor(maxSize = getConfiguredMaxSize()) {
8
17
  // Singleton pattern: If instance exists, return it
9
18
  if (PacketQueue.instance) {
10
19
  return PacketQueue.instance;
@@ -54,7 +63,7 @@ class PacketQueue {
54
63
  * @param {number} maxSize - Maximum size of the queue (only used if instance doesn't exist)
55
64
  * @returns {PacketQueue} - The singleton instance
56
65
  */
57
- static getInstance(maxSize = 1000) {
66
+ static getInstance(maxSize = getConfiguredMaxSize()) {
58
67
  if (!PacketQueue.instance) {
59
68
  PacketQueue.instance = new PacketQueue(maxSize);
60
69
  }
@@ -65,5 +74,13 @@ class PacketQueue {
65
74
  // Initialize the static instance property
66
75
  PacketQueue.instance = null;
67
76
 
77
+ // whatap.conf는 비동기로 로드되어 싱글톤 생성 시점에는 값이 없을 수 있다.
78
+ // conf 로드/리로드 완료 후 max_send_queue_size 값을 큐에 반영하는 유일한 경로.
79
+ conf.on('max_send_queue_size', function () {
80
+ if (PacketQueue.instance) {
81
+ PacketQueue.instance.maxSize = getConfiguredMaxSize();
82
+ }
83
+ });
84
+
68
85
  // Export the class
69
86
  module.exports = PacketQueue;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "whatap",
3
3
  "homepage": "http://www.whatap.io",
4
- "version": "2.0.1",
5
- "releaseDate": "20260526",
4
+ "version": "2.0.2-canary.0",
5
+ "releaseDate": "20260611",
6
6
  "description": "Monitoring and Profiling Service",
7
7
  "main": "index.js",
8
8
  "scripts": {},