appdynamics 21.6.0 → 22.2.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.
Files changed (53) hide show
  1. package/README.md +1 -1
  2. package/appdynamics_version.json +2 -2
  3. package/lib/core/agent.js +21 -44
  4. package/lib/core/appDProxy.js +12 -12
  5. package/lib/core/logger.js +27 -79
  6. package/lib/core/opentelemetry-tracer.js +70 -0
  7. package/lib/libagent/libagent-connector.js +5 -47
  8. package/lib/libagent/libagent.js +2 -3
  9. package/lib/libagent/transaction-sender.js +15 -16
  10. package/lib/libagent/transactions/transaction-reporter.js +0 -5
  11. package/lib/{libagent/metrics → metrics}/metric.js +4 -1
  12. package/lib/metrics/metrics-manager.js +4 -3
  13. package/lib/probes/apollo-entry-probe.js +69 -0
  14. package/lib/probes/cluster-probe.js +1 -1
  15. package/lib/probes/couchbase-probe.js +19 -0
  16. package/lib/probes/grpc-exit-probe.js +1 -1
  17. package/lib/probes/http-common.js +97 -0
  18. package/lib/probes/http-entry-probe.js +42 -122
  19. package/lib/probes/http-exit-probe.js +112 -48
  20. package/lib/probes/http-ot-utils.js +113 -0
  21. package/lib/probes/http-probe.js +14 -7
  22. package/lib/probes/http2-entry-probe.js +1 -7
  23. package/lib/probes/http2-exit-probe.js +4 -7
  24. package/lib/probes/ioredis-probe.js +2 -2
  25. package/lib/probes/mongodb-probe.js +199 -112
  26. package/lib/probes/rabbitmq-entry-probe.js +184 -0
  27. package/lib/probes/rabbitmq-exit-probe.js +108 -0
  28. package/lib/probes/rabbitmq-probe.js +76 -0
  29. package/lib/process/process-scanner.js +2 -2
  30. package/lib/profiler/profiler.js +6 -2
  31. package/lib/profiler/time-promise.js +0 -3
  32. package/lib/proxy/protobuf-model.js +0 -264
  33. package/lib/transactions/correlation.js +1 -20
  34. package/lib/transactions/eum.js +2 -34
  35. package/lib/utility.js +20 -1
  36. package/package.json +13 -12
  37. package/packageBck.json +13 -12
  38. package/lib/libproxy/instance-info-sender.js +0 -41
  39. package/lib/libproxy/libproxy.js +0 -204
  40. package/lib/libproxy/metric.js +0 -109
  41. package/lib/libproxy/proxy-launcher.js +0 -308
  42. package/lib/libproxy/proxy-transport.js +0 -634
  43. package/lib/libproxy/transaction-reporter.js +0 -168
  44. package/lib/proxy/backend-config.js +0 -488
  45. package/lib/transactions/analytics-reporter.js +0 -187
  46. package/lib/transactions/config-manager.js +0 -87
  47. package/lib/transactions/correlation-header.js +0 -495
  48. package/lib/transactions/data-collectors.js +0 -95
  49. package/lib/transactions/sep-config.js +0 -66
  50. package/lib/transactions/transaction-naming.js +0 -231
  51. package/lib/transactions/transaction-registry.js +0 -156
  52. package/lib/transactions/transaction-rules.js +0 -173
  53. package/postInstallScript.js +0 -33
