Bro what
This commit is contained in:
parent
2911d4f0e7
commit
2928ef3c45
1 changed files with 4 additions and 8 deletions
|
|
@ -148,16 +148,12 @@ app.post("/some-cool-endpoint", (req, res) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
let path = "/";
|
let path = "/";
|
||||||
if (typeof e.path === "string" && e.path) {
|
|
||||||
path = e.path.startsWith("/") ? e.path : `/${e.path}`;
|
|
||||||
} else {
|
|
||||||
try {
|
try {
|
||||||
if (e.url) {
|
if (e.url) {
|
||||||
path = new URL(e.url).pathname || "/";
|
path = new URL(e.url).pathname || "/";
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
eventCounter.labels(site, e.type, path, country, device, browser, os).inc();
|
eventCounter.labels(site, e.type, path, country, device, browser, os).inc();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue