spm-agent-nodejs
Advanced tools
Comparing version 4.2.3 to 4.2.4
@@ -7,2 +7,15 @@ ### Changelog | ||
#### [4.2.4](https://github.com/sematext/spm-agent-nodejs/compare/4.2.3...4.2.4) | ||
> 15 June 2023 | ||
- Fix library vulnerabilities [`#64`](https://github.com/sematext/spm-agent-nodejs/pull/64) | ||
- Bump yaml from 1.10.2 to [`#61`](https://github.com/sematext/spm-agent-nodejs/pull/61) | ||
- Bump vm2 from 3.9.17 to 3.9.19 [`#63`](https://github.com/sematext/spm-agent-nodejs/pull/63) | ||
- Bump vm2 from 3.9.16 to 3.9.17 [`#60`](https://github.com/sematext/spm-agent-nodejs/pull/60) | ||
- Bump vm2 from 3.9.11 to 3.9.16 [`#59`](https://github.com/sematext/spm-agent-nodejs/pull/59) | ||
- Bump http-cache-semantics from 4.1.0 to 4.1.1 [`#58`](https://github.com/sematext/spm-agent-nodejs/pull/58) | ||
- chore: upgrade the libraries with vulnerabilities [`332bd95`](https://github.com/sematext/spm-agent-nodejs/commit/332bd95b95023f605c0a91c6708afe77786a0422) | ||
- chore: remove the test of already deleted process [`9fdfbd1`](https://github.com/sematext/spm-agent-nodejs/commit/9fdfbd13c536ed4d7a091619eb8aec9894c4b12c) | ||
#### [4.2.3](https://github.com/sematext/spm-agent-nodejs/compare/4.2.2...4.2.3) | ||
@@ -15,2 +28,3 @@ | ||
- Update mocha to version 10.2.0 and switch gc-stats to Sematext fork [`3df9823`](https://github.com/sematext/spm-agent-nodejs/commit/3df982359dd1dd674127711fc7b4d3d43b47e76c) | ||
- Release 4.2.3 [`d8d2dbe`](https://github.com/sematext/spm-agent-nodejs/commit/d8d2dbed912e3775f43d3e3aa90b6742b8e65d7d) | ||
@@ -17,0 +31,0 @@ #### [4.2.2](https://github.com/sematext/spm-agent-nodejs/compare/4.2.1...4.2.2) |
{ | ||
"name": "spm-agent-nodejs", | ||
"version": "4.2.3", | ||
"version": "4.2.4", | ||
"description": "Node.js monitoring agent for SPM by Sematext", | ||
@@ -53,4 +53,3 @@ "main": "lib/index.js", | ||
"measured-core": "^1.51.1", | ||
"request": "^2.88.0", | ||
"spm-agent": "^2.2.1" | ||
"spm-agent": "^2.2.2" | ||
}, | ||
@@ -65,4 +64,5 @@ "optionalDependencies": { | ||
"mocha": "^10.2.0", | ||
"release-it": "^15.1.1", | ||
"standard": "^14.3.1" | ||
"release-it": "^15.10.1", | ||
"standard": "^14.3.1", | ||
"request": "^2.88.0" | ||
}, | ||
@@ -69,0 +69,0 @@ "release-it": { |
@@ -13,3 +13,3 @@ /* | ||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' | ||
// make sure config has a infra token before spm-agent is laoded first time | ||
// make sure config has an infra token before spm-agent is laoded first time | ||
if (!process.env.INFRA_TOKEN) { | ||
@@ -56,3 +56,3 @@ process.env.INFRA_TOKEN = 'INFRA_TOKEN' | ||
setTimeout(function () { | ||
var request = require('request') | ||
const request = require('request') | ||
request.get('http://127.0.0.1:' + (port) + '/', function (err) { | ||
@@ -154,45 +154,2 @@ if (err) { | ||
}) | ||
it('Wait for metrics: Process Agent', function (done) { | ||
this.timeout(30000) | ||
config.maxDataPoints = 1 | ||
config.logger.console = false | ||
config.logger.level = 'debug' | ||
let metricCounter = 0 | ||
let errorReported = false | ||
const ProcessAgent = require('../lib/processAgent.js') | ||
const agent = new ProcessAgent() | ||
agent.start() | ||
function checkMetrics (metric) { | ||
if (errorReported) { | ||
return | ||
} | ||
if (metric.measurement && metric.measurement.indexOf('process') > -1 && | ||
metric.fields.uptime && | ||
metric.fields.rss && | ||
metric.fields['cpu.usage'] && | ||
metric.fields['thread.count']) { | ||
if (metric.tags.token !== config.tokens.infra) { | ||
done(new Error(`No infra token set ${metric.tags.token} != ${config.tokens.infra}`)) | ||
errorReported = true | ||
} | ||
metricCounter = metricCounter + 1 | ||
} | ||
if (metric.measurement && metric.measurement.indexOf('process') > -1 && metric.fields.count) { | ||
if (metric.tags.token !== config.tokens.infra) { | ||
done(new Error(`No infra token set ${metric.tags.token} != ${config.tokens.infra}`)) | ||
errorReported = true | ||
} | ||
metricCounter = metricCounter + 1 | ||
} | ||
if (metricCounter > 2) { | ||
agent.removeListener('metric', checkMetrics) | ||
agent.stop() | ||
done() | ||
} | ||
} | ||
agent.on('metric', checkMetrics) | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5
66848
6
21
883
- Removedrequest@^2.88.0
Updatedspm-agent@^2.2.2