opentelemetry-instrumentation-aiohttp-client 0.51b0__tar.gz → 0.52b0__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.
- {opentelemetry_instrumentation_aiohttp_client-0.51b0 → opentelemetry_instrumentation_aiohttp_client-0.52b0}/PKG-INFO +4 -4
- {opentelemetry_instrumentation_aiohttp_client-0.51b0 → opentelemetry_instrumentation_aiohttp_client-0.52b0}/pyproject.toml +3 -3
- {opentelemetry_instrumentation_aiohttp_client-0.51b0 → opentelemetry_instrumentation_aiohttp_client-0.52b0}/src/opentelemetry/instrumentation/aiohttp_client/__init__.py +15 -7
- {opentelemetry_instrumentation_aiohttp_client-0.51b0 → opentelemetry_instrumentation_aiohttp_client-0.52b0}/src/opentelemetry/instrumentation/aiohttp_client/version.py +1 -1
- {opentelemetry_instrumentation_aiohttp_client-0.51b0 → opentelemetry_instrumentation_aiohttp_client-0.52b0}/.gitignore +0 -0
- {opentelemetry_instrumentation_aiohttp_client-0.51b0 → opentelemetry_instrumentation_aiohttp_client-0.52b0}/LICENSE +0 -0
- {opentelemetry_instrumentation_aiohttp_client-0.51b0 → opentelemetry_instrumentation_aiohttp_client-0.52b0}/README.rst +0 -0
- {opentelemetry_instrumentation_aiohttp_client-0.51b0 → opentelemetry_instrumentation_aiohttp_client-0.52b0}/src/opentelemetry/instrumentation/aiohttp_client/package.py +0 -0
- {opentelemetry_instrumentation_aiohttp_client-0.51b0 → opentelemetry_instrumentation_aiohttp_client-0.52b0}/tests/__init__.py +0 -0
- {opentelemetry_instrumentation_aiohttp_client-0.51b0 → opentelemetry_instrumentation_aiohttp_client-0.52b0}/tests/test_aiohttp_client_integration.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: opentelemetry-instrumentation-aiohttp-client
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.52b0
|
4
4
|
Summary: OpenTelemetry aiohttp client instrumentation
|
5
5
|
Project-URL: Homepage, https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-aiohttp-client
|
6
6
|
Project-URL: Repository, https://github.com/open-telemetry/opentelemetry-python-contrib
|
@@ -20,9 +20,9 @@ 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==0.
|
24
|
-
Requires-Dist: opentelemetry-semantic-conventions==0.
|
25
|
-
Requires-Dist: opentelemetry-util-http==0.
|
23
|
+
Requires-Dist: opentelemetry-instrumentation==0.52b0
|
24
|
+
Requires-Dist: opentelemetry-semantic-conventions==0.52b0
|
25
|
+
Requires-Dist: opentelemetry-util-http==0.52b0
|
26
26
|
Requires-Dist: wrapt<2.0.0,>=1.0.0
|
27
27
|
Provides-Extra: instruments
|
28
28
|
Requires-Dist: aiohttp~=3.0; extra == 'instruments'
|
@@ -27,9 +27,9 @@ classifiers = [
|
|
27
27
|
]
|
28
28
|
dependencies = [
|
29
29
|
"opentelemetry-api ~= 1.12",
|
30
|
-
"opentelemetry-instrumentation == 0.
|
31
|
-
"opentelemetry-semantic-conventions == 0.
|
32
|
-
"opentelemetry-util-http == 0.
|
30
|
+
"opentelemetry-instrumentation == 0.52b0",
|
31
|
+
"opentelemetry-semantic-conventions == 0.52b0",
|
32
|
+
"opentelemetry-util-http == 0.52b0",
|
33
33
|
"wrapt >= 1.0.0, < 2.0.0",
|
34
34
|
]
|
35
35
|
|
@@ -22,6 +22,7 @@ Explicitly instrumenting a single client session:
|
|
22
22
|
|
23
23
|
.. code:: python
|
24
24
|
|
25
|
+
import asyncio
|
25
26
|
import aiohttp
|
26
27
|
from opentelemetry.instrumentation.aiohttp_client import create_trace_config
|
27
28
|
import yarl
|
@@ -29,17 +30,21 @@ Explicitly instrumenting a single client session:
|
|
29
30
|
def strip_query_params(url: yarl.URL) -> str:
|
30
31
|
return str(url.with_query(None))
|
31
32
|
|
32
|
-
async
|
33
|
+
async def get(url):
|
34
|
+
async with aiohttp.ClientSession(trace_configs=[create_trace_config(
|
33
35
|
# Remove all query params from the URL attribute on the span.
|
34
36
|
url_filter=strip_query_params,
|
35
|
-
|
36
|
-
|
37
|
-
|
37
|
+
)]) as session:
|
38
|
+
async with session.get(url) as response:
|
39
|
+
await response.text()
|
40
|
+
|
41
|
+
asyncio.run(get("https://example.com"))
|
38
42
|
|
39
43
|
Instrumenting all client sessions:
|
40
44
|
|
41
45
|
.. code:: python
|
42
46
|
|
47
|
+
import asyncio
|
43
48
|
import aiohttp
|
44
49
|
from opentelemetry.instrumentation.aiohttp_client import (
|
45
50
|
AioHttpClientInstrumentor
|
@@ -49,9 +54,12 @@ Instrumenting all client sessions:
|
|
49
54
|
AioHttpClientInstrumentor().instrument()
|
50
55
|
|
51
56
|
# Create a session and make an HTTP get request
|
52
|
-
async
|
53
|
-
async with
|
54
|
-
|
57
|
+
async def get(url):
|
58
|
+
async with aiohttp.ClientSession() as session:
|
59
|
+
async with session.get(url) as response:
|
60
|
+
await response.text()
|
61
|
+
|
62
|
+
asyncio.run(get("https://example.com"))
|
55
63
|
|
56
64
|
Configuration
|
57
65
|
-------------
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|