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

Implement sensitive data sanitization for psycopg2 instrumentation #1734

Open
Tracked by #1543
BuffaloWill opened this issue Mar 30, 2023 · 2 comments
Open
Tracked by #1543

Comments

@BuffaloWill
Copy link

Although psycopg2 uses dbapi, it does not instrument capture_parameters=True. It's therefore missing the ability for a user to enable/disable raw db.statement's.

For example, I would expect to apply the parameter similar to enable_commenter and see the raw db.statement:

Psycopg2Instrumentor().instrument(capture_parameters=True)

In my testing, I am seeing db.statements sanitized by default.

I think this is the relevant code:

dbapi.wrap_connect(
__name__,
psycopg2,
"connect",
self._DATABASE_SYSTEM,
self._CONNECTION_ATTRIBUTES,
version=__version__,
tracer_provider=tracer_provider,
db_api_integration_factory=DatabaseApiIntegration,
enable_commenter=enable_sqlcommenter,
commenter_options=commenter_options,
)

@BuffaloWill BuffaloWill changed the title Implement sensitive data sanitization for psycopg2 instrumentation #1544 Implement sensitive data sanitization for psycopg2 instrumentation Mar 30, 2023
@BuffaloWill
Copy link
Author

BuffaloWill commented Mar 30, 2023

Referencing #1543 as well

@tammy-baylis-swi
Copy link
Contributor

Adding references to

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

No branches or pull requests

2 participants