@pager/metrics-client
Advanced tools
Comparing version 5.0.1 to 6.0.0
@@ -0,1 +1,13 @@ | ||
# [6.0.0](https://github.com/pagerinc/metrics-client/compare/v5.0.1...v6.0.0) (2023-01-03) | ||
### Features | ||
* remove newrelic metrics ([#318](https://github.com/pagerinc/metrics-client/issues/318)) ([87a9d60](https://github.com/pagerinc/metrics-client/commit/87a9d6039d1113bfeb6ab60545d5bfd78fd2977c)) | ||
### BREAKING CHANGES | ||
* remove newrelic metrics | ||
## [5.0.1](https://github.com/pagerinc/metrics-client/compare/v5.0.0...v5.0.1) (2020-11-06) | ||
@@ -2,0 +14,0 @@ |
@@ -5,3 +5,2 @@ 'use strict'; | ||
const { Registry } = require('prom-client'); | ||
const NativeMetrics = require('@newrelic/native-metrics'); | ||
const Joi = require('joi'); | ||
@@ -17,3 +16,3 @@ const Hoek = require('@hapi/hoek'); | ||
interval: 15 * 1e3, | ||
metrics: ['cpu', 'evloop', 'gc', 'memory', 'request'], | ||
metrics: ['cpu', 'memory', 'request'], | ||
endpoint: { | ||
@@ -47,5 +46,3 @@ path: '/metrics' | ||
cpu: Metrics.CPU, | ||
gc: Metrics.GC, | ||
memory: Metrics.Memory, | ||
evloop: Metrics.EventLoop, | ||
request: Metrics.Request | ||
@@ -59,3 +56,3 @@ } | ||
interval: Joi.number().integer().positive(), | ||
metrics: Joi.array().items(Joi.string().valid('cpu', 'evloop', 'gc', 'memory', 'request')), | ||
metrics: Joi.array().items(Joi.string().valid('cpu', 'memory', 'request')), | ||
endpoint: Joi.object({ | ||
@@ -91,11 +88,4 @@ path: Joi.array().items(Joi.string()).single() | ||
const endpointPaths = validatedSettings.endpoint.path; | ||
const nativeMetrics = new NativeMetrics({ timeout: validatedSettings.interval }); | ||
const registry = new Registry(); | ||
/* $lab:coverage:off$ */ | ||
if (!nativeMetrics.bound) { | ||
nativeMetrics.bind(validatedSettings.interval); | ||
} | ||
/* $lab:coverage:on$ */ | ||
server.expose('registry', registry); | ||
@@ -108,3 +98,2 @@ | ||
interval: validatedSettings.interval, | ||
nativeMetrics, | ||
/* $lab:coverage:off$ */ | ||
@@ -111,0 +100,0 @@ log: (tags, ...msg) => server.log(['metrics', ...tags], ...msg) |
'use strict'; | ||
const Request = require('./request'); | ||
const GC = require('./gc'); | ||
const CPU = require('./cpu'); | ||
const EventLoop = require('./event-loop'); | ||
const Memory = require('./memory'); | ||
@@ -11,6 +9,4 @@ | ||
Request, | ||
GC, | ||
CPU, | ||
EventLoop, | ||
Memory | ||
}; |
{ | ||
"name": "@pager/metrics-client", | ||
"version": "5.0.1", | ||
"description": "Hapi-centric Prometheus Plugin and optional endpoint", | ||
"version": "6.0.0", | ||
"description": "Hapi Prometheus Plugin and optional endpoint", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "lab -La @hapi/code -t 100", | ||
"test": "lab", | ||
"start": "node ./examples/server.js" | ||
@@ -25,3 +25,2 @@ }, | ||
"@hapi/hoek": "^9.1.0", | ||
"@newrelic/native-metrics": "^6.0.0", | ||
"joi": "^17.3.0", | ||
@@ -28,0 +27,0 @@ "prom-client": "12.x" |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3
19938
9
373
- Removed@newrelic/native-metrics@^6.0.0
- Removed@newrelic/native-metrics@6.0.2(transitive)
- Removednan@2.19.0(transitive)
- Removedsemver@5.7.2(transitive)