Merge pull request #93 from RyanBard/update_types_with_exclude_routes

closes #92: Add excludeRoutes to types
This commit is contained in:
Konstantin Pogorelov
2021-08-16 08:58:00 +03:00
committed by GitHub
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,