mirror of
https://github.com/BreizhHardware/express-prom-bundle.git
synced 2026-01-18 16:27:28 +01:00
closes #92: Add excludeRoutes to types
Signed-off-by: Ryan Bard <john.ryan.bard@gmail.com>
This commit is contained in:
2
types/index.d.ts
vendored
2
types/index.d.ts
vendored
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user