Skip to content

Commit

Permalink
Merge branch 'main' into py313
Browse files Browse the repository at this point in the history
  • Loading branch information
emdneto authored Dec 24, 2024
2 parents e7b586f + 16eaec8 commit d74623d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()

Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit d74623d

Please sign in to comment.