@instana/shared-metrics 3.1.3 → 3.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.2.0](https://github.com/instana/nodejs/compare/v3.1.3...v3.2.0) (2024-02-27)
7
+
8
+ ### Bug Fixes
9
+
10
+ - depreacted request-promise module ([#1017](https://github.com/instana/nodejs/issues/1017)) ([6bb88dd](https://github.com/instana/nodejs/commit/6bb88dd4ca08d2482ff917fb3b9f884f4e4bdf8e))
11
+
6
12
  ## [3.1.3](https://github.com/instana/nodejs/compare/v3.1.2...v3.1.3) (2024-01-31)
7
13
 
8
14
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instana/shared-metrics",
3
- "version": "3.1.3",
3
+ "version": "3.2.0",
4
4
  "description": "Internal metrics plug-in package for Node.js monitoring with Instana",
5
5
  "author": {
6
6
  "name": "Bastian Krol",
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "scripts": {
28
28
  "audit": "npm audit --omit=dev",
29
- "test": "mocha --config=test/.mocharc.js --require test/hooks.js --sort $(find test -iname '*test.js' -not -path '*node_modules*')",
30
- "test:ci": "echo \"******* Files to be tested:\n $CI_SHARED_METRICS_TEST_FILES\" && if [ -z \"${CI_SHARED_METRICS_TEST_FILES}\" ]; then echo \"No test files have been assigned to this CircleCI executor.\"; else mocha --config=test/.mocharc.js --reporter mocha-multi-reporters --reporter-options configFile=reporter-config.json --require test/hooks.js ${CI_SHARED_METRICS_TEST_FILES}; fi",
29
+ "test": "mocha --config=test/.mocharc.js --require test/hooks.js --sort $(find test -iname '*test.js')",
30
+ "test:ci": "mocha --config=test/.mocharc.js --reporter mocha-multi-reporters --reporter-options configFile=reporter-config.json --require test/hooks.js 'test/**/*test.js'",
31
31
  "test:debug": "WITH_STDOUT=true npm run test",
32
32
  "lint": "eslint src test",
33
33
  "verify": "npm run lint && npm test",
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "license": "MIT",
61
61
  "dependencies": {
62
- "@instana/core": "3.1.3",
62
+ "@instana/core": "3.2.0",
63
63
  "detect-libc": "^2.0.2",
64
64
  "event-loop-lag": "^1.4.0",
65
65
  "recursive-copy": "^2.0.13",
@@ -73,5 +73,5 @@
73
73
  "event-loop-stats": "1.4.1",
74
74
  "gcstats.js": "1.0.0"
75
75
  },
76
- "gitHead": "3623cf92780e867b194f5c698c69df7f057a7af8"
76
+ "gitHead": "4e9af9e088ed97732fc93ac6157cfad90eb96fa2"
77
77
  }
@@ -29,7 +29,13 @@ const MAX_ATTEMPTS = 20;
29
29
  const DELAY = 1000;
30
30
  let attempts = 0;
31
31
 
32
+ exports.deactivate = function deactivate() {
33
+ attempts = 0;
34
+ };
35
+
32
36
  exports.activate = function activate() {
37
+ logger.debug(`activate ${attempts}`);
38
+
33
39
  attempts++;
34
40
  util.applicationUnderMonitoring.getMainPackageJsonPathStartingAtMainModule((err, packageJsonPath) => {
35
41
  if (err) {
@@ -54,6 +60,8 @@ exports.activate = function activate() {
54
60
  * @param {string} packageJsonPath
55
61
  */
56
62
  function addDirectDependenciesFromMainPackageJson(packageJsonPath) {
63
+ logger.debug(`addDirectDependenciesFromMainPackageJson: ${packageJsonPath}`);
64
+
57
65
  const started = Date.now();
58
66
  fs.readFile(packageJsonPath, { encoding: 'utf8' }, (err, contents) => {
59
67
  if (err) {