opentelemetry-instrumentation-cassandra 0.49b2__tar.gz → 0.51b0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,12 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: opentelemetry-instrumentation-cassandra
3
- Version: 0.49b2
3
+ Version: 0.51b0
4
4
  Summary: OpenTelemetry Cassandra instrumentation
5
5
  Project-URL: Homepage, https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-cassandra
6
+ Project-URL: Repository, https://github.com/open-telemetry/opentelemetry-python-contrib
6
7
  Author-email: OpenTelemetry Authors <cncf-opentelemetry-contributors@lists.cncf.io>
7
- License: Apache-2.0
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
8
10
  Classifier: Development Status :: 4 - Beta
9
11
  Classifier: Intended Audience :: Developers
10
12
  Classifier: License :: OSI Approved :: Apache Software License
@@ -15,10 +17,11 @@ Classifier: Programming Language :: Python :: 3.9
15
17
  Classifier: Programming Language :: Python :: 3.10
16
18
  Classifier: Programming Language :: Python :: 3.11
17
19
  Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
18
21
  Requires-Python: >=3.8
19
22
  Requires-Dist: opentelemetry-api~=1.12
20
- Requires-Dist: opentelemetry-instrumentation==0.49b2
21
- Requires-Dist: opentelemetry-semantic-conventions==0.49b2
23
+ Requires-Dist: opentelemetry-instrumentation==0.51b0
24
+ Requires-Dist: opentelemetry-semantic-conventions==0.51b0
22
25
  Requires-Dist: wrapt<2.0.0,>=1.0.0
23
26
  Provides-Extra: instruments
24
27
  Requires-Dist: cassandra-driver~=3.25; extra == 'instruments'
@@ -23,11 +23,12 @@ classifiers = [
23
23
  "Programming Language :: Python :: 3.10",
24
24
  "Programming Language :: Python :: 3.11",
25
25
  "Programming Language :: Python :: 3.12",
26
+ "Programming Language :: Python :: 3.13",
26
27
  ]
27
28
  dependencies = [
28
29
  "opentelemetry-api ~= 1.12",
29
- "opentelemetry-instrumentation == 0.49b2",
30
- "opentelemetry-semantic-conventions == 0.49b2",
30
+ "opentelemetry-instrumentation == 0.51b0",
31
+ "opentelemetry-semantic-conventions == 0.51b0",
31
32
  "wrapt >= 1.0.0, < 2.0.0",
32
33
  ]
33
34
 
@@ -42,6 +43,7 @@ cassandra = "opentelemetry.instrumentation.cassandra:CassandraInstrumentor"
42
43
 
43
44
  [project.urls]
44
45
  Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-cassandra"
46
+ Repository = "https://github.com/open-telemetry/opentelemetry-python-contrib"
45
47
 
46
48
  [tool.hatch.version]
47
49
  path = "src/opentelemetry/instrumentation/cassandra/version.py"
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "0.49b2"
15
+ __version__ = "0.51b0"
@@ -43,6 +43,10 @@ class TestCassandraIntegration(TestBase):
43
43
  with self.disable_logging():
44
44
  CassandraInstrumentor().uninstrument()
45
45
 
46
+ @property
47
+ def _mocked_session(self):
48
+ return cassandra.cluster.Session(cluster=mock.Mock(), hosts=[])
49
+
46
50
  def test_instrument_uninstrument(self):
47
51
  instrumentation = CassandraInstrumentor()
48
52
  instrumentation.instrument()
@@ -67,7 +71,7 @@ class TestCassandraIntegration(TestBase):
67
71
  ):
68
72
  mock_create_response_future.return_value = mock.Mock()
69
73
  mock_session_init.return_value = None
70
- mock_connect.return_value = cassandra.cluster.Session()
74
+ mock_connect.return_value = self._mocked_session
71
75
 
72
76
  CassandraInstrumentor().instrument()
73
77
 
@@ -78,7 +82,7 @@ class TestCassandraIntegration(TestBase):
78
82
  span = spans_list[0]
79
83
 
80
84
  # Check version and name in span's instrumentation info
81
- self.assertEqualSpanInstrumentationInfo(
85
+ self.assertEqualSpanInstrumentationScope(
82
86
  span, opentelemetry.instrumentation.cassandra
83
87
  )
84
88
  self.assertEqual(span.name, "Cassandra")
@@ -100,7 +104,7 @@ class TestCassandraIntegration(TestBase):
100
104
  ):
101
105
  mock_create_response_future.return_value = mock.Mock()
102
106
  mock_session_init.return_value = None
103
- mock_connect.return_value = cassandra.cluster.Session()
107
+ mock_connect.return_value = self._mocked_session
104
108
 
105
109
  resource = resources.Resource.create({})
106
110
  result = self.create_tracer_provider(resource=resource)
@@ -124,7 +128,7 @@ class TestCassandraIntegration(TestBase):
124
128
  ):
125
129
  mock_create_response_future.return_value = mock.Mock()
126
130
  mock_session_init.return_value = None
127
- mock_connect.return_value = cassandra.cluster.Session()
131
+ mock_connect.return_value = self._mocked_session
128
132
 
129
133
  tracer_provider = trace_api.NoOpTracerProvider()
130
134
  CassandraInstrumentor().instrument(tracer_provider=tracer_provider)