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

opentelemetry-contrib-sqlalchemy throws AttributeError: UNIX when instrumenting engines using UNIX sockets #2085

Closed
ohaibbq opened this issue Dec 11, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ohaibbq
Copy link

ohaibbq commented Dec 11, 2023

Describe your environment
Hi! As of 0.42b, opentelemetry-contrib-sqlalchemy is throwing an attribute error when instrumenting engines that connect to a database using UNIX sockets.

This issue is fixed in main as part of test fixes when lint was added to CI in #2067 but I cannot find any formal filing for this issue.
Pinning to 0.41b fixes the issue as the semantic conventions library still contains this attribute.

When is 0.43b scheduled to be released?

Steps to reproduce

from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor
SQLAlchemyInstrumentor().instrument()

engine = create_engine("...connection string using unix sockets")
engine.execute("select * from table;")

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

What is the expected behavior?
Works without error

What is the actual behavior?

AttributeError: UNIX
at .__getattr__ ( /usr/lib/python3.9/enum.py:429 )
at ._get_attributes_from_cursor ( /app/.venv/lib/python3.9/site-packages/opentelemetry/instrumentation/sqlalchemy/engine.py:299 )
at ._before_cur_exec ( /app/.venv/lib/python3.9/site-packages/opentelemetry/instrumentation/sqlalchemy/engine.py:213 )
at ._execute_context ( /app/.venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py:1852 )
at ._execute_clauseelement ( /app/.venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py:1577 )
at ._execute_on_connection ( /app/.venv/lib/python3.9/site-packages/sqlalchemy/sql/elements.py:334 )
at ._execute_20 ( /app/.venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py:1710 )
at .execute ( /app/.venv/lib/python3.9/site-packages/sqlalchemy/orm/session.py:1717 )
@ohaibbq ohaibbq added the bug Something isn't working label Dec 11, 2023
@ohaibbq
Copy link
Author

ohaibbq commented Dec 21, 2023

0.43b has been released!

@ohaibbq ohaibbq closed this as completed Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant