opentelemetry-instrumentation-aiopg 0.53b1__py3-none-any.whl → 0.54b1__py3-none-any.whl
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.
- opentelemetry/instrumentation/aiopg/__init__.py +33 -20
- opentelemetry/instrumentation/aiopg/version.py +1 -1
- {opentelemetry_instrumentation_aiopg-0.53b1.dist-info → opentelemetry_instrumentation_aiopg-0.54b1.dist-info}/METADATA +3 -3
- opentelemetry_instrumentation_aiopg-0.54b1.dist-info/RECORD +10 -0
- opentelemetry_instrumentation_aiopg-0.53b1.dist-info/RECORD +0 -10
- {opentelemetry_instrumentation_aiopg-0.53b1.dist-info → opentelemetry_instrumentation_aiopg-0.54b1.dist-info}/WHEEL +0 -0
- {opentelemetry_instrumentation_aiopg-0.53b1.dist-info → opentelemetry_instrumentation_aiopg-0.54b1.dist-info}/entry_points.txt +0 -0
- {opentelemetry_instrumentation_aiopg-0.53b1.dist-info → opentelemetry_instrumentation_aiopg-0.54b1.dist-info}/licenses/LICENSE +0 -0
@@ -23,40 +23,53 @@ Usage
|
|
23
23
|
|
24
24
|
.. code-block:: python
|
25
25
|
|
26
|
+
import asyncio
|
26
27
|
import aiopg
|
27
28
|
from opentelemetry.instrumentation.aiopg import AiopgInstrumentor
|
28
29
|
# Call instrument() to wrap all database connections
|
29
30
|
AiopgInstrumentor().instrument()
|
30
31
|
|
31
|
-
|
32
|
-
cursor = await cnx.cursor()
|
33
|
-
await cursor.execute("CREATE TABLE IF NOT EXISTS test (testField INTEGER)")
|
34
|
-
await cursor.execute("INSERT INTO test (testField) VALUES (123)")
|
35
|
-
cursor.close()
|
36
|
-
cnx.close()
|
32
|
+
dsn = 'user=user password=password host=127.0.0.1'
|
37
33
|
|
38
|
-
|
34
|
+
async def connect():
|
35
|
+
cnx = await aiopg.connect(dsn)
|
36
|
+
cursor = await cnx.cursor()
|
37
|
+
await cursor.execute("CREATE TABLE IF NOT EXISTS test (testField INTEGER)")
|
38
|
+
await cursor.execute("INSERT INTO test (testField) VALUES (123)")
|
39
|
+
cursor.close()
|
40
|
+
cnx.close()
|
39
41
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
async def create_pool():
|
43
|
+
pool = await aiopg.create_pool(dsn)
|
44
|
+
cnx = await pool.acquire()
|
45
|
+
cursor = await cnx.cursor()
|
46
|
+
await cursor.execute("CREATE TABLE IF NOT EXISTS test (testField INTEGER)")
|
47
|
+
await cursor.execute("INSERT INTO test (testField) VALUES (123)")
|
48
|
+
cursor.close()
|
49
|
+
cnx.close()
|
50
|
+
|
51
|
+
asyncio.run(connect())
|
52
|
+
asyncio.run(create_pool())
|
46
53
|
|
47
54
|
.. code-block:: python
|
48
55
|
|
56
|
+
import asyncio
|
49
57
|
import aiopg
|
50
58
|
from opentelemetry.instrumentation.aiopg import AiopgInstrumentor
|
51
59
|
|
60
|
+
dsn = 'user=user password=password host=127.0.0.1'
|
61
|
+
|
52
62
|
# Alternatively, use instrument_connection for an individual connection
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
63
|
+
async def go():
|
64
|
+
cnx = await aiopg.connect(dsn)
|
65
|
+
instrumented_cnx = AiopgInstrumentor().instrument_connection(cnx)
|
66
|
+
cursor = await instrumented_cnx.cursor()
|
67
|
+
await cursor.execute("CREATE TABLE IF NOT EXISTS test (testField INTEGER)")
|
68
|
+
await cursor.execute("INSERT INTO test (testField) VALUES (123)")
|
69
|
+
cursor.close()
|
70
|
+
instrumented_cnx.close()
|
71
|
+
|
72
|
+
asyncio.run(go())
|
60
73
|
|
61
74
|
API
|
62
75
|
---
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: opentelemetry-instrumentation-aiopg
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.54b1
|
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
|
Project-URL: Repository, https://github.com/open-telemetry/opentelemetry-python-contrib
|
@@ -20,8 +20,8 @@ Classifier: Programming Language :: Python :: 3.12
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.13
|
21
21
|
Requires-Python: >=3.8
|
22
22
|
Requires-Dist: opentelemetry-api~=1.12
|
23
|
-
Requires-Dist: opentelemetry-instrumentation-dbapi==0.
|
24
|
-
Requires-Dist: opentelemetry-instrumentation==0.
|
23
|
+
Requires-Dist: opentelemetry-instrumentation-dbapi==0.54b1
|
24
|
+
Requires-Dist: opentelemetry-instrumentation==0.54b1
|
25
25
|
Requires-Dist: wrapt<2.0.0,>=1.0.0
|
26
26
|
Provides-Extra: instruments
|
27
27
|
Requires-Dist: aiopg<2.0.0,>=0.13.0; extra == 'instruments'
|
@@ -0,0 +1,10 @@
|
|
1
|
+
opentelemetry/instrumentation/aiopg/__init__.py,sha256=b8GiNTxQUN7VjASVoZiI5N9tdGVVSK1CjQdRPTmCX2A,4920
|
2
|
+
opentelemetry/instrumentation/aiopg/aiopg_integration.py,sha256=mas7jYoDlWWVwqnYxQIvCgyTh6pLaLMPv_Sy1x3BaQU,6978
|
3
|
+
opentelemetry/instrumentation/aiopg/package.py,sha256=OGraZWgxyPDf8s5Y-BpSoKrywu3MqFoLWqRc05ZgrIc,631
|
4
|
+
opentelemetry/instrumentation/aiopg/version.py,sha256=LAnaEWDOviU2kJ-Xmrhq1biqtDukCylZDisfX_ER5Ng,608
|
5
|
+
opentelemetry/instrumentation/aiopg/wrappers.py,sha256=-OT6qIx4xWdbDYO4_9LqKMIqXaZ6ZTDXA6OxNTB2nPE,6853
|
6
|
+
opentelemetry_instrumentation_aiopg-0.54b1.dist-info/METADATA,sha256=jYeCoMZOvjJOPs9zFUhHDw65KDMux8LFinjSj5z1etM,2034
|
7
|
+
opentelemetry_instrumentation_aiopg-0.54b1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
8
|
+
opentelemetry_instrumentation_aiopg-0.54b1.dist-info/entry_points.txt,sha256=ibfH43ba08FnWqx_AR7yHVoHigG8bsPkgBGs4vKMLAg,91
|
9
|
+
opentelemetry_instrumentation_aiopg-0.54b1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
10
|
+
opentelemetry_instrumentation_aiopg-0.54b1.dist-info/RECORD,,
|
@@ -1,10 +0,0 @@
|
|
1
|
-
opentelemetry/instrumentation/aiopg/__init__.py,sha256=O5ECp_NueV0B50_tyMN6ZQV7-6Qw7xvmSeInFodTqCc,4583
|
2
|
-
opentelemetry/instrumentation/aiopg/aiopg_integration.py,sha256=mas7jYoDlWWVwqnYxQIvCgyTh6pLaLMPv_Sy1x3BaQU,6978
|
3
|
-
opentelemetry/instrumentation/aiopg/package.py,sha256=OGraZWgxyPDf8s5Y-BpSoKrywu3MqFoLWqRc05ZgrIc,631
|
4
|
-
opentelemetry/instrumentation/aiopg/version.py,sha256=uYW9AHe_CTRZoi-ExYtUTquCExW6ZiH18ELKvuFwO1I,608
|
5
|
-
opentelemetry/instrumentation/aiopg/wrappers.py,sha256=-OT6qIx4xWdbDYO4_9LqKMIqXaZ6ZTDXA6OxNTB2nPE,6853
|
6
|
-
opentelemetry_instrumentation_aiopg-0.53b1.dist-info/METADATA,sha256=CLDUJEauikLs3IvQTVPAKzmPwt3GpmJmO0wad330sJk,2034
|
7
|
-
opentelemetry_instrumentation_aiopg-0.53b1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
8
|
-
opentelemetry_instrumentation_aiopg-0.53b1.dist-info/entry_points.txt,sha256=ibfH43ba08FnWqx_AR7yHVoHigG8bsPkgBGs4vKMLAg,91
|
9
|
-
opentelemetry_instrumentation_aiopg-0.53b1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
10
|
-
opentelemetry_instrumentation_aiopg-0.53b1.dist-info/RECORD,,
|
File without changes
|
File without changes
|