Giter VIP home page Giter VIP logo

node-prometheus-hystrix's Introduction

prometheus-hystrix

Expose Hystrix stream as Prometheus data

NPM Version Build Status

Dependency Status Peer Dependency Status Dev Dependency Status Greenkeeper badge

Usage

This module has a peer dependency on prom-client. Currently, version 3-5 are supported.

This module exports a single function, taking a Stream of Hystrix data, and returning a Subscription of the same data, which can be unsubscribed if you so which.

Where to get Hystrix data

brakes exposes Hystrix data as a stream.

import { getGlobalStats } from 'brakes';
import prometheusHystrix from 'prometheus-hystrix';
import prometheusRegister from 'prom-client/lib/register';

prometheusHystrix(getGlobalStats().getHystrixStream());

setInterval(() => {
  console.log(prometheusRegister.metrics());
}, 500)

Metrics exposed

This module exposes 17 metrics, all using the name of the HystrixCommand as the label:

  1. hystrix_errors_total: Total number of times the breaker has errored
  2. hystrix_requests_total: Total number of requests made to the breaker
  3. hystrix_collapsed_requests_total: Total number of times a requests has been collapsed.
  4. hystrix_exceptions_thrown_total: Total number of times an exception has been thrown.
  5. hystrix_failures_total: Total number of times a call has failed.
  6. hystrix_fallback_failures_total: Total number of times a fallback has failed.
  7. hystrix_fallback_rejections_total: Total number of times a fallback has rejected.
  8. hystrix_fallback_successes_total: Total number of times a fallback has been successful.
  9. hystrix_responses_from_cache_total: Total number of times a response has been returned from the cache.
  10. hystrix_semaphore_rejections_total: Total number of times a request failed because of empty semaphore.
  11. hystrix_short_circuits_total: Total number of times a request short circuited.
  12. hystrix_successes_total: Total number of times a request succeeded.
  13. hystrix_thread_pool_rejections_total: Total number of times a the thread pool rejected.
  14. hystrix_timeouts_total: Total number of times a request timed out.
  15. hystrix_current_concurrent_executions_total: Total number of requests going concurrently.
  16. hystrix_latency_execute_mean: Mean latency of all executions.
  17. hystrix_latency_total_mean: Mean latency of all requests.

TODO

There are currently no metrics for the calculated percentiles latencyExecute and latencyTotal.

node-prometheus-hystrix's People

Contributors

greenkeeper[bot] avatar greenkeeperio-bot avatar simenb avatar

Watchers

 avatar  avatar

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.