@instana/shared-metrics 2.23.0 → 2.25.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,25 @@
|
|
|
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.25.0](https://github.com/instana/nodejs/compare/v2.24.0...v2.25.0) (2023-06-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instana/shared-metrics
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [2.24.0](https://github.com/instana/nodejs/compare/v2.23.0...v2.24.0) (2023-06-13)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **collector:** added node:fs, restify and socket.io support (OpenTelemetry integration) ([#715](https://github.com/instana/nodejs/issues/715)) ([60f3bb9](https://github.com/instana/nodejs/commit/60f3bb960f909e0640b372de97c8f6d7c1654038)), closes [#109122](https://github.com/instana/nodejs/issues/109122)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [2.23.0](https://github.com/instana/nodejs/compare/v2.22.1...v2.23.0) (2023-06-06)
|
|
7
26
|
|
|
8
27
|
**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": "2.
|
|
3
|
+
"version": "2.25.0",
|
|
4
4
|
"description": "Internal metrics plug-in package for Node.js monitoring with Instana",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Bastian Krol",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"license": "MIT",
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@instana/core": "2.
|
|
70
|
+
"@instana/core": "2.25.0",
|
|
71
71
|
"detect-libc": "^1.0.3",
|
|
72
72
|
"event-loop-lag": "^1.4.0",
|
|
73
73
|
"recursive-copy": "^2.0.13",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"event-loop-stats": "1.4.1",
|
|
83
83
|
"gcstats.js": "1.0.0"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "a0ca4681e7c3cb948ea2eba0f8e91e537ee03ed4"
|
|
86
86
|
}
|
package/src/dependencies.js
CHANGED
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const path = require('path');
|
|
9
|
-
const fs = require('
|
|
10
|
-
const { applicationUnderMonitoring } = require('@instana/core').util;
|
|
9
|
+
const { util, uninstrumentedFs: fs } = require('@instana/core');
|
|
11
10
|
|
|
12
11
|
let logger = require('@instana/core').logger.getLogger('metrics');
|
|
13
12
|
|
|
@@ -43,7 +42,7 @@ exports.activate = function activate() {
|
|
|
43
42
|
attempts++;
|
|
44
43
|
|
|
45
44
|
const started = Date.now();
|
|
46
|
-
applicationUnderMonitoring.getMainPackageJsonPathStartingAtMainModule((err, mainPackageJsonPath) => {
|
|
45
|
+
util.applicationUnderMonitoring.getMainPackageJsonPathStartingAtMainModule((err, mainPackageJsonPath) => {
|
|
47
46
|
if (err) {
|
|
48
47
|
return logger.warn('Failed to determine main package.json. Reason: %s %s ', err.message, err.stack);
|
|
49
48
|
} else if (!mainPackageJsonPath && attempts < exports.MAX_ATTEMPTS) {
|
|
@@ -54,7 +53,7 @@ exports.activate = function activate() {
|
|
|
54
53
|
logger.info(
|
|
55
54
|
`Main package.json could not be found after ${attempts} retries. Looking for node_modules folder now.`
|
|
56
55
|
);
|
|
57
|
-
applicationUnderMonitoring.findNodeModulesFolder((errNodeModules, nodeModulesFolder) => {
|
|
56
|
+
util.applicationUnderMonitoring.findNodeModulesFolder((errNodeModules, nodeModulesFolder) => {
|
|
58
57
|
if (errNodeModules) {
|
|
59
58
|
return logger.warn('Failed to determine node_modules folder. Reason: %s %s ', err.message, err.stack);
|
|
60
59
|
} else if (!nodeModulesFolder) {
|
|
@@ -69,7 +68,7 @@ exports.activate = function activate() {
|
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
let dependencyDir;
|
|
72
|
-
if (applicationUnderMonitoring.isAppInstalledIntoNodeModules()) {
|
|
71
|
+
if (util.applicationUnderMonitoring.isAppInstalledIntoNodeModules()) {
|
|
73
72
|
dependencyDir = path.join(path.dirname(mainPackageJsonPath), '..', '..', 'node_modules');
|
|
74
73
|
} else {
|
|
75
74
|
dependencyDir = path.join(path.dirname(mainPackageJsonPath), 'node_modules');
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const fs = require('
|
|
9
|
-
|
|
10
|
-
const { applicationUnderMonitoring } = require('@instana/core').util;
|
|
8
|
+
const { util, uninstrumentedFs: fs } = require('@instana/core');
|
|
11
9
|
|
|
12
10
|
let logger = require('@instana/core').logger.getLogger('metrics');
|
|
13
11
|
|
|
@@ -33,7 +31,7 @@ let attempts = 0;
|
|
|
33
31
|
|
|
34
32
|
exports.activate = function activate() {
|
|
35
33
|
attempts++;
|
|
36
|
-
applicationUnderMonitoring.getMainPackageJsonPathStartingAtMainModule((err, packageJsonPath) => {
|
|
34
|
+
util.applicationUnderMonitoring.getMainPackageJsonPathStartingAtMainModule((err, packageJsonPath) => {
|
|
37
35
|
if (err) {
|
|
38
36
|
return logger.info(
|
|
39
37
|
'Failed to determine main package.json for analysis of direct dependencies. Reason: %s %s ',
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const assert = require('assert');
|
|
9
|
-
const fs = require('
|
|
9
|
+
const { logger: Logger, uninstrumentedFs: fs } = require('@instana/core');
|
|
10
10
|
const path = require('path');
|
|
11
11
|
|
|
12
12
|
const CountDownLatch = require('./CountDownLatch');
|
|
13
13
|
|
|
14
|
-
let logger =
|
|
14
|
+
let logger = Logger.getLogger('metrics');
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @param {import('@instana/core/src/logger').GenericLogger} _logger
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const { logger: Logger, uninstrumentedFs: fs } = require('@instana/core');
|
|
9
|
+
let logger = Logger.getLogger('shared-metrics/native-module-retry');
|
|
9
10
|
|
|
10
11
|
const EventEmitter = require('events');
|
|
11
12
|
const copy = require('recursive-copy');
|
|
12
|
-
const fs = require('fs');
|
|
13
13
|
const os = require('os');
|
|
14
14
|
const tar = require('tar');
|
|
15
15
|
const path = require('path');
|