relay
relay copied to clipboard
Span grouping for complex db queries
Some projects generate many different SQL queries that are distinct even after parameter scrubbing (e.g. programmatically generated queries), which leads to an explosion in tag cardinality.
We need to find a way to deal with such queries. Some options (there might be more):
- Rely on a per-tag cardinality limiter. More relevant queries have a higher quality of being accepted because of their frequency.
- Build a top-K per-tag cardinality limiter to increase the probability that relevant queries are recorded.
- Group more coarsely by erasing deep levels of nesting / joins from the query.
- Group more coarsely by keeping only the first 200 characters of a query.
- ...