@instana/shared-metrics 1.140.0 → 2.0.0-rc.1
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 +30 -0
- package/package.json +7 -8
- package/src/util/nativeModuleRetry.js +3 -16
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
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
|
+
# [2.0.0-rc.1](https://github.com/instana/nodejs/compare/v1.140.1...v2.0.0-rc.1) (2022-04-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* remove npm package instana-nodejs-sensor ([3bbf9cd](https://github.com/instana/nodejs/commit/3bbf9cdb6b1238e314f590601360460fd8101e55))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* Starting with version 2.0.0, consumers of the package who
|
|
17
|
+
still use the deprecated package name instana-nodejs-sensor will need to follow
|
|
18
|
+
https://www.ibm.com/docs/en/obi/current?topic=nodejs-collector-installation#change-of-package-name
|
|
19
|
+
to receive updates in the future.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [1.140.1](https://github.com/instana/nodejs/compare/v1.140.0...v1.140.1) (2022-04-04)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **metrics:** do not report metrics from worker threads ([#517](https://github.com/instana/nodejs/issues/517)) ([bdf7869](https://github.com/instana/nodejs/commit/bdf7869e08d039e5769131d958e1037dc1748cd1)), closes [#500](https://github.com/instana/nodejs/issues/500)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
# [1.140.0](https://github.com/instana/nodejs/compare/v1.138.0...v1.140.0) (2022-03-24)
|
|
7
37
|
|
|
8
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instana/shared-metrics",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-rc.1",
|
|
4
4
|
"description": "Internal metrics plug-in package for Node.js monitoring with Instana",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Bastian Krol",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"audit": "bin/prepare-audit.sh && npm audit --production; AUDIT_RESULT=$?; git checkout package-lock.json; exit $AUDIT_RESULT",
|
|
29
|
-
"test": "
|
|
30
|
-
"test:
|
|
31
|
-
"test:debug": "WITH_STDOUT=true npm run test
|
|
29
|
+
"test": "mocha --sort test/globalHooks_test.js $(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 Files to test in this node\"; else mocha --reporter mocha-multi-reporters --reporter-options configFile=reporter-config.json --sort test/globalHooks_test.js ${CI_SHARED_METRICS_TEST_FILES}; fi",
|
|
31
|
+
"test:debug": "WITH_STDOUT=true npm run test",
|
|
32
32
|
"lint": "eslint src test",
|
|
33
33
|
"verify": "npm run lint && npm test",
|
|
34
34
|
"prettier": "prettier --write 'src/**/*.js' 'test/**/*.js'"
|
|
@@ -38,8 +38,7 @@
|
|
|
38
38
|
"memory",
|
|
39
39
|
"metrics",
|
|
40
40
|
"monitoring",
|
|
41
|
-
"performance"
|
|
42
|
-
"sensor"
|
|
41
|
+
"performance"
|
|
43
42
|
],
|
|
44
43
|
"contributors": [
|
|
45
44
|
{
|
|
@@ -68,7 +67,7 @@
|
|
|
68
67
|
},
|
|
69
68
|
"license": "MIT",
|
|
70
69
|
"dependencies": {
|
|
71
|
-
"@instana/core": "
|
|
70
|
+
"@instana/core": "2.0.0-rc.1",
|
|
72
71
|
"detect-libc": "^1.0.3",
|
|
73
72
|
"event-loop-lag": "^1.4.0",
|
|
74
73
|
"recursive-copy": "^2.0.13",
|
|
@@ -83,5 +82,5 @@
|
|
|
83
82
|
"event-loop-stats": "1.4.1",
|
|
84
83
|
"gcstats.js": "1.0.0"
|
|
85
84
|
},
|
|
86
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "bf069e63f0d8a5600b575bf1aa85ba72c8b53370"
|
|
87
86
|
}
|
|
@@ -11,7 +11,7 @@ const EventEmitter = require('events');
|
|
|
11
11
|
const copy = require('recursive-copy');
|
|
12
12
|
const fs = require('fs');
|
|
13
13
|
const os = require('os');
|
|
14
|
-
const
|
|
14
|
+
const tar = require('tar');
|
|
15
15
|
const path = require('path');
|
|
16
16
|
const detectLibc = require('detect-libc');
|
|
17
17
|
|
|
@@ -61,7 +61,8 @@ function loadNativeAddOnInternal(opts, loaderEmitter) {
|
|
|
61
61
|
try {
|
|
62
62
|
const { isMainThread } = require('worker_threads');
|
|
63
63
|
if (!isMainThread) {
|
|
64
|
-
|
|
64
|
+
// Fail silently, we currently do not want to send any metrics from a worker thread.
|
|
65
|
+
// (But see https://instana.kanbanize.com/ctrl_board/56/cards/48699/details/)
|
|
65
66
|
loaderEmitter.emit('failed');
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
@@ -171,20 +172,6 @@ function copyPrecompiled(opts, loaderEmitter, callback) {
|
|
|
171
172
|
|
|
172
173
|
logger.info(`Found a precompiled version for ${opts.nativeModuleName} ${label}, unpacking.`);
|
|
173
174
|
|
|
174
|
-
/**
|
|
175
|
-
* tar@6 has dropped support for Node < 10
|
|
176
|
-
* It might work to require tar@6 or to execute commands with tar@6 and Node < 10,
|
|
177
|
-
* but we don't want to risk that a customers application fails - especially if tar@6 adds
|
|
178
|
-
* breaking changes. We decided to disallow this feature.
|
|
179
|
-
*/
|
|
180
|
-
if (semver.lt(process.version, '10.0.0')) {
|
|
181
|
-
logger.info(`Skipped copying precompiled version for ${opts.nativeModuleName} ${label} with Node < 10.`);
|
|
182
|
-
callback(false);
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
const tar = require('tar');
|
|
187
|
-
|
|
188
175
|
tar
|
|
189
176
|
.x({
|
|
190
177
|
cwd: os.tmpdir(),
|