-
Notifications
You must be signed in to change notification settings - Fork 46
Description
I have a "default route" in my application which proxies requests to another service I think this is a somewhat common pattern -a default route in Express. Something like:
app.get("*", (req, res) => {
res.send("DEFAULT ROUTE");
});
When I do this, it is causing some noisey routes in monitoring because each unique path which triggers this route is reported and aggregated separely. For example a request to /does-not-exist.txt is reported as route does-not-exist.txt*.
I'm thinking to resolve this by special casing the '*' route and reporting this in Prometheus under the simple consistent value * (no additional path information).
An alternative solution (if this is not a common case encountered for others), would be to provide a public interface which allows me to define my own mapping from route to string).