closes #92: Add excludeRoutes to types

Signed-off-by: Ryan Bard <john.ryan.bard@gmail.com>
This commit is contained in:
Ryan Bard
2021-08-15 18:47:48 -04:00
parent 1ec800cde7
commit e7c94ff307
2 changed files with 3 additions and 0 deletions

2
types/index.d.ts vendored
View File

@@ -29,6 +29,8 @@ declare namespace express_prom_bundle {
bypass?: (req: Request) => boolean;
excludeRoutes?: Array<string | RegExp>;
metricType?: 'summary' | 'histogram';
// https://github.com/siimon/prom-client#histogram

View File

@@ -35,6 +35,7 @@ promBundle({
buckets: [0.1, 0.4, 0.7],
includeMethod: true,
includePath: true,
excludeRoutes: ['/foo', /^\/bar\/?$/],
customLabels: { year: null },
transformLabels: (labels: promBundle.Labels) => ({
...labels,