appdynamics 24.2.0 → 24.3.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.
@@ -1,7 +1,7 @@
1
1
  {
2
- "version": "24.2.0.0",
3
- "sha": "2786053cdbf1faaeeb179f3d9f4e439b264d1056",
2
+ "version": "24.3.0.0",
3
+ "sha": "",
4
4
  "nodeVersion": "",
5
- "buildName": "9764",
5
+ "buildName": "9843",
6
6
  "compatibilityVersion": "4.4.1.0"
7
7
  }
package/lib/core/agent.js CHANGED
@@ -197,7 +197,7 @@ Agent.prototype.init = function (opts) {
197
197
  self.initializeOpts(opts);
198
198
 
199
199
  self.opts.clsDisabled = !!self.opts.clsDisabled;
200
-
200
+
201
201
  if(process.env.APPDYNAMICS_CONTAINERINFO_FETCH_SERVICE) {
202
202
  self.setKubernetesConfig();
203
203
  }
@@ -258,6 +258,18 @@ Agent.prototype.init = function (opts) {
258
258
  nodeName = self.opts.reuseNodePrefix;
259
259
  }
260
260
 
261
+ const filePath = path.join(require.resolve('appdynamics'), '..');
262
+ process.env.APPDYNAMICS_AGENT_DIR = filePath;
263
+
264
+ try {
265
+ fs.accessSync(filePath, fs.constants.W_OK);
266
+ const fileName = `${filePath}/app-metadata.json`;
267
+ const content = JSON.stringify({ "nodeName": nodeName });
268
+ fs.writeFileSync(fileName, content);
269
+ } catch (err) {
270
+ self.logger.error(`unable to write the file app-metadata.json file to path ${filePath} \n`, err);
271
+ }
272
+
261
273
  self.tmpDir = Agent.computeTmpDir(self.rootTmpDir,
262
274
  self.opts.controllerHostName,
263
275
  self.opts.controllerPort,
@@ -109,6 +109,7 @@ LibagentConnector.prototype.init = function () {
109
109
  self.nodeProperties.set("opentelemetry-logs-push-enabled", 0);
110
110
  self.nodeProperties.set("opentelemetry-allowed-log-level", 0);
111
111
  self.libagent.init(self.agent);
112
+ self.libagent.setRequiresNamingRules(false);
112
113
  self.agent.TracerProvider && self.agent.TracerProvider.updateResourceAttributes({ "container.id": self.getContainerId() });
113
114
 
114
115
  self.exceptionHandlers = new ExceptionHandlers();
@@ -241,3 +241,8 @@ LibAgent.prototype.startProcessSnapshot = function() {
241
241
  var self = this;
242
242
  self.agent.libagentConnector.startProcessSnapshot();
243
243
  };
244
+
245
+ LibAgent.prototype.setRequiresNamingRules = function (flag) {
246
+ var self = this;
247
+ self.agent.setRequiresNamingRules(flag);
248
+ };
@@ -124,13 +124,46 @@ SocketioProbe.prototype.attach = function(obj) {
124
124
 
125
125
  try {
126
126
  sentCountMetric.addValue(1);
127
- sentSizeMetric.addValue(typeof(args[1]) == 'string' ?
128
- args[1].length : JSON.stringify(args[1]).length);
127
+ if(args.length > 1) {
128
+ sentSizeMetric.addValue(JSON.stringify(args.slice(1)).length);
129
+ }
129
130
  } catch (e) {
130
131
  // ignored; unable to serialize socket.io message
131
132
  }
132
133
  });
133
134
 
135
+ proxy.getter(socket, ['broadcast'], function(obj, ret) {
136
+ proxy.before(ret, ['emit', 'send'], function(obj, args) {
137
+ // ignore internal events
138
+ if(args[0] === 'newListener') return;
139
+
140
+ try {
141
+ sentCountMetric.addValue(1);
142
+ if(args.length > 1) {
143
+ sentSizeMetric.addValue(JSON.stringify(args.slice(1)).length);
144
+ }
145
+ } catch (e) {
146
+ // ignored; unable to serialize socket.io message
147
+ }
148
+ });
149
+ });
150
+
151
+ proxy.after(socket, ['to', 'in', 'except'], function(obj, args, ret) {
152
+ proxy.before(ret, ['emit', 'send'], function(obj, args) {
153
+ // ignore internal events
154
+ if(args[0] === 'newListener') return;
155
+
156
+ try {
157
+ sentCountMetric.addValue(1);
158
+ if(args.length > 1) {
159
+ sentSizeMetric.addValue(JSON.stringify(args.slice(1)).length);
160
+ }
161
+ } catch (e) {
162
+ // ignored; unable to serialize socket.io message
163
+ }
164
+ });
165
+ });
166
+
134
167
  // received messages
135
168
  proxy.before(socket, ['on', 'addListener'], function(obj, args) {
136
169
  // ignore internal events
@@ -138,9 +171,11 @@ SocketioProbe.prototype.attach = function(obj) {
138
171
 
139
172
  proxy.callback(args, -1, function(obj, args) {
140
173
  try {
174
+ var msg = Array.from(args);
141
175
  receivedCountMetric.addValue(1);
142
- receivedSizeMetric.addValue(typeof(args[0]) == 'string' ?
143
- args[0].length : JSON.stringify(args[0]).length);
176
+ if(msg.length > 0) {
177
+ receivedSizeMetric.addValue(JSON.stringify(msg).length);
178
+ }
144
179
  } catch (e) {
145
180
  // ignored; unable to serialize socket.io message
146
181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appdynamics",
3
- "version": "24.2.0",
3
+ "version": "24.3.0",
4
4
  "description": "Performance Profiler and Monitor",
5
5
  "author": "AppDynamics, Inc.",
6
6
  "homepage": "https://www.appdynamics.com",
@@ -50,9 +50,9 @@
50
50
  "https-proxy-agent": "^5.0.1",
51
51
  "uuid": "^8.3.2",
52
52
  "y18n": "^5.0.8",
53
- "appdynamics-libagent-napi": "https://cdn.appdynamics.com/packages/nodejs/24.2.0.0/appdynamics-libagent-napi-node.tgz",
54
- "appdynamics-native": "https://cdn.appdynamics.com/packages/nodejs/24.2.0.0/appdynamics-native-node.tgz",
55
- "appdynamics-protobuf": "https://cdn.appdynamics.com/packages/nodejs/24.2.0.0/appdynamics-protobuf-node.tgz"
53
+ "appdynamics-libagent-napi": "https://cdn.appdynamics.com/packages/nodejs/24.3.0.0/appdynamics-libagent-napi-node.tgz",
54
+ "appdynamics-native": "https://cdn.appdynamics.com/packages/nodejs/24.3.0.0/appdynamics-native-node.tgz",
55
+ "appdynamics-protobuf": "https://cdn.appdynamics.com/packages/nodejs/24.3.0.0/appdynamics-protobuf-node.tgz"
56
56
  },
57
57
  "overrides": {
58
58
  "semver": "7.5.4"
package/packageBck.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appdynamics",
3
- "version": "24.2.0",
3
+ "version": "24.3.0",
4
4
  "description": "Performance Profiler and Monitor",
5
5
  "author": "AppDynamics, Inc.",
6
6
  "homepage": "https://www.appdynamics.com",
@@ -50,9 +50,9 @@
50
50
  "https-proxy-agent": "^5.0.1",
51
51
  "uuid": "^8.3.2",
52
52
  "y18n": "^5.0.8",
53
- "appdynamics-libagent-napi": "https://cdn.appdynamics.com/packages/nodejs/24.2.0.0/appdynamics-libagent-napi-node.tgz",
54
- "appdynamics-native": "https://cdn.appdynamics.com/packages/nodejs/24.2.0.0/appdynamics-native-node.tgz",
55
- "appdynamics-protobuf": "https://cdn.appdynamics.com/packages/nodejs/24.2.0.0/appdynamics-protobuf-node.tgz"
53
+ "appdynamics-libagent-napi": "https://cdn.appdynamics.com/packages/nodejs/24.3.0.0/appdynamics-libagent-napi-node.tgz",
54
+ "appdynamics-native": "https://cdn.appdynamics.com/packages/nodejs/24.3.0.0/appdynamics-native-node.tgz",
55
+ "appdynamics-protobuf": "https://cdn.appdynamics.com/packages/nodejs/24.3.0.0/appdynamics-protobuf-node.tgz"
56
56
  },
57
57
  "overrides": {
58
58
  "semver": "7.5.4"