Socket
Socket
Sign inDemoInstall

@pager/metrics-client

Package Overview
Dependencies
9
Maintainers
46
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.1 to 6.0.0

12

CHANGELOG.md

@@ -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 @@

15

lib/index.js

@@ -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"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc