Skip to content

Commit 2b8ca97

Browse files
Fix docker-tests assumption by Postgres-Sqlalchemy case about scope of metrics (#4258)
* Fix postgres-sqlalchemy docker-test assumption about metrics * Changelog
1 parent 5560324 commit 2b8ca97

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
113113
([#4078](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4171))
114114
- `opentelemetry-instrumentation-aiohttp-server`: fix HTTP error inconsistencies
115115
([#4175](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4175))
116+
- `opentelemetry-docker-tests` Fix docker-tests assumption by Postgres-Sqlalchemy case about scope of metrics
117+
([#4258](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4258))
116118

117119
### Breaking changes
118120

tests/opentelemetry-docker-tests/tests/sqlalchemy_tests/test_postgres.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
from .mixins import SQLAlchemyTestMixin
2525

26+
SCOPE = "opentelemetry.instrumentation.sqlalchemy"
27+
2628
POSTGRES_CONFIG = {
2729
"host": "127.0.0.1",
2830
"port": int(os.getenv("TEST_POSTGRES_PORT", "5432")),
@@ -117,7 +119,7 @@ def test_metrics_pool_name(self):
117119
POSTGRES_CONFIG["port"],
118120
self.SQL_DB,
119121
)
120-
metrics = self.get_sorted_metrics()
122+
metrics = self.get_sorted_metrics(SCOPE)
121123
self.assertEqual(len(metrics), 1)
122124
self.assert_metric_expected(
123125
metrics[0],

0 commit comments

Comments
 (0)