opentelemetry-instrumentation-tornado 0.45b0__tar.gz → 0.47b0__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_tornado-0.45b0 → opentelemetry_instrumentation_tornado-0.47b0}/.gitignore +3 -0
- {opentelemetry_instrumentation_tornado-0.45b0 → opentelemetry_instrumentation_tornado-0.47b0}/LICENSE +1 -1
- {opentelemetry_instrumentation_tornado-0.45b0 → opentelemetry_instrumentation_tornado-0.47b0}/PKG-INFO +5 -4
- {opentelemetry_instrumentation_tornado-0.45b0 → opentelemetry_instrumentation_tornado-0.47b0}/pyproject.toml +4 -3
- {opentelemetry_instrumentation_tornado-0.45b0 → opentelemetry_instrumentation_tornado-0.47b0}/src/opentelemetry/instrumentation/tornado/__init__.py +6 -6
- {opentelemetry_instrumentation_tornado-0.45b0 → opentelemetry_instrumentation_tornado-0.47b0}/src/opentelemetry/instrumentation/tornado/version.py +1 -1
- {opentelemetry_instrumentation_tornado-0.45b0 → opentelemetry_instrumentation_tornado-0.47b0}/README.rst +0 -0
- {opentelemetry_instrumentation_tornado-0.45b0 → opentelemetry_instrumentation_tornado-0.47b0}/src/opentelemetry/instrumentation/tornado/client.py +0 -0
- {opentelemetry_instrumentation_tornado-0.45b0 → opentelemetry_instrumentation_tornado-0.47b0}/src/opentelemetry/instrumentation/tornado/package.py +0 -0
- {opentelemetry_instrumentation_tornado-0.45b0 → opentelemetry_instrumentation_tornado-0.47b0}/tests/__init__.py +0 -0
- {opentelemetry_instrumentation_tornado-0.45b0 → opentelemetry_instrumentation_tornado-0.47b0}/tests/test_instrumentation.py +0 -0
- {opentelemetry_instrumentation_tornado-0.45b0 → opentelemetry_instrumentation_tornado-0.47b0}/tests/test_metrics_instrumentation.py +0 -0
- {opentelemetry_instrumentation_tornado-0.45b0 → opentelemetry_instrumentation_tornado-0.47b0}/tests/tornado_test_app.py +0 -0
@@ -186,7 +186,7 @@
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
187
187
|
identification within third-party archives.
|
188
188
|
|
189
|
-
Copyright
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
190
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
192
192
|
you may not use this file except in compliance with the License.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: opentelemetry-instrumentation-tornado
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.47b0
|
4
4
|
Summary: Tornado instrumentation for OpenTelemetry
|
5
5
|
Project-URL: Homepage, https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-tornado
|
6
6
|
Author-email: OpenTelemetry Authors <cncf-opentelemetry-contributors@lists.cncf.io>
|
@@ -14,11 +14,12 @@ Classifier: Programming Language :: Python :: 3.8
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.9
|
15
15
|
Classifier: Programming Language :: Python :: 3.10
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
17
18
|
Requires-Python: >=3.8
|
18
19
|
Requires-Dist: opentelemetry-api~=1.12
|
19
|
-
Requires-Dist: opentelemetry-instrumentation==0.
|
20
|
-
Requires-Dist: opentelemetry-semantic-conventions==0.
|
21
|
-
Requires-Dist: opentelemetry-util-http==0.
|
20
|
+
Requires-Dist: opentelemetry-instrumentation==0.47b0
|
21
|
+
Requires-Dist: opentelemetry-semantic-conventions==0.47b0
|
22
|
+
Requires-Dist: opentelemetry-util-http==0.47b0
|
22
23
|
Provides-Extra: instruments
|
23
24
|
Requires-Dist: tornado>=5.1.1; extra == 'instruments'
|
24
25
|
Description-Content-Type: text/x-rst
|
@@ -21,12 +21,13 @@ classifiers = [
|
|
21
21
|
"Programming Language :: Python :: 3.9",
|
22
22
|
"Programming Language :: Python :: 3.10",
|
23
23
|
"Programming Language :: Python :: 3.11",
|
24
|
+
"Programming Language :: Python :: 3.12",
|
24
25
|
]
|
25
26
|
dependencies = [
|
26
27
|
"opentelemetry-api ~= 1.12",
|
27
|
-
"opentelemetry-instrumentation == 0.
|
28
|
-
"opentelemetry-semantic-conventions == 0.
|
29
|
-
"opentelemetry-util-http == 0.
|
28
|
+
"opentelemetry-instrumentation == 0.47b0",
|
29
|
+
"opentelemetry-semantic-conventions == 0.47b0",
|
30
|
+
"opentelemetry-util-http == 0.47b0",
|
30
31
|
]
|
31
32
|
|
32
33
|
[project.optional-dependencies]
|
@@ -87,14 +87,14 @@ created span and some other contextual information. Example:
|
|
87
87
|
# will be called after a outgoing request made with
|
88
88
|
# `tornado.httpclient.AsyncHTTPClient.fetch` finishes.
|
89
89
|
# `response`` is an instance of ``Future[tornado.httpclient.HTTPResponse]`.
|
90
|
-
def
|
90
|
+
def client_response_hook(span, future):
|
91
91
|
pass
|
92
92
|
|
93
93
|
# apply tornado instrumentation with hooks
|
94
94
|
TornadoInstrumentor().instrument(
|
95
95
|
server_request_hook=server_request_hook,
|
96
96
|
client_request_hook=client_request_hook,
|
97
|
-
client_response_hook=
|
97
|
+
client_response_hook=client_response_hook
|
98
98
|
)
|
99
99
|
|
100
100
|
Capture HTTP request and response headers
|
@@ -296,7 +296,7 @@ def _create_server_histograms(meter) -> Dict[str, Histogram]:
|
|
296
296
|
MetricInstruments.HTTP_SERVER_DURATION: meter.create_histogram(
|
297
297
|
name=MetricInstruments.HTTP_SERVER_DURATION,
|
298
298
|
unit="ms",
|
299
|
-
description="Duration of HTTP
|
299
|
+
description="Duration of HTTP server requests.",
|
300
300
|
),
|
301
301
|
MetricInstruments.HTTP_SERVER_REQUEST_SIZE: meter.create_histogram(
|
302
302
|
name=MetricInstruments.HTTP_SERVER_REQUEST_SIZE,
|
@@ -455,9 +455,9 @@ def _get_attributes_from_request(request):
|
|
455
455
|
if hasattr(request.connection, "context") and getattr(
|
456
456
|
request.connection.context, "_orig_remote_ip", None
|
457
457
|
):
|
458
|
-
attrs[
|
459
|
-
|
460
|
-
|
458
|
+
attrs[SpanAttributes.NET_PEER_IP] = (
|
459
|
+
request.connection.context._orig_remote_ip
|
460
|
+
)
|
461
461
|
|
462
462
|
return extract_attributes_from_object(
|
463
463
|
request, _traced_request_attrs, attrs
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|