whatap 0.4.72 → 0.4.74

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.
@@ -33,7 +33,7 @@ var ConfigDefault = {
33
33
 
34
34
  "trace_service_name_header_key": null,
35
35
  "trace_service_name_key": null,
36
- "web_static_content_extensions": "js, htm, html, gif, png, jpg, css, txt",
36
+ "web_static_content_extensions": str("web_static_content_extensions" , "js, htm, html, gif, png, jpg, css, txt, ico"),
37
37
  "trace_auto_service_enabled": false,
38
38
  "trace_auto_service_backstack_enabled": true,
39
39
  "trace_background_socket_enabled": true,
@@ -84,6 +84,7 @@ var ConfigDefault = {
84
84
  "trace_http_client_ip_header_key": "x-forwarded-for",
85
85
  "trace_user_agent_header_key": "",
86
86
  "trace_referer_header_key": "",
87
+ "profile_sql_param_enabled": bool('profile_sql_param_enabled',false),
87
88
 
88
89
  "error_snap_enabled" : true,
89
90
 
@@ -174,6 +175,7 @@ var ConfigDefault = {
174
175
  "whatap_micro_enabled": bool('whatap_micro_enabled',false),
175
176
  "master_agent_host": str('master_agent_host', 'whatap-master-agent.whatap-monitoring.svc.cluster.local'),
176
177
  "master_agent_port": num('master_agent_port', 6600),
178
+ "enabled_master_agent_call": bool('enabled_master_agent_call' , false),
177
179
 
178
180
  "simula_agent_count": num('simula_agent_count', 0),
179
181
  "correction_factor_cpu": num('correction_factor_cpu', 1),
@@ -61,7 +61,7 @@ CounterManager.prototype.run = function () {
61
61
 
62
62
  if(conf.whatap_micro_enabled){
63
63
  KubeUtil.loadContainerId();
64
- KubeClient.run();
64
+ if (conf.enabled_master_agent_call) KubeClient.run();
65
65
  }
66
66
  };
67
67
  CounterManager.prototype.stop = function(){
@@ -69,11 +69,9 @@ var KubeClient = {
69
69
  client.open( self.node_agent_ip , self.node_agent_port, function(err, data){
70
70
  client.send(new DataOutputX().writeValue(p));
71
71
  }, function(err, data){
72
-
73
72
  if(err || !data){
74
73
  return console.log("#### errordata" , err, data);
75
74
  }
76
-
77
75
  var m = new DataInputX(data).readValue();
78
76
 
79
77
  self.cpu = m.getFloat("cpu");
@@ -37,7 +37,7 @@ var TraceContextManager = require('../trace/trace-context-manager'),
37
37
  KeyGen = require('../util/keygen'),
38
38
  Logger = require('../logger');
39
39
 
40
- var _exts=new Set([".css",".js",".png"]);
40
+ var _exts=new Set([".css",".js",".png", ".htm", ".html", ".gif", ".jpg", ".css", ".txt", ".ico"]);
41
41
 
42
42
  var configIpHeaderKey = conf.trace_http_client_ip_header_key;
43
43
  var configUserAgentKey = undefined;
@@ -26,7 +26,7 @@
26
26
 
27
27
  var MysqlObserver = function (agent) {
28
28
  this.agent = agent;
29
- this.packages = ['mysql','mysql2'];
29
+ this.packages = ['mysql','mysql2','mysql2/promise'];
30
30
  };
31
31
 
32
32
  var queryHook = function (dbc_hash, agent) {
@@ -166,7 +166,7 @@ var toParamBytes = function(p, crc) {
166
166
  return null;
167
167
  }
168
168
  try{
169
- return ParamSecurity.encrypt(Buffer.from(p), crc);
169
+ return ParamSecurity.encrypt(Buffer.from(p, 'utf8'), crc);
170
170
  } catch(e) {
171
171
  return null;
172
172
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "whatap",
3
3
  "homepage": "http://www.whatap.io",
4
- "version": "0.4.72",
5
- "releaseDate": "20230417",
4
+ "version": "0.4.74",
5
+ "releaseDate": "20230608",
6
6
  "description": "Monitoring and Profiling Service",
7
7
  "main": "index.js",
8
8
  "scripts": {},