diff --git a/instrumentation/opentelemetry-instrumentation-cassandra/tests/test_cassandra_integration.py b/instrumentation/opentelemetry-instrumentation-cassandra/tests/test_cassandra_integration.py index 9a36bb9069..7f1e55238c 100644 --- a/instrumentation/opentelemetry-instrumentation-cassandra/tests/test_cassandra_integration.py +++ b/instrumentation/opentelemetry-instrumentation-cassandra/tests/test_cassandra_integration.py @@ -43,6 +43,10 @@ def tearDown(self): with self.disable_logging(): CassandraInstrumentor().uninstrument() + @property + def _mocked_session(self): + return cassandra.cluster.Session(cluster=mock.Mock(), hosts=[]) + def test_instrument_uninstrument(self): instrumentation = CassandraInstrumentor() instrumentation.instrument() @@ -67,7 +71,7 @@ def test_instrumentor( ): mock_create_response_future.return_value = mock.Mock() mock_session_init.return_value = None - mock_connect.return_value = cassandra.cluster.Session() + mock_connect.return_value = self._mocked_session CassandraInstrumentor().instrument() @@ -100,7 +104,7 @@ def test_custom_tracer_provider( ): mock_create_response_future.return_value = mock.Mock() mock_session_init.return_value = None - mock_connect.return_value = cassandra.cluster.Session() + mock_connect.return_value = self._mocked_session resource = resources.Resource.create({}) result = self.create_tracer_provider(resource=resource) @@ -124,7 +128,7 @@ def test_instrument_connection_no_op_tracer_provider( ): mock_create_response_future.return_value = mock.Mock() mock_session_init.return_value = None - mock_connect.return_value = cassandra.cluster.Session() + mock_connect.return_value = self._mocked_session tracer_provider = trace_api.NoOpTracerProvider() CassandraInstrumentor().instrument(tracer_provider=tracer_provider) diff --git a/sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md b/sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md index 25201d51d1..a66805003c 100644 --- a/sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md +++ b/sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## Version 2.1.0 (2024-12-24) + - Make ec2 resource detector silent when loaded outside AWS ([#3120](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3120)) - Make ecs and beanstalk resource detector silent when loaded outside AWS diff --git a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py index b065755302..9d12794ffb 100644 --- a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py +++ b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.1.0.dev" +__version__ = "2.2.0.dev"