dynatrace-oss / OneAgent-SDK-Python-AutoInstrumentation

autodynatrace, a python library that implements automatic instrumentation using the OneAgent SDK for Python
Other
62 stars 28 forks source link

Attempt to pass non-string type to SDK function expecting a string. Actual type: <class 'psycopg2.sql.Composed'> #61

Closed fherpich closed 1 year ago

fherpich commented 2 years ago

Hi Team,

We are using OneAgent-SDK-Python-AutoInstrumentation as its easy and no change to code needed for Dynatrace instrumentation, but got into an issue with few apps using psycopg2, seems like this is a know issue and already fixed by the thread https://github.com/dynatrace-oss/OneAgent-SDK-Python-AutoInstrumentation/issues/22, but didn't work for us and we don't want to use Oneagent-SDK due to the amount of changes needed to the code, please let us know if anything that can be don't without change of our code or the use of the workaround suggested by Dynatrace.

ERROR 120 --- [Thread-4] processing.jobs.bg_sync_job : bgsync - An error occurred synchronizing the DDL data. argument 2: <class 'ValueError'>: Attempt to pass non-string type to SDK function expecting a string. Actual type: <class 'psycopg2.sql.Composed'>

fherpich commented 2 years ago

Hey folks, let me know if you need any additional information or if this was not clear.

dlopes7 commented 2 years ago

@fherpich Yes we can use additional information, like what line from your code is triggering this, we also accept pull requests if you have a fix

dlopes7 commented 1 year ago

This should be fixed with 2.0.0, can you please update and test?