hystrix-dashboard

1.0.4 • Public • Published

hystrix-dashboard

The module provides UI part from hystrix java dashboard that can be used as part nodejs application. For convenience, it also provides a publisher /hystrix.stream and a proxy /proxy.stream

codecov Build Status NPM Downloads Known Vulnerabilities

Install

npm install hystrix-dashboard -S

Usage

One can expose it as part of your express app under /hystrix

const express = require('express');
const app = express();
const dashboard = require('hystrix-dashboard');

app.use(dashboard({
    idleTimeout: 4000,  // will emit "ping if no data comes within 4 seconds,
    interval: 2000      // interval to collect metrics
    proxy: true         // enable proxy for stream
}));

app.listen(8000); //  http://localhost:8000/hystrix

The metrics SSE stream can be served by /hystrix.stream if this module is used within the same runtime where service metrics is produced.

The hystrix stream will will detect all hystrix modules loaded into require.cache and start observing them for any metrics available.

For a real example, you can look at how trooba-hystrix-handler uses it to expose trooba pipeline service metrics.

/hystrix-dashboard/

    Package Sidebar

    Install

    npm i hystrix-dashboard

    Weekly Downloads

    151

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    394 kB

    Total Files

    38

    Last publish

    Collaborators

    • dimichgh