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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opentelemetry-instrumentation-aiohttp-client
3
- Version: 0.51b0
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.51b0
24
- Requires-Dist: opentelemetry-semantic-conventions==0.51b0
25
- Requires-Dist: opentelemetry-util-http==0.51b0
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.51b0",
31
- "opentelemetry-semantic-conventions == 0.51b0",
32
- "opentelemetry-util-http == 0.51b0",
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 with aiohttp.ClientSession(trace_configs=[create_trace_config(
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
- )]) as session:
36
- async with session.get(url) as response:
37
- await response.text()
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 with aiohttp.ClientSession() as session:
53
- async with session.get(url) as response:
54
- await response.text()
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
  -------------
@@ -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.51b0"
15
+ __version__ = "0.52b0"