-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
The /metrics endpoint currently exposes datapoints for highly dynamic routes (e.g. POST /api/v10/interactions/:id/:token/callback and PATCH /api/v10/webhooks/:id/:token/messages/@original), which creates very high cardinality metrics (one datapoint per interaction token). Can we add route normalization/sanitization so dynamic segments and query params are collapsed into stable route names?
Possible approaches:
- Reintroduce a "pretty route name" mapping for dynamic routes (or a configurable sanitizer).
- Replace numeric/token path segments with placeholders when exporting metrics (e.g. /api/v10/interactions/:id/:token/callback).
- Make route sanitization configurable (on/off or pluggable function) and ignore query params by default for metrics labels.
Context (from Discord)
There used to be a list of pretty route names, but the routes are now dynamic so that's no longer possible. The issue is not limited to interactions, btw, and even applies to query parameters.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels