Socket
Socket
Sign inDemoInstall

prometheus-extended-gauge

Package Overview
Dependencies
4
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    prometheus-extended-gauge

An enhanced gauge that can expose better visibility on the metrics beyond what gets captured in the normal sampling


Version published
Weekly downloads
3
decreased by-88.89%
Maintainers
1
Install size
39.7 kB
Created
Weekly downloads
 

Readme

Source

prometheus-extended-gauge

CircleCI codecov

What's the problem this helps solve?

prometheus, as well as many other metrics collection frameworks, offers some basic constructs for gathering stats: Counters, Gauges, Histograms and Summaries.

The problem is that Gauges are sampled every time that Prometheus scrapes the stats, but there may be a lot of activity that is missed. Especially if the gauge changes a lot (e.g. # of active connections in a connection pool).

In this case, there may be spikes that are overlooked in the sampling. This is where the ExtendedGauge comes in handy. It is a drop-in replacement for a normal Prometheus Gauge with the exception that it keeps a moving time window that you can configure and it can expose the max, min and average value of the gauge in that moving time window (as Gauges).

The moving time window is implemented using a circular buffer where you have a certain number of buckets, each for a period of time. So, for example, you could specify to have 60 buckets of 1000ms each to have a moving time window of 1 minute with a granularity of 1 second.

You can configure the moving time window by setting:

  • bucketSizeMillis: The size of a bucket in millisencods (defaults to 1024ms)
  • numBuckets: The number of buckets to keep

FAQs

Last updated on 03 Apr 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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