open-telemetry / opentelemetry-python-contrib

OpenTelemetry instrumentation for Python modules
https://opentelemetry.io
Apache License 2.0
698 stars 579 forks source link

Feature request: support mssql instrumentation #1992

Open robertomonteromiguel opened 11 months ago

robertomonteromiguel commented 11 months ago

Describe your environment Describe any aspect of your environment relevant to the problem, including your Python version, platform, version numbers of installed dependencies, information about your cloud hosting provider, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main.

I have an python flask application connected to mssql server using pyodbc driver. I am instrumenting my application following this guide: https://opentelemetry.io/docs/instrumentation/python/automatic/ I realized that no traces or metrics are being generated for my mssql server queries.

I have tested the same application and the same installation of open telemetry, but connecting to mysql and postgres database and the traces and metrics are generated correctly.

Does Open Telemetry support pyodbc? (for automatic instrumentation)

Steps to reproduce Describe exactly how to reproduce the error. Include a code sample if applicable.

Configure pyodbc driver: https://learn.microsoft.com/es-es/sql/connect/python/pyodbc/step-3-proof-of-concept-connecting-to-sql-using-pyodbc?view=sql-server-ver16 Configure open telemetry automatic instrumentation: https://opentelemetry.io/docs/instrumentation/python/automatic/

What is the expected behavior? What did you expect to see?

I expect to see traces of my mssql queries, just as I see traces when the queries are on mysql or postgres.

What is the actual behavior? What did you see instead?

Mssql related traces are not generated.

Additional context Add any other context about the problem here.

ocelotl commented 11 months ago

There is no support for mssql yet: https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation

rahulhacker commented 1 week ago

@ocelotl @lzchen can you please assign this issue to me??