opentelemetry-instrumentation-aiopg 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.
Files changed (12) hide show
  1. {opentelemetry_instrumentation_aiopg-0.49b2 → opentelemetry_instrumentation_aiopg-0.51b0}/PKG-INFO +8 -5
  2. {opentelemetry_instrumentation_aiopg-0.49b2 → opentelemetry_instrumentation_aiopg-0.51b0}/pyproject.toml +4 -2
  3. {opentelemetry_instrumentation_aiopg-0.49b2 → opentelemetry_instrumentation_aiopg-0.51b0}/src/opentelemetry/instrumentation/aiopg/__init__.py +18 -1
  4. {opentelemetry_instrumentation_aiopg-0.49b2 → opentelemetry_instrumentation_aiopg-0.51b0}/src/opentelemetry/instrumentation/aiopg/version.py +1 -1
  5. {opentelemetry_instrumentation_aiopg-0.49b2 → opentelemetry_instrumentation_aiopg-0.51b0}/tests/test_aiopg_integration.py +4 -4
  6. {opentelemetry_instrumentation_aiopg-0.49b2 → opentelemetry_instrumentation_aiopg-0.51b0}/.gitignore +0 -0
  7. {opentelemetry_instrumentation_aiopg-0.49b2 → opentelemetry_instrumentation_aiopg-0.51b0}/LICENSE +0 -0
  8. {opentelemetry_instrumentation_aiopg-0.49b2 → opentelemetry_instrumentation_aiopg-0.51b0}/README.rst +0 -0
  9. {opentelemetry_instrumentation_aiopg-0.49b2 → opentelemetry_instrumentation_aiopg-0.51b0}/src/opentelemetry/instrumentation/aiopg/aiopg_integration.py +0 -0
  10. {opentelemetry_instrumentation_aiopg-0.49b2 → opentelemetry_instrumentation_aiopg-0.51b0}/src/opentelemetry/instrumentation/aiopg/package.py +0 -0
  11. {opentelemetry_instrumentation_aiopg-0.49b2 → opentelemetry_instrumentation_aiopg-0.51b0}/src/opentelemetry/instrumentation/aiopg/wrappers.py +0 -0
  12. {opentelemetry_instrumentation_aiopg-0.49b2 → opentelemetry_instrumentation_aiopg-0.51b0}/tests/__init__.py +0 -0
@@ -1,10 +1,12 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: opentelemetry-instrumentation-aiopg
3
- Version: 0.49b2
3
+ Version: 0.51b0
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
+ 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-dbapi==0.49b2
21
- Requires-Dist: opentelemetry-instrumentation==0.49b2
23
+ Requires-Dist: opentelemetry-instrumentation-dbapi==0.51b0
24
+ Requires-Dist: opentelemetry-instrumentation==0.51b0
22
25
  Requires-Dist: wrapt<2.0.0,>=1.0.0
23
26
  Provides-Extra: instruments
24
27
  Requires-Dist: aiopg<2.0.0,>=0.13.0; 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-instrumentation-dbapi == 0.49b2",
30
+ "opentelemetry-instrumentation == 0.51b0",
31
+ "opentelemetry-instrumentation-dbapi == 0.51b0",
31
32
  "wrapt >= 1.0.0, < 2.0.0",
32
33
  ]
33
34
 
@@ -41,6 +42,7 @@ aiopg = "opentelemetry.instrumentation.aiopg:AiopgInstrumentor"
41
42
 
42
43
  [project.urls]
43
44
  Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-aiopg"
45
+ Repository = "https://github.com/open-telemetry/opentelemetry-python-contrib"
44
46
 
45
47
  [tool.hatch.version]
46
48
  path = "src/opentelemetry/instrumentation/aiopg/version.py"
@@ -25,22 +25,39 @@ Usage
25
25
 
26
26
  import aiopg
27
27
  from opentelemetry.instrumentation.aiopg import AiopgInstrumentor
28
-
28
+ # Call instrument() to wrap all database connections
29
29
  AiopgInstrumentor().instrument()
30
30
 
31
31
  cnx = await aiopg.connect(database='Database')
32
32
  cursor = await cnx.cursor()
33
+ await cursor.execute("CREATE TABLE IF NOT EXISTS test (testField INTEGER)")
33
34
  await cursor.execute("INSERT INTO test (testField) VALUES (123)")
34
35
  cursor.close()
35
36
  cnx.close()
36
37
 
37
38
  pool = await aiopg.create_pool(database='Database')
39
+
38
40
  cnx = await pool.acquire()
39
41
  cursor = await cnx.cursor()
42
+ await cursor.execute("CREATE TABLE IF NOT EXISTS test (testField INTEGER)")
40
43
  await cursor.execute("INSERT INTO test (testField) VALUES (123)")
41
44
  cursor.close()
42
45
  cnx.close()
43
46
 
47
+ .. code-block:: python
48
+
49
+ import aiopg
50
+ from opentelemetry.instrumentation.aiopg import AiopgInstrumentor
51
+
52
+ # Alternatively, use instrument_connection for an individual connection
53
+ cnx = await aiopg.connect(database='Database')
54
+ instrumented_cnx = AiopgInstrumentor().instrument_connection(cnx)
55
+ cursor = await instrumented_cnx.cursor()
56
+ await cursor.execute("CREATE TABLE IF NOT EXISTS test (testField INTEGER)")
57
+ await cursor.execute("INSERT INTO test (testField) VALUES (123)")
58
+ cursor.close()
59
+ instrumented_cnx.close()
60
+
44
61
  API
45
62
  ---
46
63
  """
@@ -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"
@@ -67,7 +67,7 @@ class TestAiopgInstrumentor(TestBase):
67
67
  span = spans_list[0]
68
68
 
69
69
  # Check version and name in span's instrumentation info
70
- self.assertEqualSpanInstrumentationInfo(
70
+ self.assertEqualSpanInstrumentationScope(
71
71
  span, opentelemetry.instrumentation.aiopg
72
72
  )
73
73
 
@@ -96,7 +96,7 @@ class TestAiopgInstrumentor(TestBase):
96
96
  span = spans_list[0]
97
97
 
98
98
  # Check version and name in span's instrumentation info
99
- self.assertEqualSpanInstrumentationInfo(
99
+ self.assertEqualSpanInstrumentationScope(
100
100
  span, opentelemetry.instrumentation.aiopg
101
101
  )
102
102
 
@@ -117,7 +117,7 @@ class TestAiopgInstrumentor(TestBase):
117
117
  span = spans_list[0]
118
118
 
119
119
  # Check version and name in span's instrumentation info
120
- self.assertEqualSpanInstrumentationInfo(
120
+ self.assertEqualSpanInstrumentationScope(
121
121
  span, opentelemetry.instrumentation.aiopg
122
122
  )
123
123
 
@@ -148,7 +148,7 @@ class TestAiopgInstrumentor(TestBase):
148
148
  span = spans_list[0]
149
149
 
150
150
  # Check version and name in span's instrumentation info
151
- self.assertEqualSpanInstrumentationInfo(
151
+ self.assertEqualSpanInstrumentationScope(
152
152
  span, opentelemetry.instrumentation.aiopg
153
153
  )
154
154