Open kosportel opened 3 years ago
This issue was marked stale due to lack of activity. It will be closed in 30 days.
Does this always happen with connection or is it just with pandas read_sql
?
I changed the code like this but nothing changed.
cursor = connection.cursor()
cursor.tables()
rows = cursor.fetchall()
for row in rows:
print(row.table_name)
and
cursor = connection.execute(sql)
rows = cursor.fetchall()
for row in rows:
print(row)
Hope that helps.
Try replacing
trace_integration(pyodbc, "Connection", "odbc")
with
trace_integration(pyodbc, "connect", "odbc")
@kosportel
Seems like a mistake in the docs ... @owais
Hi @adirmatzkin,
I confirm that changing to "connect", instrumentation works well. I couldn't imagine that such a simple change would solve the problem.
Many Thanks
It should be verified if some versions of pyodbc need "Connection" while others need "connect" and the docs should be updated accordingly.
Hello,
I am trying to capture the database commands using Instrumentation DBapi, but i don't see anything to be reported to Jaeger. I am accessing database using pyodbc and pandas and i see while debugging that no exception is occurred and data are returned from the database. I have configured Jaeger in my local docker and I see that I am able to send there data if I use the simple getting started examples:
I assume that Instrumentation DBapi is the correct library for pyodbc connections to database (i am using Azure SQL Server). Is there any better library?
I am running Python 3.7.8. 64 bit. Requirements.txt is attached. Keep in mind that these are the libraries of the main - bigger program. I was able to keep only a small part of it - attached below, to reproduce the issue easily.
requirements_openTelemetry.txt
The code that reproduces the case can be found in the attached python file - just unzip.
OpenTelemetry_Test.zip
Steps to reproduce Try to run the code above. You need to adjust the database access and sql command.
What is the expected behavior? Based on my recent experience using OpenTelemetry in .NET, i would expect to see the database command being captured and send information to Jaeger
What is the actual behavior? The database command is ignored.
Can you please advice, if i am doing something wrong or it is a genuine issue?
Thank you in advance, Konstantinos