Skip to content

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Dec 15, 2025

  • db.query.text: We previously specified this attribute to contain a full/raw query without parameterization. OTel requires the paramterized query.
  • db.query.summary We specified this attribute to contain the paramterized query. OTel specifies a shortened operation/table "grouping".

This came up while reviewing getsentry/sentry-javascript#17961

@Lms24 Lms24 self-assigned this Dec 15, 2025
Copy link
Member

@lcian lcian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, you will need to regenerate and reformat.
Also, example needs to be a string, we can change that but for the purpose of the PR just provide a single example as a string.

@Lms24
Copy link
Member Author

Lms24 commented Dec 15, 2025

+1 for being able to add more than one example. For now I removed the second example. Thanks for the review!

@cleptric
Copy link
Member

@mjq and @Ahmed-Labs should take a look here as well.

@Ahmed-Labs
Copy link
Contributor

Makes sense! We will probably have to update db attribute normalization logic because we currently expect a raw query as opposed to a parametrized one in db.query.text.

@Lms24
Copy link
Member Author

Lms24 commented Dec 16, 2025

Just to add here, JS SDK instrumentations have been sending the parametrized version in db.query.text ever since sending this attribute. I don't have the full picture if other SDKs handle this differently. If so, we need to be very mindful with this change in specification but it also means we're living with duality (in terms of semantics) already anyway.

@Lms24
Copy link
Member Author

Lms24 commented Jan 8, 2026

@Ahmed-Labs @cleptric should we move forward with this change?

},
"is_in_otel": true,
"example": "SELECT * FROM users",
"example": "SELECT * FROM users WHERE id = $1",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I have this query:

INSERT INTO exec_test (id, name) VALUES (?, ?, ?, ?)

Should it become as it is, or:

INSERT INTO exec_test (id, name) VALUES (?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants