Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database: should we indicate that query text was sanitized? #1179

Open
lmolkova opened this issue Jun 24, 2024 · 1 comment
Open

Database: should we indicate that query text was sanitized? #1179

lmolkova opened this issue Jun 24, 2024 · 1 comment
Labels
area:db enhancement New feature or request

Comments

@lmolkova
Copy link
Contributor

lmolkova commented Jun 24, 2024

From June 5 SIG call: Is there any way to determine whether a query has been sanitized? ? is a common placeholder for query parameters.

An explicit flag that a query was sanitized could work, with the benefit of not require any string parsing to determine if the query was originally parameterized or not.

That's a good point, however I'm not sure if this is important enough to address it at this point. We can always add an additional attribute to store if the query was sanitized or not as an incremental change.

There is the db.query.parameter.<key> to store parameters - so if the query is parametrized, then that attributes is used - however that attribute is opt-in, so admittedly that'll not help in a default setup.

I personally would wait for user feedback on this and if needed, then I'd add the additional flag on-demand if we really see the need for it.

Originally posted by @gregkalapos in #1100 (comment)

@trask
Copy link
Member

trask commented Jul 12, 2024

Moving to post-stability since this can be added as span attribute later, and won't be a metric attribute anyways (at least not be default) since db.query.text isn't a metric attribute either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:db enhancement New feature or request
Projects
Status: Post Stability
Development

No branches or pull requests

4 participants