This commit is contained in:
Soph :3 2025-11-02 12:57:53 +02:00
parent 2911d4f0e7
commit 2928ef3c45

View file

@ -148,16 +148,12 @@ app.post("/some-cool-endpoint", (req, res) => {
}
let path = "/";
if (typeof e.path === "string" && e.path) {
path = e.path.startsWith("/") ? e.path : `/${e.path}`;
} else {
try {
if (e.url) {
path = new URL(e.url).pathname || "/";
}
} catch (err) {
}
}
eventCounter.labels(site, e.type, path, country, device, browser, os).inc();