API Observability. Trace API calls and Monitor API performance, health and usage statistics in Node.js Microservices.

Overview

swagger-stats

swagger-stats | API Observability

https://swaggerstats.io | Guide

Build Status Coverage Status npm version npm downloads Gitter

Trace API calls and Monitor API performance, health and usage statistics in Node.js Microservices

Express, Fastify, Koa, Hapi, Restify

swagger-stats traces REST API requests and responses in Node.js Microservices, and collects statistics per API Operation. swagger-stats detects API operations based on express routes. You may also provide Swagger (Open API) specification, and swagger-stats will match API requests with API Operations defined in swagger specification.

swagger-stats exposes statistics and metrics per API Operation, such as GET /myapi/:parameter, or GET /pet/{petId}

Built-In API Telemetry

swagger-stats provides built-in Telemetry UX, so you may enable swagger-stats in your app, and start monitoring immediately, with no infrastructure requirements. Navigate to http://<your app host:port>/swagger-stats/

swagger-stats Built-In Telemetry

API Analytics with Elasticsearch and Kibana

swagger-stats stores details about each request/response in Elasticsearch, so you may use Kibana to perform detailed analysis of API usage over time, build visualizations and dashboards

swagger-stats Kibana Dashboard

See dashboards/elastic6 for swagger-stats Kibana visualizations and dashboards

Monitoring and Alerting with Prometheus and Grafana

swagger-stats exposes metrics in Prometheus format, so you may use Prometheus and Grafana to setup API monitoring and alerting

swagger-stats Prometheus Dashboard

See dashboards/prometheus for swagger-stats Grafana dashboards

With statistics and metrics exposed by swagger-stats you may spot problematic API endpoints, see where most of errors happens, catch long-running requests, analyze details of last errors, observe trends, setup alerting.

swagger-stats provides:

  • Metrics in Prometheus format, so you may use Prometheus and Grafana to setup API monitoring and alerting
  • Storing details about each API Request/Response in Elasticsearch, so you may use Kibana to perform analysis of API usage over time, build visualizations and dashboards
  • Built-in API Telemetry UI, so you may enable swagger-stats in your app, and start monitoring right away, with no additional tools required
  • Exposing collected statistics via API, including:
  • Counts of requests and responses(total and by response class), processing time (total/avg/max), content length(total/avg/max) for requests and responses, rates for requests and errors. This is baseline set of stats.
  • Statistics by Request Method: baseline stats collected for each request method
  • Timeline: baseline stats collected for each 1 minute interval during last 60 minutes. Timeline helps you to analyze trends.
  • Errors: count of responses per each error code, top "not found" resources, top "server error" resources
  • Last errors: request and response details for the last 100 errors (last 100 error responses)
  • Longest requests: request and response details for top 100 requests that took longest time to process (time to send response)
  • Tracing: Request and Response details - method, URLs, parameters, request and response headers, addresses, start/stop times and processing duration, matched API Operation info
  • API Statistics: baseline stats and parameter stats per each API Operation. API operation detected based on express routes, and based on Swagger (Open API) specification
  • CPU and Memory Usage of Node process

How to Use

Install

npm install swagger-stats --save

If you haven't added prom-client already, you should do this now. It's a peer dependency of swagger-stats as of version 0.95.19.

npm install prom-client@12 --save

Enable swagger-stats middleware in your app

Express

const swStats = require('swagger-stats');
const apiSpec = require('swagger.json');
app.use(swStats.getMiddleware({swaggerSpec:apiSpec}));

Fastify

const swStats = require('swagger-stats');
const apiSpec = require('swagger.json');

const fastify = require('fastify')({
    logger: true
});

// Enable swagger-stats
fastify.register(require('fastify-express')).then(()=>{
    fastify.register(swStats.getFastifyPlugin, {swaggerSpec:apiSpec});
});

Koa

express-to-koa can be used which is just a simple Promise wrapper.

const swStats = require('swagger-stats');
const apiSpec = require('swagger.json');
const e2k = require('express-to-koa');
app.use(e2k(swStats.getMiddleware({ swaggerSpec:apiSpec })));

Hapi

const swStats = require('swagger-stats');
const swaggerSpec = require('./petstore.json');

const init = async () => {

    server = Hapi.server({
        port: 3040,
        host: 'localhost'
    });

    await server.register({
        plugin: swStats.getHapiPlugin,
        options: {
             swaggerSpec:swaggerSpec
        }
    });

    await server.start();
    console.log('Server running on %s', server.info.uri);
};

