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

Tags capturing DB related information when instrumented via client_hooks._dbapi2 #109

Open
ashwinbasavaraja opened this issue Feb 12, 2020 · 0 comments

Comments

@ashwinbasavaraja
Copy link

I do have application which uses postgress as DB connected via psyscopg2 python client library. When the code is instrumented with below pseudo code

from opentracing_instrumentation.client_hooks._dbapi2 import ConnectionFactory,\
    ConnectionWrapper
from opentracing_instrumentation.client_hooks.psycopg2 import Psycopg2CursorWrapper


.................

               factory = ConnectionFactory(connect_func=psycopg2.connect,
                    module_name='psycopg2',
                    conn_wrapper_ctor=ConnectionWrapper,
                    cursor_wrapper=Psycopg2CursorWrapper)

                conn = psycopg2.connect(
                    dbname=dbname,
                    user=username, 
                    password=password,
                    host=host,
                    port=port,
                    cursor_factory=....,
                    connection_factory = factory
                )

It is capturing the password as part of tag.

{
"key": "sql.conn",
"type": "string",
"value": "(('user=user1 password=password1 host=host1 port=5432 dbname=db1.',), {})"
}

Looking an example to instrument all postgresql calls without capturing sensitive information in the tags. Any configuration changes to be set, so that db related information's can be avoided as part of tag?

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

No branches or pull requests

1 participant