opentelemetry-instrumentation-aiopg 0.44b0__tar.gz → 0.46b0__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.
Files changed (12) hide show
  1. {opentelemetry_instrumentation_aiopg-0.44b0 → opentelemetry_instrumentation_aiopg-0.46b0}/LICENSE +1 -1
  2. {opentelemetry_instrumentation_aiopg-0.44b0 → opentelemetry_instrumentation_aiopg-0.46b0}/PKG-INFO +4 -8
  3. {opentelemetry_instrumentation_aiopg-0.44b0 → opentelemetry_instrumentation_aiopg-0.46b0}/pyproject.toml +2 -7
  4. {opentelemetry_instrumentation_aiopg-0.44b0 → opentelemetry_instrumentation_aiopg-0.46b0}/src/opentelemetry/instrumentation/aiopg/version.py +1 -1
  5. {opentelemetry_instrumentation_aiopg-0.44b0 → opentelemetry_instrumentation_aiopg-0.46b0}/tests/test_aiopg_integration.py +9 -6
  6. {opentelemetry_instrumentation_aiopg-0.44b0 → opentelemetry_instrumentation_aiopg-0.46b0}/.gitignore +0 -0
  7. {opentelemetry_instrumentation_aiopg-0.44b0 → opentelemetry_instrumentation_aiopg-0.46b0}/README.rst +0 -0
  8. {opentelemetry_instrumentation_aiopg-0.44b0 → opentelemetry_instrumentation_aiopg-0.46b0}/src/opentelemetry/instrumentation/aiopg/__init__.py +0 -0
  9. {opentelemetry_instrumentation_aiopg-0.44b0 → opentelemetry_instrumentation_aiopg-0.46b0}/src/opentelemetry/instrumentation/aiopg/aiopg_integration.py +0 -0
  10. {opentelemetry_instrumentation_aiopg-0.44b0 → opentelemetry_instrumentation_aiopg-0.46b0}/src/opentelemetry/instrumentation/aiopg/package.py +0 -0
  11. {opentelemetry_instrumentation_aiopg-0.44b0 → opentelemetry_instrumentation_aiopg-0.46b0}/src/opentelemetry/instrumentation/aiopg/wrappers.py +0 -0
  12. {opentelemetry_instrumentation_aiopg-0.44b0 → opentelemetry_instrumentation_aiopg-0.46b0}/tests/__init__.py +0 -0
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright The OpenTelemetry Authors
189
+ Copyright [yyyy] [name of copyright owner]
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: opentelemetry-instrumentation-aiopg
3
- Version: 0.44b0
3
+ Version: 0.46b0
4
4
  Summary: OpenTelemetry aiopg instrumentation
5
5
  Project-URL: Homepage, https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-aiopg
6
6
  Author-email: OpenTelemetry Authors <cncf-opentelemetry-contributors@lists.cncf.io>
@@ -17,15 +17,11 @@ Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  Requires-Python: >=3.8
19
19
  Requires-Dist: opentelemetry-api~=1.12
20
- Requires-Dist: opentelemetry-instrumentation-dbapi==0.44b0
21
- Requires-Dist: opentelemetry-instrumentation==0.44b0
20
+ Requires-Dist: opentelemetry-instrumentation-dbapi==0.46b0
21
+ Requires-Dist: opentelemetry-instrumentation==0.46b0
22
22
  Requires-Dist: wrapt<2.0.0,>=1.0.0
23
23
  Provides-Extra: instruments
24
24
  Requires-Dist: aiopg<2.0.0,>=0.13.0; extra == 'instruments'
25
- Provides-Extra: test
26
- Requires-Dist: opentelemetry-instrumentation-aiopg[instruments]; extra == 'test'
27
- Requires-Dist: opentelemetry-semantic-conventions==0.44b0; extra == 'test'
28
- Requires-Dist: opentelemetry-test-utils==0.44b0; extra == 'test'
29
25
  Description-Content-Type: text/x-rst
30
26
 
31
27
  OpenTelemetry aiopg instrumentation