Restify

const restify = require('restify');
const swStats = require('swagger-stats');
const apiSpec = require('swagger.json');

const server = restify.createServer();

server.pre(swStats.getMiddleware({
    swaggerSpec:apiSpec,
}));

See /examples for sample apps

Get Statistics with API

$ curl http://<your app host:port>/swagger-stats/stats
{
  "startts": 1501647865959,
  "all": {
    "requests": 7,
    "responses": 7,
    "errors": 3,
    "info": 0,
    "success": 3,
    "redirect": 1,
    "client_error": 2,
    "server_error": 1,
    "total_time": 510,
    "max_time": 502,
    "avg_time": 72.85714285714286,
    "total_req_clength": 0,
    "max_req_clength": 0,
    "avg_req_clength": 0,
    "total_res_clength": 692,
    "max_res_clength": 510,
    "avg_res_clength": 98,
    "req_rate": 1.0734549915657108,
    "err_rate": 0.4600521392424475
  },
  "sys": {
    "rss": 59768832,
    "heapTotal": 36700160,
    "heapUsed": 20081776,
    "external": 5291923,
    "cpu": 0
  },
  "name": "swagger-stats-testapp",
  "version": "0.90.1",
  "hostname": "hostname",
  "ip": "127.0.0.1"
}

Take a look at Documentation for more details on API and returned statistics.

Get Prometheus Metrics

$ curl http://<your app host:port>/swagger-stats/metrics
# HELP api_all_request_total The total number of all API requests received
# TYPE api_all_request_total counter
api_all_request_total 88715
# HELP api_all_success_total The total number of all API requests with success response
# TYPE api_all_success_total counter
api_all_success_total 49051
# HELP api_all_errors_total The total number of all API requests with error response
# TYPE api_all_errors_total counter
api_all_errors_total 32152
# HELP api_all_client_error_total The total number of all API requests with client error response
# TYPE api_all_client_error_total counter
api_all_client_error_total 22986

. . . . . . . . . .  

Default Metrics

To collect prom-client default metrics:

const swaggerStats = require('swagger-stats');
const promClient = require('prom-client');

promClient.collectDefaultMetrics();

Some Node.js specific metrics are included, such as event loop lag:

# HELP nodejs_eventloop_lag_seconds Lag of event loop in seconds.
# TYPE nodejs_eventloop_lag_seconds gauge
nodejs_eventloop_lag_seconds 0.000193641 1597303877464

. . . . . . . . . .  

Updates

See Changelog

Enhancements and Bug Reports

If you find a bug, or have an enhancement in mind please post issues on GitHub.

License

MIT

