mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2026-03-13 08:10:39 +08:00
Fix docker-tests assumption by Postgres-Sqlalchemy case about scope of metrics (#4258)
* Fix postgres-sqlalchemy docker-test assumption about metrics * Changelog
This commit is contained in:
@@ -113,6 +113,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
([#4078](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4171))
|
||||
- `opentelemetry-instrumentation-aiohttp-server`: fix HTTP error inconsistencies
|
||||
([#4175](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4175))
|
||||
- `opentelemetry-docker-tests` Fix docker-tests assumption by Postgres-Sqlalchemy case about scope of metrics
|
||||
([#4258](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4258))
|
||||
|
||||
### Breaking changes
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ from opentelemetry.semconv.trace import SpanAttributes
|
||||
|
||||
from .mixins import SQLAlchemyTestMixin
|
||||
|
||||
SCOPE = "opentelemetry.instrumentation.sqlalchemy"
|
||||
|
||||
POSTGRES_CONFIG = {
|
||||
"host": "127.0.0.1",
|
||||
"port": int(os.getenv("TEST_POSTGRES_PORT", "5432")),
|
||||
@@ -117,7 +119,7 @@ class PostgresMetricsTestCase(PostgresTestCase):
|
||||
POSTGRES_CONFIG["port"],
|
||||
self.SQL_DB,
|
||||
)
|
||||
metrics = self.get_sorted_metrics()
|
||||
metrics = self.get_sorted_metrics(SCOPE)
|
||||
self.assertEqual(len(metrics), 1)
|
||||
self.assert_metric_expected(
|
||||
metrics[0],
|
||||
|
||||
Reference in New Issue
Block a user