@@ -0,0 +1,76 @@
1
+ /*
2
+ Copyright (c) AppDynamics, Inc., and its affiliates
3
+ 2015
4
+ All Rights Reserved
5
+ */
6
+ 'use strict';
7
+
8
+ var RabbitMQEntryProbe = require('./rabbitmq-entry-probe').RabbitMQEntryProbe;
9
+ var RabbitMQExitProbe = require('./rabbitmq-exit-probe').RabbitMQExitProbe;
10
+
11
+ function RabbitMQProbe(agent) {
12
+ this.agent = agent;
13
+ this.packages = ['amqplib/lib/connect', 'amqplib/lib/callback_model', 'amqplib/lib/channel_model'];
14
+ this.packageAttached = {};
15
+
16
+ this.entryProbe = new RabbitMQEntryProbe(agent);
17
+ this.exitProbe = new RabbitMQExitProbe(agent);
18
+ this.init();
19
+ }
20
+ exports.RabbitMQProbe = RabbitMQProbe;
21
+
22
+ RabbitMQProbe.prototype.init = function() {
23
+ this.entryProbe.init();
24
+ this.exitProbe.init();
25
+ };
26
+
27
+ RabbitMQProbe.prototype.attach = function(obj, moduleName) {
28
+ var self = this;
29
+
30
+ if (!self.agent.opts.rabbitmqEnabled) return;
31
+
32
+
33
+ if (self.packageAttached[moduleName]) {
34
+ return;
35
+ }
36
+ self.packageAttached[moduleName] = obj;
37
+
38
+ self.agent.on('destroy', function() {
39
+ for (const [name, obj] of Object.entries(self.packageAttached)) {
40
+ if(name && obj) {
41
+ self.unwrapModule(name, obj);
42
+ }
43
+ }
44
+ });
45
+
46
+ self.entryProbe.attach(obj, moduleName);
47
+ self.exitProbe.attach(obj, moduleName);
48
+ };
49
+
50
+ RabbitMQProbe.prototype.unwrapConnect = function(obj) {
51
+ var self = this;
52
+ var proxy = self.agent.proxy;
53
+ proxy.release(obj.connect);
54
+ };
55
+
56
+ RabbitMQProbe.prototype.unwrapChannel = function(obj) {
57
+ var self = this;
58
+ var proxy = self.agent.proxy;
59
+ proxy.release(obj.Channel.prototype.publish);
60
+ proxy.release(obj.Channel.prototype.consume);
61
+ proxy.release(obj.Channel.prototype.ack);
62
+ proxy.release(obj.Channel.prototype.nack);
63
+ proxy.release(obj.Channel.prototype.ackAll);
64
+ proxy.release(obj.Channel.prototype.emit);
65
+ proxy.release(obj.Channel.prototype.reject);
66
+ };
67
+
68
+ RabbitMQProbe.prototype.unwrapModule = function(moduleName, moduleExport) {
69
+ var self = this;
70
+ if(moduleName == 'amqplib/lib/connect') {
71
+ self.unwrapConnect(moduleExport);
72
+ } else if (moduleName == 'amqplib/lib/callback_model'
73
+ || moduleName == 'amqplib/lib/channel_model') {
74
+ self.unwrapChannel(moduleExport);
75
+ }
76
+ };
@@ -3,7 +3,7 @@ Copyright (c) AppDynamics, Inc., and its affiliates
3
3
  2015
4
4
  All Rights Reserved
5
5
  */
6
- var uuid = require('uuid');
6
+ var { v4: uuid } = require('uuid');
7
7
 
8
8
  var APPD_INTERNAL_RE = /\/appdynamics\//;
9
9
 
