From e7c94ff3079c5e4f5942e5261f9c53df8d84cd68 Mon Sep 17 00:00:00 2001 From: Ryan Bard Date: Sun, 15 Aug 2021 18:47:48 -0400 Subject: [PATCH] closes #92: Add excludeRoutes to types Signed-off-by: Ryan Bard --- types/index.d.ts | 2 ++ types/test.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/types/index.d.ts b/types/index.d.ts index e493b4b..7a0d10d 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -29,6 +29,8 @@ declare namespace express_prom_bundle { bypass?: (req: Request) => boolean; + excludeRoutes?: Array; + metricType?: 'summary' | 'histogram'; // https://github.com/siimon/prom-client#histogram diff --git a/types/test.ts b/types/test.ts index 704cf0b..42061b5 100644 --- a/types/test.ts +++ b/types/test.ts @@ -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,