GithubHelp home page GithubHelp logo

express-node-metrics's People

Contributors

idanto avatar meytal127 avatar sanrodari avatar ugolas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

express-node-metrics's Issues

Not working on 6.11.1

getting this error, while installing on v6.11.1

"stack": ["Error: Cannot find module '../build/Release/eventLoopStats'", " at Function.Module._resolveFilename (module.js:469:15)", " at Function.Module._load (module.js:417:25)", " at Module.require (module.js:497:17)", " at require (internal/module.js:20:19)", " at Object.<anonymous> (/opt/socket.io-chat/node_modules/event-loop-stats/src/eventLoopStats.js:1:84)", " at Module._compile (module.js:570:32)", " at Object.Module._extensions..js (module.js:579:10)", " at Module.load (module.js:487:32)", " at tryModuleLoad (module.js:446:12)", " at Function.Module._load (module.js:438:3)", " at Module.require (module.js:497:17)", " at require (internal/module.js:20:19)", " at Object.<anonymous> (/opt/socket.io-chat/node_modules/express-node-metrics/src/metrics.js:5:22)", " at Module._compile (module.js:570:32)", " at Object.Module._extensions..js (module.js:579:10)", " at Module.load (module.js:487:32)"], "level": "error", "message": "uncaughtException: Cannot find module '../build/Release/eventLoopStats'", "timestamp": "2017-09-12T04:57:22.470Z"

on host - Red Hat Enterprise Linux Server release 6.6

resetProcessMetrics leaves orphaned objects behind

Calls to resetMetric() does not clean up any interval objects that are running. This happens with gc.releasedMem and gc.time processes because they use Meter objects which spawn intervals, which are never cleared. The result is a memory leak, new orphaned Timer and Meter objects getting left on the heap with each call to resetProcessMetrics(). To help illustrate, this is a hack I added locally to confirm and it does fix it but not in an elegant way.

if (trackedMetrics[NAMESPACES.process].gc) {
trackedMetrics[NAMESPACES.process].gc.releasedMem._meter.end();
trackedMetrics[NAMESPACES.process].gc.time._meter.end();
}

The package catch the event loop and not let mocha to finish his process. node 8

The package catch the event loop and not let mocha to finish his process when running tests.

example:
test:

'use strict';

const createFlowController = require('./metrics-controller');
describe('Testing create flow controller', function () {

    it('some test',function () {

    })
});

metrics-controller.js:


'use strict';

let express = require("express");
let router = express.Router();
let metrics = require('express-node-metrics').metrics; //TODO

router.get('/', function (req, res) {
    res.json(JSON.parse(metrics.getAll(req.query.reset)));
});

module.exports = router;

Handle unrecognized express route

How to reproduce:
Send request that not match to any route

Result
The package will crush at that line

Expected Solution:
log those cases under unknown route

Add logging

Add logging to the package in TRACE level

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.