2.0.6 • Published 1 month ago

@tinkoff/measure-express-requests v2.0.6

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 month ago

@tinkoff/measure-express-requests

Library for measuring RED metrics in the express app

Example

import express from 'express';
import { measure } from '@tinkoff/measure-express-requests';
import { Counter, Histogram } from 'prom-client';

const app = express();

app.use(
  measure({
    metrics: {
      counter: (opt) => new Counter(opt),
      histogram: (opt) => new Histogram(opt),
    },
  })
);

In the prom-client registry new metrics will be available:

  • http_requests_total - number of incoming requests;
  • http_requests_errors - number of errors in the incoming requests;
  • http_requests_execution_time - histogram with the request handler execution time.
4.0.1

1 month ago

3.0.1

7 months ago

3.0.0

7 months ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.3

2 years ago

1.4.2

3 years ago

1.4.1

3 years ago