Expand sqlalchemy pool.name to follow the semantic conventions (#1778)

This commit is contained in:
Shalev Roda
2023-05-06 20:39:52 +03:00
committed by GitHub
parent 890e5dd9b8
commit 1a1163e919
4 changed files with 51 additions and 2 deletions

View File

@ -70,11 +70,12 @@ class TestSqlalchemyMetricsInstrumentation(TestBase):
)
def test_metrics_without_pool_name(self):
pool_name = ""
pool_name = "pool_test_name"
engine = sqlalchemy.create_engine(
"sqlite:///:memory:",
pool_size=5,
poolclass=QueuePool,
pool_logging_name=pool_name,
)
metrics = self.get_sorted_metrics()