semantic-conventions
semantic-conventions copied to clipboard
DB Grouping variables from statement
Is your change request related to a problem? Please describe.
As part of sanitization, one improvement is to also do a grouping of the replacements. Splitting this issue from https://github.com/open-telemetry/semantic-conventions/issues/717 to focus on the grouping itself.
Describe the solution you'd like
For example: When there was IN clause, it would be replaced by one of the values:
__more1_10____more10_100____more100_200____more200_300____more300_400____more400_500____more500_600____more600_700____more700_800____more800_900____more900_1000____more1000_plus__.
That created a nice balance of separating groups that would use different plan executions, but at the same time keeping cardinality lower of different possible final strings, since the list can be quite big (I saw cases with 20k+ values in a list)
Describe alternatives you've considered
Another solution would be to always replace with the exact value is being grouped, such as __more23__, but that would increase cardinality and this level of details is not that helpful. A solution creating buckets would make more sense.
Additional context
No response
@trask I created the issue as we discussed on the last SIG, but I don't have permission to add this to the DB Client Semantic Convention project
I added to the project now and removed the triage label :) @maryliag will you be working on this? Should I assign it to you?
thank you @joaopgrassi ! And yes, you can assign it to me
let's add something after #1100 to mention in lists MAY be collapsed in some way
Discussed previously in DB semconv meeting:
I sent #1243 to address https://github.com/open-telemetry/semantic-conventions/issues/1053#issuecomment-2183051443.
After that is merged we can postpone the remaining portions of this issue until after stability.
should we change MAY to SHOULD collapse in-clauses during sanitization?
I think the reason we said MAY is that collapsing in-clauses is not related to sanitization...
at the same time though, if you are going through the trouble of sanitizing, this is a nice extra...