@instana/shared-metrics 4.7.0 → 4.9.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 +12 -0
- package/package.json +3 -3
- package/src/gc.js +10 -6
- package/src/libuv.js +4 -4
- package/src/util/nativeModuleRetry.js +11 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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
|
+
# [4.9.0](https://github.com/instana/nodejs/compare/v4.8.0...v4.9.0) (2025-03-20)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- improved log for precompiled binary loading failure ([#1642](https://github.com/instana/nodejs/issues/1642)) ([f0c38d5](https://github.com/instana/nodejs/commit/f0c38d539be65c3e90fb2ecd05d5f46d982a5337))
|
|
11
|
+
|
|
12
|
+
# [4.8.0](https://github.com/instana/nodejs/compare/v4.7.0...v4.8.0) (2025-03-19)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- resolved TypeError gcStats.on is not a function ([#1633](https://github.com/instana/nodejs/issues/1633)) ([2bfcd92](https://github.com/instana/nodejs/commit/2bfcd92f4bc57b7fb163283d6f2792c06816389b))
|
|
17
|
+
|
|
6
18
|
# [4.7.0](https://github.com/instana/nodejs/compare/v4.6.3...v4.7.0) (2025-03-11)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @instana/shared-metrics
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instana/shared-metrics",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.9.0",
|
|
4
4
|
"description": "Internal metrics plug-in package for Node.js monitoring with Instana",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Bastian Krol",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"license": "MIT",
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@instana/core": "4.
|
|
62
|
+
"@instana/core": "4.9.0",
|
|
63
63
|
"detect-libc": "^2.0.2",
|
|
64
64
|
"event-loop-lag": "^1.4.0",
|
|
65
65
|
"semver": "^7.5.4",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"event-loop-stats": "1.4.1",
|
|
75
75
|
"gcstats.js": "1.0.0"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "19d1f6ff80895afb493f3cfa4c965efd11ee3e01"
|
|
78
78
|
}
|
package/src/gc.js
CHANGED
|
@@ -46,17 +46,19 @@ exports.init = function init() {
|
|
|
46
46
|
nativeModuleName: 'gcstats.js',
|
|
47
47
|
moduleRoot: path.join(__dirname, '..'),
|
|
48
48
|
message:
|
|
49
|
-
'Could not load gcstats.js.
|
|
50
|
-
'
|
|
51
|
-
|
|
52
|
-
'
|
|
49
|
+
'Could not load gcstats.js. Garbage collection information will not be available for this ' +
|
|
50
|
+
'application. ' +
|
|
51
|
+
"However, general tracing functionality remains unaffected. Enable debug logs with 'INSTANA_DEBUG=true' " +
|
|
52
|
+
'for more details about the error. For more information on native add-ons, visit: ' +
|
|
53
53
|
'https://www.ibm.com/docs/en/instana-observability/current?topic=nodejs-collector-installation#native-add-ons'
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
nativeModuleLoader.once('loaded', gcStats_ => {
|
|
57
57
|
gcStats = gcStats_;
|
|
58
58
|
exports.currentPayload.statsSupported = true;
|
|
59
|
-
|
|
59
|
+
// CASE: If the environment does not support native addons, `gc-stats` may fail to initialize properly,
|
|
60
|
+
// and `on` could be undefined.
|
|
61
|
+
if (activateHasBeenCalled && gcStats && typeof gcStats.on === 'function') {
|
|
60
62
|
actuallyActivate();
|
|
61
63
|
}
|
|
62
64
|
});
|
|
@@ -68,7 +70,9 @@ exports.init = function init() {
|
|
|
68
70
|
|
|
69
71
|
exports.activate = function activate() {
|
|
70
72
|
activateHasBeenCalled = true;
|
|
71
|
-
|
|
73
|
+
// CASE: If the environment does not support native addons, `gc-stats` may fail to initialize properly,
|
|
74
|
+
// and `on` could be undefined.
|
|
75
|
+
if (gcStats && typeof gcStats.on === 'function') {
|
|
72
76
|
actuallyActivate();
|
|
73
77
|
}
|
|
74
78
|
};
|
package/src/libuv.js
CHANGED
|
@@ -19,10 +19,10 @@ exports.init = function init() {
|
|
|
19
19
|
nativeModuleName: 'event-loop-stats',
|
|
20
20
|
moduleRoot: path.join(__dirname, '..'),
|
|
21
21
|
message:
|
|
22
|
-
'Could not load event-loop-stats.
|
|
23
|
-
'application.
|
|
24
|
-
|
|
25
|
-
'
|
|
22
|
+
'Could not load event-loop-stats. Event loop information will not be available for this ' +
|
|
23
|
+
'application. ' +
|
|
24
|
+
"However, general tracing functionality remains unaffected. Enable debug logs with 'INSTANA_DEBUG=true' " +
|
|
25
|
+
'for more details about the error. For more information on native add-ons, visit: ' +
|
|
26
26
|
'https://www.ibm.com/docs/en/instana-observability/current?topic=nodejs-collector-installation#native-add-ons'
|
|
27
27
|
});
|
|
28
28
|
|
|
@@ -219,9 +219,17 @@ function copyPrecompiled(opts, loaderEmitter, callback) {
|
|
|
219
219
|
callback(true);
|
|
220
220
|
})
|
|
221
221
|
.catch(error => {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
222
|
+
// The log triggered when the Instana Node.js collector fails to load a precompiled native module.
|
|
223
|
+
// The collector first attempts to load the module directly; if that fails, it extracts a precompiled
|
|
224
|
+
// version from the instrumentation image, which is currently compiled only for Node.js v21.
|
|
225
|
+
// If the application runs a different Node.js version and the filesystem is read-only, extraction may fail,
|
|
226
|
+
// preventing collection of certain telemetry data (garbage collection and event loop stats).
|
|
227
|
+
// TODO: Fix the issue tracked under INSTA-6673. Ensure prebuilt binaries are available for the
|
|
228
|
+
// corresponding Node.js version.
|
|
229
|
+
logger.debug(
|
|
230
|
+
`Failed to load precompiled build for ${opts.nativeModuleName} ${label}. ` +
|
|
231
|
+
'Precompiled binary extraction has failed, possibly due to a read-only filesystem or an unknown' +
|
|
232
|
+
`system operation error for the Node.js ${process.version}. ${error?.message} ${error?.stack}`
|
|
225
233
|
);
|
|
226
234
|
callback(false);
|
|
227
235
|
});
|