slanatech / swagger-stats

API Observability. Trace API calls and Monitor API performance, health and usage statistics in Node.js Microservices.
https://swaggerstats.io/
MIT License
891 stars 136 forks source link

Add support for prom-client v14 #147

Closed leedm777 closed 1 year ago

leedm777 commented 2 years ago

The prom-client module released v14 on Sept 18. Please update swagger-stats to allow for the upgrade. The breaking changes in the prom-client release are:

  • changed: linearBuckets does not propagate rounding errors anymore.

    Fewer bucket bounds will be affected by rounding errors. Histogram bucket labels may change. 6f1f3b2

  • changed: The push gateway methods pushAdd(), push() and delete() now return Promises instead of accepting a callback:

    // Old:
    gateway.pushAdd({ jobName: 'test' }, (err, resp, body) => {});
    // New:
    gateway
    .pushAdd({ jobName: 'test' })
    .then(({ resp, body }) => {})
    .catch(err => {});
    // or
    const { resp, body } = await gateway.pushAdd({ jobName: 'test' });

    f177b1f

  • changed: The default nodejs_eventloop_lag_* metrics are now reset every time they are observed. This prevents these metrics from "stabilizing" over a long period of time and becoming insensitive to small changes. For more info, see #370. 0f444cd

sv2 commented 1 year ago

v0.99.3