File tree 3 files changed +16
-1
lines changed
opentelemetry-instrumentation-urllib3
src/opentelemetry/instrumentation/urllib3
3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 40
40
| [ opentelemetry-instrumentation-system-metrics] ( ./opentelemetry-instrumentation-system-metrics ) | psutil >= 5 | No
41
41
| [ opentelemetry-instrumentation-tornado] ( ./opentelemetry-instrumentation-tornado ) | tornado >= 5.1.1 | No
42
42
| [ opentelemetry-instrumentation-urllib] ( ./opentelemetry-instrumentation-urllib ) | urllib | No
43
- | [ opentelemetry-instrumentation-urllib3] ( ./opentelemetry-instrumentation-urllib3 ) | urllib3 >= 1.0.0, < 2.0.0 | No
43
+ | [ opentelemetry-instrumentation-urllib3] ( ./opentelemetry-instrumentation-urllib3 ) | urllib3 >= 1.0.0, < 2.0.0 | Yes
44
44
| [ opentelemetry-instrumentation-wsgi] ( ./opentelemetry-instrumentation-wsgi ) | wsgi | Yes
Original file line number Diff line number Diff line change 14
14
15
15
16
16
_instruments = ("urllib3 >= 1.0.0, < 2.0.0" ,)
17
+
18
+ _supports_metrics = True
Original file line number Diff line number Diff line change @@ -103,6 +103,19 @@ def tearDown(self):
103
103
super ().tearDown ()
104
104
URLLib3Instrumentor ().uninstrument ()
105
105
106
+ def test_metric_uninstrument (self ):
107
+ with urllib3 .PoolManager () as pool :
108
+ pool .request ("GET" , self .http_url )
109
+ URLLib3Instrumentor ().uninstrument ()
110
+ pool .request ("GET" , self .http_url )
111
+
112
+ metrics_list = self .memory_metrics_reader .get_metrics_data ()
113
+ for resource_metric in metrics_list .resource_metrics :
114
+ for scope_metric in resource_metric .scope_metrics :
115
+ for metric in scope_metric .metrics :
116
+ for point in list (metric .data .data_points ):
117
+ self .assertEqual (point .count , 1 )
118
+
106
119
def test_basic_metric_check_client_size_get (self ):
107
120
with urllib3 .PoolManager () as pool :
108
121
start_time = default_timer ()
You can’t perform that action at this time.
0 commit comments