-
Notifications
You must be signed in to change notification settings - Fork 621
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
Missing db.statement / db.operation sensitive data sanitization option #1543
Comments
I think that the default behavior should be to sanitize the information, What do you think? |
Should
In my case I would like to see the raw db.statement instead of the sanitized one. |
Since psycopg2 uses dbapi I think you can achieve raw db.statement by setting |
I thought so to, but maybe it's not implemented? |
Yes, it needs to be added on psycopg2 side, similar to the way enable_commenter does. Here's how it looks from dbapi side. |
Should I create a separate issue for this? This is how I expected it to work in my code:
|
Pls do, I'll add it to the aggregated list |
Hi, I've got 2 questions:
For example, let's say a database client uses psycopg2 connection cursor to make (a) a parameterized query and (b) a hard-coded query:
For both queries, I would expect If the user has opted into retaining the original values, what would they be? Would it be an extraction from (b) so that both (a) and (b) would set "original" parameters Looking at some existing code: In Python DBAPI instrumentor it captures |
According to semantic-conventions, a DB instrumentation should have the option to sanitize sensitive data from either db.statement or db.operation attributes. Consider using instrumentation.dbapi to reduce instrumentation-specific logic & tests. This issue seems relevant for the following instrumentations:
13042023 Edit: Updating this issue with database specifications to add db.statement attribution only if it's sanitized.
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md#call-level-attributes
The text was updated successfully, but these errors were encountered: