opentelemetry-instrumentation-aiohttp-client 0.41b0__tar.gz → 0.43b0__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.41b0 → opentelemetry_instrumentation_aiohttp_client-0.43b0}/PKG-INFO +4 -4
- {opentelemetry_instrumentation_aiohttp_client-0.41b0 → opentelemetry_instrumentation_aiohttp_client-0.43b0}/pyproject.toml +3 -3
- {opentelemetry_instrumentation_aiohttp_client-0.41b0 → opentelemetry_instrumentation_aiohttp_client-0.43b0}/src/opentelemetry/instrumentation/aiohttp_client/__init__.py +6 -1
- {opentelemetry_instrumentation_aiohttp_client-0.41b0 → opentelemetry_instrumentation_aiohttp_client-0.43b0}/src/opentelemetry/instrumentation/aiohttp_client/version.py +1 -1
- {opentelemetry_instrumentation_aiohttp_client-0.41b0 → opentelemetry_instrumentation_aiohttp_client-0.43b0}/tests/test_aiohttp_client_integration.py +23 -2
- {opentelemetry_instrumentation_aiohttp_client-0.41b0 → opentelemetry_instrumentation_aiohttp_client-0.43b0}/.gitignore +0 -0
- {opentelemetry_instrumentation_aiohttp_client-0.41b0 → opentelemetry_instrumentation_aiohttp_client-0.43b0}/LICENSE +0 -0
- {opentelemetry_instrumentation_aiohttp_client-0.41b0 → opentelemetry_instrumentation_aiohttp_client-0.43b0}/README.rst +0 -0
- {opentelemetry_instrumentation_aiohttp_client-0.41b0 → opentelemetry_instrumentation_aiohttp_client-0.43b0}/src/opentelemetry/instrumentation/aiohttp_client/package.py +0 -0
- {opentelemetry_instrumentation_aiohttp_client-0.41b0 → opentelemetry_instrumentation_aiohttp_client-0.43b0}/tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: opentelemetry-instrumentation-aiohttp-client
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.43b0
|
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
|
Author-email: OpenTelemetry Authors <cncf-opentelemetry-contributors@lists.cncf.io>
|
@@ -18,9 +18,9 @@ Classifier: Programming Language :: Python :: 3.10
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.11
|
19
19
|
Requires-Python: >=3.7
|
20
20
|
Requires-Dist: opentelemetry-api~=1.12
|
21
|
-
Requires-Dist: opentelemetry-instrumentation==0.
|
22
|
-
Requires-Dist: opentelemetry-semantic-conventions==0.
|
23
|
-
Requires-Dist: opentelemetry-util-http==0.
|
21
|
+
Requires-Dist: opentelemetry-instrumentation==0.43b0
|
22
|
+
Requires-Dist: opentelemetry-semantic-conventions==0.43b0
|
23
|
+
Requires-Dist: opentelemetry-util-http==0.43b0
|
24
24
|
Requires-Dist: wrapt<2.0.0,>=1.0.0
|
25
25
|
Provides-Extra: instruments
|
26
26
|
Requires-Dist: aiohttp~=3.0; extra == 'instruments'
|
@@ -26,9 +26,9 @@ classifiers = [
|
|
26
26
|
]
|
27
27
|
dependencies = [
|
28
28
|
"opentelemetry-api ~= 1.12",
|
29
|
-
"opentelemetry-instrumentation == 0.
|
30
|
-
"opentelemetry-semantic-conventions == 0.
|
31
|
-
"opentelemetry-util-http == 0.
|
29
|
+
"opentelemetry-instrumentation == 0.43b0",
|
30
|
+
"opentelemetry-semantic-conventions == 0.43b0",
|
31
|
+
"opentelemetry-util-http == 0.43b0",
|
32
32
|
"wrapt >= 1.0.0, < 2.0.0",
|
33
33
|
]
|
34
34
|
|
@@ -163,7 +163,12 @@ def create_trace_config(
|
|
163
163
|
# Explicitly specify the type for the `request_hook` and `response_hook` param and rtype to work
|
164
164
|
# around this issue.
|
165
165
|
|
166
|
-
tracer = get_tracer(
|
166
|
+
tracer = get_tracer(
|
167
|
+
__name__,
|
168
|
+
__version__,
|
169
|
+
tracer_provider,
|
170
|
+
schema_url="https://opentelemetry.io/schemas/1.11.0",
|
171
|
+
)
|
167
172
|
|
168
173
|
def _end_trace(trace_config_ctx: types.SimpleNamespace):
|
169
174
|
context_api.detach(trace_config_ctx.token)
|
@@ -14,6 +14,7 @@
|
|
14
14
|
|
15
15
|
import asyncio
|
16
16
|
import contextlib
|
17
|
+
import sys
|
17
18
|
import typing
|
18
19
|
import unittest
|
19
20
|
import urllib.parse
|
@@ -116,6 +117,11 @@ class TestAioHttpIntegration(TestBase):
|
|
116
117
|
status_code=status_code,
|
117
118
|
)
|
118
119
|
|
120
|
+
url = f"http://{host}:{port}/test-path?query=param#foobar"
|
121
|
+
# if python version is < 3.8, then the url will be
|
122
|
+
if sys.version_info[1] < 8:
|
123
|
+
url = f"http://{host}:{port}/test-path#foobar"
|
124
|
+
|
119
125
|
self.assert_spans(
|
120
126
|
[
|
121
127
|
(
|
@@ -123,7 +129,7 @@ class TestAioHttpIntegration(TestBase):
|
|
123
129
|
(span_status, None),
|
124
130
|
{
|
125
131
|
SpanAttributes.HTTP_METHOD: "GET",
|
126
|
-
SpanAttributes.HTTP_URL:
|
132
|
+
SpanAttributes.HTTP_URL: url,
|
127
133
|
SpanAttributes.HTTP_STATUS_CODE: int(
|
128
134
|
status_code
|
129
135
|
),
|
@@ -134,6 +140,21 @@ class TestAioHttpIntegration(TestBase):
|
|
134
140
|
|
135
141
|
self.memory_exporter.clear()
|
136
142
|
|
143
|
+
def test_schema_url(self):
|
144
|
+
with self.subTest(status_code=200):
|
145
|
+
self._http_request(
|
146
|
+
trace_config=aiohttp_client.create_trace_config(),
|
147
|
+
url="/test-path?query=param#foobar",
|
148
|
+
status_code=200,
|
149
|
+
)
|
150
|
+
|
151
|
+
span = self.memory_exporter.get_finished_spans()[0]
|
152
|
+
self.assertEqual(
|
153
|
+
span.instrumentation_info.schema_url,
|
154
|
+
"https://opentelemetry.io/schemas/1.11.0",
|
155
|
+
)
|
156
|
+
self.memory_exporter.clear()
|
157
|
+
|
137
158
|
def test_not_recording(self):
|
138
159
|
mock_tracer = mock.Mock()
|
139
160
|
mock_span = mock.Mock()
|
@@ -141,7 +162,7 @@ class TestAioHttpIntegration(TestBase):
|
|
141
162
|
mock_tracer.start_span.return_value = mock_span
|
142
163
|
with mock.patch("opentelemetry.trace.get_tracer"):
|
143
164
|
# pylint: disable=W0612
|
144
|
-
|
165
|
+
self._http_request(
|
145
166
|
trace_config=aiohttp_client.create_trace_config(),
|
146
167
|
url="/test-path?query=param#foobar",
|
147
168
|
)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|