@@ -214,7 +214,7 @@ ProcessScanner.prototype.startSnapshot = function (auto,
214
214
 
215
215
  self.currentProcessSnapshot = {
216
216
  snapshotRequestID: requestID,
217
- guid: uuid.v4(),
217
+ guid: uuid(),
218
218
  timestamp: undefined,
219
219
  processCallGraph: undefined,
220
220
  processAllocationGraph: undefined,
@@ -84,7 +84,7 @@ Profiler.prototype.formatStackTrace = function (err) {
84
84
  };
85
85
 
86
86
 
87
- Profiler.prototype.startTransaction = function (time, req, entryType) {
87
+ Profiler.prototype.startTransaction = function(time, req, entryType, baggageCorrHeader) {
88
88
  var self = this;
89
89
 
90
90
  var transaction = new Transaction();
@@ -101,6 +101,10 @@ Profiler.prototype.startTransaction = function (time, req, entryType) {
101
101
  parsedParameterString: req.url ? url.parse(req.url).query : ''
102
102
  };
103
103
 
104
+ if(baggageCorrHeader) {
105
+ transaction.baggageCorrHeader = baggageCorrHeader;
106
+ }
107
+
104
108
  self.transactions[time.threadId] = transaction;
105
109
 
106
110
  var delayedCallbackAttached = false;
@@ -230,7 +234,6 @@ Profiler.prototype.createExitCall = function (time, exitCallInfo) {
230
234
  Profiler.prototype.addExitCall = function (time, exitCall, error) {
231
235
  var self = this;
232
236
 
233
- exitCall.ms = time.ms;
234
237
  exitCall.error = error;
235
238
 
236
239
  var transaction = self.transactions[exitCall.threadId];
@@ -239,6 +242,7 @@ Profiler.prototype.addExitCall = function (time, exitCall, error) {
239
242
  exitCall = transaction.api.exitCallCompleted(exitCall) || exitCall;
240
243
  }
241
244
 
245
+ self.agent.backendConnector.stopExitCall(exitCall, error);
242
246
  self.tryEndingTransactionAfterExitCall(transaction, exitCall, time);
243
247
  };
244
248
 
@@ -136,9 +136,6 @@ TimePromise.prototype.createCorrelationInfo = function (exitCall, doNotResolve)
136
136
  if (exitCall.correlationHeader) {
137
137
  return exitCall.correlationHeader;
138
138
  }
139
- var header = self.agent.correlation.newCorrelationHeader();
140
- header.build(self.transaction, exitCall, !!doNotResolve, true);
141
- return header.getStringHeader();
142
139
  };
143
140
 
144
141
  TimePromise.prototype.addSnapshotData = function (key, value) {
@@ -33,140 +33,12 @@ ProtobufModel.prototype.init = function() {
33
33
  self.userCodeErrRegEx = /at\s([a-zA-Z]\:\\)?([^\:]+)\:(\d+)\:\d+$/;
34
34
  self.classRegex = /^(.+)\.([^\.]+)$/;
35
35
  self.agentRegex = /node_modules[\\\/]appdynamics/;
36
-
37
- self.agent.on('configUpdated', function() {
38
- self.detectErrors = self.agent.configManager.getConfigValue('errorConfig.errorDetection.detectErrors');
39
- self.errorThreshold = self.agent.configManager.getConfigValue('errorConfig.errorDetection.phpErrorThreshold');
40
- self.ignoredMessagesConfig = self.agent.configManager.getConfigValue('errorConfig.ignoredMessages');
41
- self.ignoredExceptionsConfig = self.agent.configManager.getConfigValue('errorConfig.ignoredExceptions');
42
- self.callGraphConfig = self.agent.configManager.getConfigValue('callgraphConfig');
43
- });
44
- };
45
-
46
- ProtobufModel.prototype.createBTIdentifier = function(transaction) {
47
- var btIdentifier;
48
- var inAppCorreation = transaction.corrHeader && (!transaction.corrHeader.crossAppCorrelation);
49
- if(transaction.registrationId) {
50
- btIdentifier = {
51
- type: inAppCorreation ? 'REMOTE_REGISTERED' : 'REGISTERED',
52
- btID: transaction.registrationId
53
- };
54
- }
55
- else {
56
- if(inAppCorreation) {
57
- btIdentifier = {
58
- type: 'REMOTE_UNREGISTERED',
59
- unregisteredRemoteBT: {
60
- btName: transaction.name,
61
- entryPointType: transaction.entryType
62
- }
63
- };
64
-
65
- if(transaction.isAutoDiscovered) {
66
- btIdentifier.unregisteredRemoteBT.matchCriteriaType = 'DISCOVERED';
67
- btIdentifier.unregisteredRemoteBT.namingSchemeType = transaction.namingSchemeType;
68
- }
69
- else {
70
- btIdentifier.unregisteredRemoteBT.matchCriteriaType = 'CUSTOM';
71
- }
72
- }
73
- else {
74
- btIdentifier = {
75
- type: 'UNREGISTERED',
76
- unregisteredBT: {
77
- btInfo: {
78
- internalName: transaction.name,
79
- entryPointType: transaction.entryType
80
- },
81
- isAutoDiscovered: transaction.isAutoDiscovered
82
- }
83
- };
84
- }
85
- }
86
-
87
- return btIdentifier;
88
36
  };
89
37
 
90
38
 
91
-
92
- ProtobufModel.prototype.createCorrelation = function(transaction) {
93
- var self = this;
94
-
95
- var corrHeader = transaction.corrHeader;
96
- if(!corrHeader || corrHeader.crossAppCorrelation) {
97
- return undefined;
98
- }
99
-
100
- var correlation = self.agent.correlation;
101
-
102
- var corrObj = {
103
- incomingBackendId: corrHeader.selfResolutionBackendId,
104
- incomingSnapshotEnabled: corrHeader.getSubHeader(correlation.SNAPSHOT_ENABLE) || false,
105
- doNotSelfResolve: corrHeader.getSubHeader(correlation.DONOTRESOLVE) || false,
106
- exitCallSequence: corrHeader.getSubHeader(correlation.EXIT_POINT_GUID),
107
- componentLinks: [],
108
- };
109
-
110
- var compFrom = corrHeader.getSubHeader(correlation.COMPONENT_ID_FROM);
111
- var compTo = corrHeader.getSubHeader(correlation.COMPONENT_ID_TO);
112
- var exitOrder = corrHeader.getSubHeader(correlation.EXIT_CALL_TYPE_ORDER);
113
-
114
- if(compFrom) {
115
- for(var i = 0; i < compFrom.length; i++) {
116
- corrObj.componentLinks.push({
117
- fromComponentID: compFrom[i],
118
- toComponentID: compTo[i],
119
- exitPointType: exitOrder[i]
120
- });
121
- }
122
- }
123
-
124
- return corrObj;
125
- };
126
-
127
-
128
-
129
- ProtobufModel.prototype.createBTDetails = function(transaction) {
130
- var self = this;
131
-
132
- var errorInfo = self.createErrorInfo(transaction);
133
- var exceptionInfo = self.createExceptionInfo(transaction);
134
- // This is awful, but the backend metrics must be created
135
- // before the snapshot info because creating the background metrics
136
- // attaches the backendIdentifier to the exit call objects.
137
- var backendMetrics = self.createBackendMetrics(transaction);
138
- var snapshotInfo = self.createSnapshotInfo(
139
- transaction, errorInfo, exceptionInfo);
140
-
141
- var btInfoState =
142
- transaction.btInfoResponse ? 'RESPONSE_RECEIVED' : 'MISSING_RESPONSE';
143
-
144
- var btDetails = {
145
- btInfoRequest: transaction.btInfoRequest,
146
- btMetrics: {
147
- timeTaken: transaction.ms,
148
- isError: !!transaction.hasErrors,
149
- backendMetrics: backendMetrics
150
- },
151
- btInfoState: btInfoState,
152
- snapshotInfo: snapshotInfo,
153
- errors: {
154
- exceptionInfo: exceptionInfo,
155
- errorInfo: errorInfo
156
- },
157
- sepInfo: transaction.sepRuleName
158
- };
159
-
160
- return btDetails;
161
- };
162
-
163
-
164
-
165
39
  ProtobufModel.prototype.createSnapshotInfo = function(transaction, errorInfo, exceptionInfo) {
166
40
  var self = this;
167
41
 
168
- //console.log('btInfoResponse', transaction.btInfoResponse)
169
-
170
42
  var snapshotInfo = undefined;
171
43
  var snapshotTriggerObject = self.agent.backendConnector.createSnapshotTrigger(transaction);
172
44
  if (snapshotTriggerObject.attachSnapshot) {
@@ -262,105 +134,6 @@ ProtobufModel.prototype.createSnapshot = function(transaction) {
262
134
  };
263
135
 
264
136
 
265
-
266
- ProtobufModel.prototype.createAppException = function(error) {
267
- return this.createExceptionInfo({ error: error }, true);
268
- };
269
-
270
- ProtobufModel.prototype.createBackendMetrics = function(transaction) {
271
- var self = this;
272
-
273
- var backendMetricsMap = {};
274
- var backendMetrics = [];
275
- if(transaction.exitCalls) {
276
- transaction.exitCalls.forEach(function(exitCall) {
277
- var exitCallId = exitCall.getBackendInfoString();
278
- var backendMetric = backendMetricsMap[exitCallId];
279
- if(backendMetric) {
280
- backendMetric.numOfCalls++;
281
- if(exitCall.error) {
282
- backendMetric.numOfErrors++;
283
- }
284
-
285
- if(exitCall.ms < backendMetric.minCallTime) {
286
- backendMetric.minCallTime = exitCall.ms;
287
- }
288
-
289
- if(exitCall.ms > backendMetric.maxCallTime) {
290
- backendMetric.maxCallTime = exitCall.ms;
291
- }
292
-
293
- // this will be needed by SnapshotDbCalls
294
- exitCall.backendIdentifier = backendMetric.backendIdentifier;
295
-
296
- return;
297
- }
298
-
299
- var backendIdentifier;
300
- if(exitCall.registrationId) {
301
- var registeredBackend = {
302
- exitPointType: exitCall.exitType,
303
- exitPointSubtype: exitCall.exitSubType,
304
- backendID: exitCall.registrationId
305
- };
306
- var componentId = exitCall.componentId;
307
- if (componentId) {
308
- registeredBackend.componentID = componentId;
309
- registeredBackend.componentIsForeignAppID = !!exitCall.componentIsForeignAppId;
310
- }
311
- backendIdentifier = {
312
- type: 'REGISTERED',
313
- registeredBackend: registeredBackend
314
- };
315
- }
316
- else {
317
- var identifyingProperties = [];
318
- var detectedIdentifyingProperties = exitCall.identifyingProperties;
319
- for (var propName in detectedIdentifyingProperties) {
320
- if (!detectedIdentifyingProperties.hasOwnProperty(propName))
321
- continue;
322
- var prop =
323
- {name: propName, value: detectedIdentifyingProperties[propName]};
324
- identifyingProperties.push(prop);
325
- }
326
-
327
- var displayName = self.agent.backendConfig.generateDisplayName(exitCall);
328
- backendIdentifier = {
329
- type: 'UNREGISTERED',
330
- unregisteredBackend: {
331
- exitCallInfo: {
332
- exitPointType: exitCall.exitType,
333
- exitPointSubtype: exitCall.exitSubType,
334
- displayName: displayName,
335
- identifyingProperties: identifyingProperties
336
- }
337
- }
338
- };
339
- }
340
-
341
- backendMetric = {
342
- category: exitCall.category,
343
- timeTaken: exitCall.ms,
344
- numOfCalls: 1,
345
- numOfErrors: (exitCall.error ? 1 : 0),
346
- minCallTime: exitCall.ms,
347
- maxCallTime: exitCall.ms,
348
- backendIdentifier: backendIdentifier
349
- };
350
-
351
- backendMetrics.push(backendMetric);
352
- backendMetricsMap[exitCallId] = backendMetric;
353
-
354
- // this will be needed by SnapshotDbCalls
355
- exitCall.backendIdentifier = backendIdentifier;
356
- });
357
- }
358
-
359
- return backendMetrics;
360
- };
361
-
362
-
363
-
364
137
  ProtobufModel.prototype.createErrorInfo = function() {
365
138
  // will be reused for console.log and console.error messages
366
139
 
@@ -374,39 +147,6 @@ ProtobufModel.prototype.createErrorInfo = function() {
374
147
  errors: []
375
148
  };
376
149
 
377
- // iterate over console.log and console.error messages here instead
378
-
379
- /*
380
- if(transaction.exitCalls) {
381
- transaction.exitCalls.forEach(function(exitCall) {
382
- if(!exitCall.error) return;
383
- if(exitCall.error.stack) return; // filter out exceptions
384
- // don't care about errorThreshold for now, because we only have ERRORs
385
-
386
- var errorMessage = self.extractErrorMessage(error);
387
- if(!errorMessage) return;
388
-
389
- if(self.isErrorIgnored(errorMessage)) return;
390
-
391
- var error = errorsMap[errorMessage];
392
- if(error) {
393
- error.count++;
394
- return;
395
- }
396
-
397
- error = {
398
- errorThreshold: 'ERROR',
399
- errorMessage: exitCall.error.message,
400
- displayName: "Node.js Error",
401
- count: 1
402
- }
403
-
404
- errorsMap[errorMessage] = error;
405
- errorInfo.errors.push(error)
406
- });
407
- }
408
- */
409
-
410
150
  if(errorInfo.errors.length > 0) {
411
151
  return errorInfo;
412
152
  }
@@ -415,10 +155,6 @@ errorInfo.errors.push(error)
415
155
  };
416
156
 
417
157
 
418
- ProtobufModel.prototype.createAppException = function(error) {
419
- return this.createExceptionInfo({ error: error }, true);
420
- };
421
-
422
158
  ProtobufModel.prototype.constructStackTrace = function(stackTraceStr) {
423
159
  var self = this;
424
160
  var stackTrace = {
@@ -5,9 +5,6 @@ All Rights Reserved
5
5
  */
6
6
  'use strict';
7
7
 
8
- var CorrelationHeader = require('./correlation-header').CorrelationHeader;
9
-
10
-
11
8
  function Correlation(agent) {
12
9
  this.agent = agent;
13
10
 
@@ -50,27 +47,11 @@ function Correlation(agent) {
50
47
  this.cidRegex = /^\{\[UNRESOLVED\]\[(\d+)\]\}$/;
51
48
  this.cidResolvedCrossAppRegEx = /^A(\d+)$/;
52
49
  this.cidResolvedRegEx = /^(\d+)$/;
53
-
54
50
  }
51
+
55
52
  exports.Correlation = Correlation;
56
53
 
57
54
 
58
55
  Correlation.prototype.init = function() {
59
- var self = this;
60
-
61
-
62
- self.agent.on('configUpdated', function() {
63
- self.appId = self.agent.configManager.getConfigValue("agentIdentity.appID");
64
- self.tierId = self.agent.configManager.getConfigValue("agentIdentity.tierID");
65
- self.accountGuid = self.agent.configManager.getConfigValue("agentIdentity.accountGUID");
66
- self.controllerGuid = self.agent.configManager.getConfigValue("agentIdentity.controllerGUID");
67
- self.namingSchemeType = self.agent.configManager.getConfigValue('txConfig.nodejsWeb.discoveryConfig.namingScheme.type');
68
- });
69
56
  };
70
57
 
71
-
72
- Correlation.prototype.newCorrelationHeader = function() {
73
- var self = this;
74
-
75
- return new CorrelationHeader(self.agent);
76
- };
@@ -5,20 +5,18 @@ All Rights Reserved
5
5
  */
6
6
  'use strict';
7
7
 
8
- var uuid = require('uuid');
9
- var txRules = require('./transaction-rules').TransactionRules;
8
+ var { v4: uuid } = require('uuid');
10
9
 
11
10
 
12
11
  function Eum(agent) {
13
12
  this.agent = agent;
14
13
 
15
- this.enabled = false;
16
14
  this.globalAccountName = null;
17
15
  this.excludeRules = null;
18
16
  this.includeRules = null;
19
17
 
20
18
  // GUID generation
21
- this.uuidBase = uuid.v4();
19
+ this.uuidBase = uuid();
22
20
  this.nextEumCookieId = 1;
23
21
 
24
22
  // constants
@@ -40,12 +38,6 @@ Eum.prototype.init = function() {
40
38
  var self = this;
41
39
 
42
40
  self.registerEumCookieType();
43
- self.agent.on('configUpdated', function() {
44
- self.enabled = self.agent.configManager.getConfigValue("eumConfig.enabled");
45
- self.globalAccountName = self.agent.configManager.getConfigValue("eumConfig.globalAccountName");
46
- self.excludeRules = self.agent.configManager.getConfigValue("eumConfig.excludeRules");
47
- self.includeRules = self.agent.configManager.getConfigValue("eumConfig.includeRules");
48
- });
49
41
  };
50
42
 
51
43
  Eum.prototype.registerEumCookieType = function() {
@@ -64,27 +56,3 @@ Eum.prototype.newEumCookie = function(transaction, request, response, isHttps) {
64
56
 
65
57
  return new self.eumCookie(self.agent, transaction, request, response, isHttps);
66
58
  };
67
-
68
- Eum.prototype.enabledForTransaction = function(req) {
69
- var self = this,
70
- rule, matchResult, counter;
71
-
72
- if(self.excludeRules && self.excludeRules.length) {
73
- for(counter = 0; counter < self.excludeRules.length; counter++) {
74
- rule = self.excludeRules[counter];
75
- matchResult = txRules.matchesRule(req, rule, self.agent.stringMatcher);
76
- if (matchResult) return false;
77
- }
78
- }
79
-
80
- if(self.includeRules && self.includeRules.length) {
81
- for(counter = 0; counter < self.includeRules.length; counter++) {
82
- rule = self.includeRules[counter];
83
- matchResult = txRules.matchesRule(req, rule, self.agent.stringMatcher);
84
- if (matchResult) return true;
85
- }
86
- return false;
87
- }
88
-
89
- return self.enabled;
90
- };
package/lib/utility.js CHANGED
@@ -1,3 +1,6 @@
1
+ var url = require('url');
2
+
3
+
1
4
  function filterSensitiveDataFromObject(objIns) {
2
5
  if (objIns && Object.prototype.toString.call(objIns) == "[object Object]") {
3
6
  Object.keys(objIns).forEach(function (key) {
@@ -21,5 +24,21 @@ function deepCopy(origObject) {
21
24
  return cpObj;
22
25
  }
23
26
 
27
+ function createBtNamingWrapper(req) {
28
+ // TODO: replace these with boost::regex in libagent bindings
29
+ if (req.url) {
30
+ var parsedUrl = url.parse(req.url);
31
+ req.parsedPathName = parsedUrl.pathname;
32
+ req.parsedParameterString = parsedUrl.query;
33
+ }
34
+ return req;
35
+ }
36
+
37
+ const constants = {
38
+ GRAPHQL_QUERY_TYPE: "gql"
39
+ };
40
+
41
+ module.exports.createBtNamingWrapper = createBtNamingWrapper;
24
42
  module.exports.filterSensitiveDataFromObject = filterSensitiveDataFromObject;
25
- module.exports.deepCopy = deepCopy;
43
+ module.exports.deepCopy = deepCopy;
44
+ module.exports.constants = constants;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appdynamics",
3
- "version": "21.6.0",
3
+ "version": "22.2.0",
4
4
  "description": "Performance Profiler and Monitor",
5
5
  "author": "AppDynamics, Inc.",
6
6
  "homepage": "https://www.appdynamics.com",
@@ -25,8 +25,7 @@
25
25
  ],
26
26
  "main": "./index.js",
27
27
  "scripts": {
28
- "preinstall": "node preInstallScript.js",
29
- "postinstall": "node postInstallScript.js"
28
+ "preinstall": "node preInstallScript.js"
30
29
  },
31
30
  "directories": {
32
31
  "lib": "./lib"
@@ -35,19 +34,21 @@
35
34
  "n": "^6.7.0"
36
35
  },
37
36
  "dependencies": {
37
+ "@opentelemetry/api": "^1.0.3",
38
+ "@opentelemetry/exporter-collector": "^0.25.0",
39
+ "@opentelemetry/node": "^0.24.0",
40
+ "@opentelemetry/semantic-conventions": "^1.0.1",
41
+ "@opentelemetry/tracing": "^0.24.0",
38
42
  "cls-hooked": "4.2.2",
39
- "log4js": "0.6.38",
40
43
  "n": "^6.7.0",
41
- "set-immediate": "0.1.1",
42
- "shelljs": "^0.8.4",
43
- "uuid": "3.1.0",
44
- "appdynamics-libagent-napi": "https://cdn.appdynamics.com/packages/nodejs/21.6.0.0/appdynamics-libagent-napi-node.tgz",
45
- "appdynamics-native": "https://cdn.appdynamics.com/packages/nodejs/21.6.0.0/appdynamics-native-node.tgz",
46
- "appdynamics-protobuf": "https://cdn.appdynamics.com/packages/nodejs/21.6.0.0/appdynamics-protobuf-node.tgz",
47
- "appdynamics-zmq": "https://cdn.appdynamics.com/packages/nodejs/21.6.0.0/appdynamics-zmq-node.tgz"
44
+ "shelljs": "^0.8.5",
45
+ "uuid": "^8.3.2",
46
+ "appdynamics-libagent-napi": "https://cdn.appdynamics.com/packages/nodejs/22.2.0.0/appdynamics-libagent-napi-node.tgz",
47
+ "appdynamics-native": "https://cdn.appdynamics.com/packages/nodejs/22.2.0.0/appdynamics-native-node.tgz",
48
+ "appdynamics-protobuf": "https://cdn.appdynamics.com/packages/nodejs/22.2.0.0/appdynamics-protobuf-node.tgz"
48
49
  },
49
50
  "engines": {
50
- "node": ">=0.10.0 <=v16.*"
51
+ "node": ">=12 <=v16.*"
51
52
  },
52
53
  "engine-strict": true
53
54
  }
package/packageBck.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appdynamics",
3
- "version": "21.6.0",
3
+ "version": "22.2.0",
4
4
  "description": "Performance Profiler and Monitor",
5
5
  "author": "AppDynamics, Inc.",
6
6
  "homepage": "https://www.appdynamics.com",
@@ -25,8 +25,7 @@
25
25
  ],
26
26
  "main": "./index.js",
27
27
  "scripts": {
28
- "preinstall": "node preInstallScript.js",
29
- "postinstall": "node postInstallScript.js"
28
+ "preinstall": "node preInstallScript.js"
30
29
  },
31
30
  "directories": {
32
31
  "lib": "./lib"
@@ -35,19 +34,21 @@
35
34
  "n": "^6.7.0"
36
35
  },
37
36
  "dependencies": {
37
+ "@opentelemetry/api": "^1.0.3",
38
+ "@opentelemetry/exporter-collector": "^0.25.0",
39
+ "@opentelemetry/node": "^0.24.0",
40
+ "@opentelemetry/semantic-conventions": "^1.0.1",
41
+ "@opentelemetry/tracing": "^0.24.0",
38
42
  "cls-hooked": "4.2.2",
39
- "log4js": "0.6.38",
40
43
  "n": "^6.7.0",
41
- "set-immediate": "0.1.1",
42
- "shelljs": "^0.8.4",
43
- "uuid": "3.1.0",
44
- "appdynamics-libagent-napi": "https://cdn.appdynamics.com/packages/nodejs/21.6.0.0/appdynamics-libagent-napi-node.tgz",
45
- "appdynamics-native": "https://cdn.appdynamics.com/packages/nodejs/21.6.0.0/appdynamics-native-node.tgz",
46
- "appdynamics-protobuf": "https://cdn.appdynamics.com/packages/nodejs/21.6.0.0/appdynamics-protobuf-node.tgz",
47
- "appdynamics-zmq": "https://cdn.appdynamics.com/packages/nodejs/21.6.0.0/appdynamics-zmq-node.tgz"
44
+ "shelljs": "^0.8.5",
45
+ "uuid": "^8.3.2",
46
+ "appdynamics-libagent-napi": "https://cdn.appdynamics.com/packages/nodejs/22.2.0.0/appdynamics-libagent-napi-node.tgz",
47
+ "appdynamics-native": "https://cdn.appdynamics.com/packages/nodejs/22.2.0.0/appdynamics-native-node.tgz",
48
+ "appdynamics-protobuf": "https://cdn.appdynamics.com/packages/nodejs/22.2.0.0/appdynamics-protobuf-node.tgz"
48
49
  },
49
50
  "engines": {
50
- "node": ">=0.10.0 <=v16.*"
51
+ "node": ">=12 <=v16.*"
51
52
  },
52
53
  "engine-strict": true
53
54
  }