opentelemetry-python-contrib icon indicating copy to clipboard operation
opentelemetry-python-contrib copied to clipboard

sqlalchemy intrument missing operation span

Open rodrilp opened this issue 2 years ago • 1 comments
trafficstars

Describe your environment We are using otel in a lambda with Python3.9, to get the opentelemtry library we are using the otel layer for aws (v1.17/0.38b0) the latest version.

Steps to reproduce The code implementation is something easy like this

engine = create_engine('teradatasql://')
SQLAlchemyInstrumentor().instrument(
    tracer_provider=tracer_provider,
    engine=engine
)

result = pd.read_sql_query(sql, engine)
engine.dispose()

If I call the lambda the connect span always exists, but sometimes the span with the operation is missing.

What is the expected behavior? It is expected to always receive the span of the operation performed in the database.

What is the actual behavior? Currently, the span corresponding to the operation performed in the database is not always received.

Additional context No additional context to add.

rodrilp avatar Jun 14 '23 18:06 rodrilp