OneAgent-SDK-Python-AutoInstrumentation icon indicating copy to clipboard operation
OneAgent-SDK-Python-AutoInstrumentation copied to clipboard

App crashed while instrumenting/Tracing psycopg2 query

Open ConnectWise-Lalit opened this issue 2 years ago • 1 comments

In Our App it is expected that DataError may occur for few cases which is acceptable for us and we skip those without breaking the functionality But we have observed that with this DataError Exception our app crashes in autodynatrace/wrappers/psycopg2/wrapper.py in execute how can we make sure autodynatrace skips such Errors and keep our functionality intact without breaking application flow

Attaching the stack trace of the error crashed while Tracing psycopg2 query

image

ConnectWise-Lalit avatar May 11 '23 06:05 ConnectWise-Lalit

The DataError exception is thrown by psycopg2, not by autodynatrace.

Is the exception NOT thrown when not using autodynatrace? How are you executing this bad query so I can try to reproduce?

Because from my point of view you just need to have a try/catch for these exceptions, with or without the instrumentation, please let me know what I am missing here.

If autodynatrace were to catch this exception and ignore it, how would you know that this query is a bad query?

dlopes7 avatar Jun 22 '23 12:06 dlopes7