It would seem that the Identified class from the core SQLAlchemy does not really contain all of the pieces to be an engine. This resulted in errors like
2019-10-17 20:53:36,303 - ERROR - query-exporter - error from database "snowflake": 'AsyncioEngine' object has no attribute '_connection_cls'.
2019-10-17 20:53:36,304 - DEBUG - query-exporter - updating metric "database_errors" inc 1 {database="snowflake"}
When using other dialects/drivers that do not natively support asyncio (hence this wrapper is invoked?).
This patch seems to fix that issue and now my connections and queries are working as expected.
It is intentional that AsyncEngine doesn't inherit from engine. To use the underlying engine asynchronously, the .sync_engine attribute should be used. I assume this is a prometheus-query-exporter bug.
This issue cropped up when trying to use the prometheus-query-exporter.
It would seem that the
Identified
class from the core SQLAlchemy does not really contain all of the pieces to be an engine. This resulted in errors likeWhen using other dialects/drivers that do not natively support asyncio (hence this wrapper is invoked?).
This patch seems to fix that issue and now my connections and queries are working as expected.