From 8f9f2a523207a4940e13b2865dd442c8e8f68a94 Mon Sep 17 00:00:00 2001 From: Freek Mencke Date: Sat, 8 Jun 2019 14:25:45 +0200 Subject: [PATCH] Better url normalizing for Prometheus --- package.json | 2 +- src/app/app.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index caea95f..47d2d2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "osrs-tracker-api", - "version": "0.3.1", + "version": "0.3.2", "private": true, "author": "Freek Mencke", "homepage": "https://twitter.com/FreekMencke", diff --git a/src/app/app.ts b/src/app/app.ts index 807f5b3..277b98e 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -52,6 +52,11 @@ export class App { customLabels: { app: 'osrs-tracker-api' }, includeMethod: true, includePath: true, + normalizePath: [ + ['^/player/.*', '/player/#username'], + ['^/xp/.*/.*', '/xp/#username/#period'], + ['^/xp/[^/]*', '/xp/#username'], + ], }) ); }