@@ -25,8 +25,8 @@ classifiers = [
25
25
  ]
26
26
  dependencies = [
27
27
  "opentelemetry-api ~= 1.12",
28
- "opentelemetry-instrumentation == 0.44b0",
29
- "opentelemetry-instrumentation-dbapi == 0.44b0",
28
+ "opentelemetry-instrumentation == 0.46b0",
29
+ "opentelemetry-instrumentation-dbapi == 0.46b0",
30
30
  "wrapt >= 1.0.0, < 2.0.0",
31
31
  ]
32
32
 
@@ -34,11 +34,6 @@ dependencies = [
34
34
  instruments = [
35
35
  "aiopg >= 0.13.0, < 2.0.0",
36
36
  ]
37
- test = [
38
- "opentelemetry-instrumentation-aiopg[instruments]",
39
- "opentelemetry-semantic-conventions == 0.44b0",
40
- "opentelemetry-test-utils == 0.44b0",
41
- ]
42
37
 
43
38
  [project.entry-points.opentelemetry_instrumentor]
44
39
  aiopg = "opentelemetry.instrumentation.aiopg:AiopgInstrumentor"
@@ -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.44b0"
15
+ __version__ = "0.46b0"
@@ -17,6 +17,7 @@ from unittest import mock
17
17
  from unittest.mock import MagicMock
18
18
 
19
19
  import aiopg
20
+ import psycopg2
20
21
 
21
22
  import opentelemetry.instrumentation.aiopg
22
23
  from opentelemetry import trace as trace_api
@@ -76,7 +77,7 @@ class TestAiopgInstrumentor(TestBase):
76
77
  cnx = async_call(aiopg.connect(database="test"))
77
78
  cursor = async_call(cnx.cursor())
78
79
  query = "SELECT * FROM test"
79
- cursor.execute(query)
80
+ async_call(cursor.execute(query))
80
81
 
81
82
  spans_list = self.memory_exporter.get_finished_spans()
82
83
  self.assertEqual(len(spans_list), 1)
@@ -127,7 +128,7 @@ class TestAiopgInstrumentor(TestBase):
127
128
  cnx = async_call(pool.acquire())
128
129
  cursor = async_call(cnx.cursor())
129
130
  query = "SELECT * FROM test"
130
- cursor.execute(query)
131
+ async_call(cursor.execute(query))
131
132
 
132
133
  spans_list = self.memory_exporter.get_finished_spans()
133
134
  self.assertEqual(len(spans_list), 1)
@@ -384,7 +385,9 @@ class TestAiopgIntegration(TestBase):
384
385
  span.attributes[SpanAttributes.DB_STATEMENT], "Test query"
385
386
  )
386
387
  self.assertIs(span.status.status_code, trace_api.StatusCode.ERROR)
387
- self.assertEqual(span.status.description, "Exception: Test Exception")
388
+ self.assertEqual(
389
+ span.status.description, "ProgrammingError: Test Exception"
390
+ )
388
391
 
389
392
  def test_executemany(self):
390
393
  db_integration = AiopgIntegration(self.tracer, "testcomponent")
@@ -570,17 +573,17 @@ class MockCursor:
570
573
  # pylint: disable=unused-argument, no-self-use
571
574
  async def execute(self, query, params=None, throw_exception=False):
572
575
  if throw_exception:
573
- raise Exception("Test Exception")
576
+ raise psycopg2.ProgrammingError("Test Exception")
574
577
 
575
578
  # pylint: disable=unused-argument, no-self-use
576
579
  async def executemany(self, query, params=None, throw_exception=False):
577
580
  if throw_exception:
578
- raise Exception("Test Exception")
581
+ raise psycopg2.ProgrammingError("Test Exception")
579
582
 
580
583
  # pylint: disable=unused-argument, no-self-use
581
584
  async def callproc(self, query, params=None, throw_exception=False):
582
585
  if throw_exception:
583
- raise Exception("Test Exception")
586
+ raise psycopg2.ProgrammingError("Test Exception")
584
587
 
585
588
  def close(self):
586
589
  pass