Comments
  • nodejs cluster mode

    nodejs cluster mode

    If my app is running in cluster mode (via cluster module or PM2), every time I call the /metrics endpoint I'll get data from a different process, without the possibility to have the "general picture". Am I missing something?

    Thanks

    enhancement 
    opened by virgafox 13
  • API Responses page in built-in Telemetry UI is not responding with ~1000 endpoints

    API Responses page in built-in Telemetry UI is not responding with ~1000 endpoints

    My web application has around ~80~ 1000 endpoints, so the API Responses page is unresponsive because of too many charts, making the page unusable.

    What would be the best way to address this issue in Swagger Stats UI. Something that comes in my mind:

    • Pagination for API Responses charts
    • Virtualization, virtual scroll
    • Divide into multiple routes/pages for each endpoint, just like API Operations

    I would like to discuss if we want to fix this. I am able to contribute to fixing this with a PR, once we agreed on the solution.

    bug 
    opened by hieuxlu 11
  • Missing requests in metrics

    Missing requests in metrics

    We recently noticed that swagger-stats appears to be missing some requests in the exposed swagger-stats/metrics route. The application in question is using Open API using express-openapi. We also have metrics for the HA proxies fronting the application as well as a bunyan middleware logging all requests within the same application that happens to also report request-finish events along with a status code.

    Looking at the latest metrics, we see a little over 1.7M 200s and 100K 401s being reported by HA proxy, whereas swagger-stats is reporting a little less than 700K 200s and only 282 401s. The logs being written to by the bunyan middleware match what HA proxy is reporting.

    We are looking specifically at the api_request_total metrics.

    Our package versions are:

    {
      "bunyan": "^1.8.12",
      "bunyan-middleware": "^1.0.0",
      "express": "^4.17.1",
      "express-async-handler": "^1.1.4",
      "express-openapi": "^6.0.0",
      "swagger-stats": "^0.95.17",
    }
    

    We are configuring the swagger-stats middleware as follows:

    app.use(
      swStats.getMiddleware({
        swaggerSpec: apiDoc,
        swaggerOnly: true,
        authentication: true,
        onAuthenticate: (req, username, password) => {
            // check auth for metrics
        })
      })
    );
    

    In case that helps here is how we are configuring the bunyan middleware:

    app.use(
      bunyanMiddleware({
        obscureHeaders: [],
        logger,
        requestStart: true,
      })
    );
    

    We are using version 12.16.2 of Node.js.

    The application where swagger-stats is installed has been running for 10 days straight without a restart so we don't believe this is due to stats being reset due to a restart.

    The issue is also not that some routes are not in the swagger definition and therefore not being kept track of as we do see some metrics for all routes, just nowhere near as many as we would expect to see.

    The swagger-stats/metrics route is being scrapped by Prometheus against the application directly as opposed to going through HA Proxy so we also do not believe that is to blame for the discrepancies, nor would that explain the difference in 401s we are seeing.

    We are at a loss as to why swagger-stats appears to be missing so many requests.

    Any help tracking this down would be appreciated.

    bug question 
    opened by samuelg 6
  • Error: Cannot find module 'swagger.json'

    Error: Cannot find module 'swagger.json'

    In the root directory of my nodejs application, I installed swagger-stats using

    npm install swagger-stats --save Then, in my app.js file, I required the following 3 lines: var swStats = require('swagger-stats'); var apiSpec = require('swagger.json'); app.use(swStats.getMiddleware({swaggerSpec:apiSpec}));

    But I get this error:

    `internal/modules/cjs/loader.js:582 throw err; ^

    Error: Cannot find module 'swagger.json' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15) at Function.Module._load (internal/modules/cjs/loader.js:506:25) at Module.require (internal/modules/cjs/loader.js:636:17) at require (internal/modules/cjs/helpers.js:20:18) at Object. (/home/p11p3/Desktop/mydir/app.js:9:15) at Module._compile (internal/modules/cjs/loader.js:688:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10) at Module.load (internal/modules/cjs/loader.js:598:32) at tryModuleLoad (internal/modules/cjs/loader.js:537:12) at Function.Module._load (internal/modules/cjs/loader.js:529:3) `

    I'm using node version v10.12.0

    Please tell me what needs to be done.

    question 
    opened by mubariskhan96 6
  • Prevent tracking of specific routes

    Prevent tracking of specific routes

    Hello!

    If I create a swagger doc to track specific URL, let's give an example I want to track

    /iwanttotrack/certainIssue

    But this URL falls under a routing system that does

    /iwanttotrack/:issue

    As of now, swagger-stats tracks both. Is there a way that I can prevent the tracking of the latter route and only track the specific URL that I want it to track?

    Thanks!

    enhancement 
    opened by jimmyjiji 6
  • Can't start on node v7.10.1, Mac Os 10.12.6

    Can't start on node v7.10.1, Mac Os 10.12.6

    Hi,

    i'm trying to install swagger stats but i get this error when i start the app:

    /src/node_modules/prom-client/lib/gauge.js:219
                            throw new TypeError(Value is not a valid number: ${util.format(value)});
                            ^
    
    TypeError: Value is not a valid number: undefined
        at /src/node_modules/prom-client/lib/gauge.js:219:10
        at Gauge.set (/src/node_modules/prom-client/lib/gauge.js:85:31)
        at swsCoreStats.calculateSystemStats (/src/node_modules/swagger-stats/lib/swsCoreStats.js:151:65)
        at swsCoreStats.tick (/src/node_modules/swagger-stats/lib/swsCoreStats.js:121:10)
        at Timeout.swsProcessor.tick (/src/node_modules/swagger-stats/lib/swsProcessor.js:137:20)
        at Timeout.ontimeout [as _repeat] (timers.js:400:34)
        at Timeout.wrapper [as _onTimeout] (timers.js:425:11)
        at tryOnTimeout (timers.js:232:11)
        at Timer.listOnTimeout (timers.js:202:5)
    

    This is the line #151 of swsCoreStats.js: this.promClientMetrics.nodejs_process_memory_external_bytes.set(this.sys.external);

    This is this.sys content:

      rss: 95752192,
      heapTotal: 75632640,
      heapUsed: 46559352,
      external: undefined,
      cpu: 26.9837199868224
    

    And this is the result of process.memoryUsage():

    { rss: 95752192, heapTotal: 75632640, heapUsed: 46559352 }
    

    The external property is missing.

    bug 
    opened by anija 6
  • Endpoint not found

    Endpoint not found

    I'm adding swagger-stats as a middleware in Fastify. So I guess this whole thing is tricky.

    Reproducing the Fastify example in docs didn't work at all as it messed with other Fastify plugins (mongo and others).

    But anyway, I tried the encapsulation and it didn't show any errors, so I think the Fastify part of this is fine,

    const swagger = require('./config/options/swagger')
    fastify.register(require('fastify-swagger'), swagger.options)
    fastify.register(setSwaggerStats)
    

    with

    const swStats = require('swagger-stats')
    const apiSpec = require('./swagger.json')
    async function setSwaggerStats(fastify, opts) {
        await fastify.register(require('middie')) // or fastify-express is the same
        fastify.register(swStats.getFastifyPlugin, { swaggerSpec: apiSpec });
    }
    

    I also installed prom-client although I will be happy with the native dashboard.

    http://localhost:3000/swagger-stats/ http://localhost:3000/swagger-stats/ui didn't show up (404)

    It would be nice to provide {debug: true} option with some errors logged if this is feasible.

    Thanks a lot !!!

    opened by bacloud23 5
  • Usage with Nest.js

    Usage with Nest.js

    Maybe it will be good to add docs, how to use swagger-stats with Nest.js? It has specific library-plugin for this - https://docs.nestjs.com/recipes/swagger .

      const document = SwaggerModule.createDocument(app, options);
    

    document here is JS object - swagger 2.0 .

    enhancement doc 
    opened by MaxVynohradov 5
  • Support Koa framework

    Support Koa framework

    app.js: const app = require('koa')(); const api = require('koa-router')(); var swStats = require('swagger-stats'); app.use(swStats.getMiddleware({}));

    log: AssertionError: app.use() requires a generator function

    enhancement 
    opened by inxming 5
  • Save data to db? multi-node support?

    Save data to db? multi-node support?

    So far I'm very impressed, thanks for all the hard work!

    Correct me if I'm wrong, but I see 2 big issues with the project at the moment:

    1. Functionality is limited to 1 instance, there is no aggregated data. In modern applications 1 node is usually not enough.

    2. Data is saved in memory and therefore gets deleted upon application restart, saving data in a database (PostgreSQL; MySQL) will increase the usability of the product by a lot and will also allow issue no. 1 to be solved more easily.

    Are these things being considered?

    enhancement question 
    opened by OfekA 5
  • UnhandledPromiseRejectionWarning when accessing /metrics

    UnhandledPromiseRejectionWarning when accessing /metrics

    After running npm update and thus upgrading swagger-stats to the latest release I now get the following error when accessing /metrics. It seems to me like a dependency issue on your end, but according to Stackoverflow replacing .end with .send might already solve this issue. Reverting back to 0.95.18 did not solve the issue.

    UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer. Received an instance of Promise
        at ServerResponse.end (_http_outgoing.js:759:13)
        at /usr/src/app/node_modules/swagger-stats/lib/swsInterface.js:212:13
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
    

    Running /metrics results in a timeout which breaks prometheus/grafana integrations.

    opened by spijs 4
  • Bump fastify from 4.10.2 to 4.11.0

    Bump fastify from 4.10.2 to 4.11.0

    Bumps fastify from 4.10.2 to 4.11.0.

    Release notes

    Sourced from fastify's releases.

    v4.11.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/fastify/fastify/compare/v4.10.2...v4.11.0

    Commits
    • 1b2b383 Bumped v4.11.0
    • 0557c0a improve setErrorHandler example (#4484)
    • 0d7264c build(deps): bump xt0rted/markdownlint-problem-matcher (#4490)
    • 6b65f20 build(deps): bump thollander/actions-comment-pull-request from 1 to 2 (#4489)
    • 10fd294 fix: re-thrown error crash with async handler and sync custom error handler (...
    • 003eae6 docs(reference/reply): When using async-await, need return (#4429)
    • fc81c70 lib: deprecate fastify default route
    • dbef642 doc: improve setDefaultRoute documentation
    • 897360a perf: only check for isEssence once in RegExp for content-type-parser (#4481)
    • 4bde0e0 docs(ecosystem): add fastify-at-postgres plugin (#4475)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump prom-client from 14.1.0 to 14.1.1

    Bump prom-client from 14.1.0 to 14.1.1

    Bumps prom-client from 14.1.0 to 14.1.1.

    Release notes

    Sourced from prom-client's releases.

    v14.1.1

    What's Changed

    New Contributors

    Full Changelog: https://github.com/siimon/prom-client/compare/v14.1.0...v14.1.1

    Changelog

    Sourced from prom-client's changelog.

    [14.1.1] - 2022-12-31

    Changed

    • Increase compatibility with external build system such as rollup by making perf_hooks optional in gc.js
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump supertest from 6.3.2 to 6.3.3

    Bump supertest from 6.3.2 to 6.3.3

    Bumps supertest from 6.3.2 to 6.3.3.

    Release notes

    Sourced from supertest's releases.

    v6.3.3

    • chore: bump deps 2910f73

    https://github.com/visionmedia/supertest/compare/v6.3.2...v6.3.3

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump mocha from 10.1.0 to 10.2.0

    Bump mocha from 10.1.0 to 10.2.0

    Bumps mocha from 10.1.0 to 10.2.0.

    Release notes

    Sourced from mocha's releases.

    v10.2.0

    10.2.0 / 2022-12-11

    :tada: Enhancements

    • #4945: API: add possibility to decorate ESM name before import (@​j0tunn)

    :bug: Fixes

    :book: Documentation

    Changelog

    Sourced from mocha's changelog.

    10.2.0 / 2022-12-11

    :tada: Enhancements

    • #4945: API: add possibility to decorate ESM name before import (@​j0tunn)

    :bug: Fixes

    :book: Documentation

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • How to add `swagger-stats` routes on swagger description

    How to add `swagger-stats` routes on swagger description

    I use swagger-jsdoc to document routes on my app. Those defined by me are standalone and easy to define. However, swagger-stats makes it challenging for me to provide a description for routes info, health, and metrics on route /swagger. How can I do it in a neat way?

    question 
    opened by brunolnetto 0
  • Error too many open files, uv_resident_set_memory

    Error too many open files, uv_resident_set_memory

    I use swagger-stats in WSL2, when call constructor there is an error Error: EMFILE: too many open files, uv_resident_set_memory at process.memoryUsage (internal/process/per_thread.js:153:5) at SwsSysStats.calculateSystemStats (/home/tuan1998/aura-sync/crawl-system/node_modules/swagger-stats/lib/swssysstats.js:83:32) at SwsSysStats.tick (/home/tuan1998/aura-sync/crawl-system/node_modules/swagger-stats/lib/swssysstats.js:77:14) at Timeout.tick [as _onTimeout] (/home/tuan1998/aura-sync/crawl-system/node_modules/swagger-stats/lib/swsProcessor.js:126:23) at listOnTimeout (internal/timers.js:557:17) at processTimers (internal/timers.js:498:7) { errno: -24, code: 'EMFILE', syscall: 'uv_resident_set_memory' }

    It should be has a try catch outside this statement let memUsage = process.memoryUsage();

    enhancement 
    opened by fibonacci998 0
Releases(v0.99.4)
🕵️‍♀️ A small performance audit on observable hq

Observable HQ - Performance Audit Audit setup Base Measures Filmstrip Pageload unoptimized Page Refresh unoptimized Page Re-draw DOM unoptimized Page

Push Based 21 Nov 28, 2022
An lldb plugin for Node.js and V8, which enables inspection of JavaScript states for insights into Node.js processes and their core dumps.

Node.js v10.x+ C++ plugin for the LLDB debugger. The llnode plugin adds the ability to inspect JavaScript stack frames, objects, source code and more

Node.js 1k Dec 14, 2022
A tiny JavaScript debugging utility modelled after Node.js core's debugging technique. Works in Node.js and web browsers

debug A tiny JavaScript debugging utility modelled after Node.js core's debugging technique. Works in Node.js and web browsers. Installation $ npm ins

Sloth 10.5k Dec 30, 2022
Node is running but you don't know why? why-is-node-running is here to help you.

why-is-node-running Node is running but you don't know why? why-is-node-running is here to help you. Installation Node 8 and above: npm i why-is-node-

Mathias Buus 1.5k Dec 30, 2022
A Node.js tracing and instrumentation utility

njsTrace - Instrumentation and Tracing njstrace lets you easily instrument and trace you code, see all function calls, arguments, return values, as we

Yuval 354 Dec 29, 2022
thetool is a CLI tool to capture different cpu, memory and other profiles for your node app in Chrome DevTools friendly format

thetool thetool is a CLI tool to capture different cpu, memory and other profiles for your node app in Chrome DevTools friendly format. Quick start np

null 200 Oct 28, 2022
Node.js debugger based on Blink Developer Tools

Node Inspector Overview Node Inspector is a debugger interface for Node.js applications that uses the Blink Developer Tools (formerly WebKit Web Inspe

null 12.6k Dec 29, 2022
ndb is an improved debugging experience for Node.js, enabled by Chrome DevTools

ndb ndb is an improved debugging experience for Node.js, enabled by Chrome DevTools Installation Compatibility: ndb requires Node >=8.0.0. It works be

null 10.8k Dec 28, 2022
[OBSOLETE] runs Node.js programs through Chromium DevTools

devtool ⚠️ Update: This tool is mostly obsolete as much of the philosophy has been brought into Node/DevTool core, see here for details. If you wish t

Jam3 3.8k Dec 20, 2022
Debug Node.js code with Chrome Developer Tools.

Debug Node.js code with Chrome Developer Tools on Linux, Windows and OS X. This software aims to make things easier ?? . With ironNode you have the fu

Stephan Ahlf 2.3k Dec 30, 2022
🐛 Memory leak testing for node.

Leakage - Memory Leak Testing for Node Write leakage tests using Mocha or another test runner of your choice. Does not only support spotting and fixin

Andy Wermke 1.6k Dec 28, 2022
Long stack traces for node.js inspired by https://github.com/tlrobinson/long-stack-traces

longjohn Long stack traces for node.js with configurable call trace length Inspiration I wrote this while trying to add long-stack-traces to my server

Matt Insler 815 Dec 23, 2022
Locus is a debugging module for node.js

ʆ Locus Locus is a debugging module which allows you to execute commands at runtime via a REPL. Installing npm install locus --save-dev Using require(

Ali Davut 300 Nov 13, 2022
He is like Batman, but for Node.js stack traces

Stackman Give Stackman an error and he will give an array of stack frames with extremely detailed information for each frame in the stack trace. With

Thomas Watson 242 Jan 1, 2023
Streamline Your Node.js Debugging Workflow with Chromium (Chrome, Edge, More) DevTools.

NiM (Node.js --inspector Manager) Streamlines your development process Google Chrome Web Store (works with any Chromium browsers: Google's Chrome, Mic

Will 188 Dec 28, 2022
📡 Encrypt and authenticate DevTools to use it securely remotely. Add HTTPS, and authentication to --remote-debugging-port to debug, inspect and automate from anywhere and collaborate securely on bugs.

?? Encrypt and authenticate DevTools to use it securely remotely. Add HTTPS, and authentication to --remote-debugging-port to debug, inspect and automate from anywhere and collaborate securely on bugs.

Cris 9 May 5, 2022
A project to showcase a poc of distributed systems with message queue, graphql, grpc, http server with added monitoring and tracing capabilities.

trace-sandbox Trace sandbox is a project to showcase a poc of distributed systems with message queue, graphql, grpc, http server with added monitoring

Alfian Pramudita 6 Jun 24, 2021
Well-formatted and improved trace system calls and signals (when the debugger does not help)

ctrace Well-formatted and improved trace system calls and signals (when the debugger does not help). Why? Awesome tools strace and dtruss have only on

Aleksandr Komlev 117 Dec 27, 2022
An IoT bottle that tracks water consumption. Winner of Best Health Hack, MLH's Best Hardware Hack, and QB3's Best Big Data for the Improvement of Health Care Winner at CruzHacks 2022.

An IoT bottle that tracks water consumption. Winner of Best Health Hack, MLH's Best Hardware Hack, and QB3's Best Big Data for the Improvement of Health Care Winner at CruzHacks 2022.

Nathanael Garza 2 Jan 21, 2022
App to manage maintenance calls. App to manage maintenance calls. This application was created for the purpose of studies.

App to manage maintenance calls. App to manage maintenance calls. This application was created for the purpose of studies.

Rodrigo Gonçalves 112 Dec 26, 2022