From e0a7b3829017ef8e969f3deba03ad1886900e31e Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 12 Jul 2024 08:11:30 -0700 Subject: [PATCH 1/2] db.query.text IN-clauses MAY be collapsed --- docs/database/database-spans.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index 3a38d4def6..c9f164ab49 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -250,6 +250,10 @@ in which case the instrumentation MAY choose a different placeholder. Placeholders in a parameterized query SHOULD not be sanitized. E.g. `where id = $1` can be captured as is. +[IN-clauses](https://en.wikipedia.org/wiki/Where_(SQL)#IN) MAY be collapsed during sanitization, +e.g. from `IN (?, ?, ?, ?)` to `IN (?)`, as this can help with extremely long IN-clauses, +and can help control cardinality for users who choose to (optionally) add `db.query.text` to their metric attributes. + ## Semantic Conventions for specific database technologies More specific Semantic Conventions are defined for the following database technologies: From 1b276fb2ba5cbb2368320b836c90f7e94fd4f120 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 12 Jul 2024 08:14:24 -0700 Subject: [PATCH 2/2] chlog --- .chloggen/1243.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .chloggen/1243.yaml diff --git a/.chloggen/1243.yaml b/.chloggen/1243.yaml new file mode 100644 index 0000000000..321a3dc7f4 --- /dev/null +++ b/.chloggen/1243.yaml @@ -0,0 +1,22 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: db + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "`db.query.text` IN-clauses MAY be collapsed during the sanitization process" + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [ 1053 ] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: