File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
opentelemetry-instrumentation-urllib3
src/opentelemetry/instrumentation/urllib3 Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 4040| [ opentelemetry-instrumentation-system-metrics] ( ./opentelemetry-instrumentation-system-metrics ) | psutil >= 5 | No
4141| [ opentelemetry-instrumentation-tornado] ( ./opentelemetry-instrumentation-tornado ) | tornado >= 5.1.1 | No
4242| [ 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
4444| [ opentelemetry-instrumentation-wsgi] ( ./opentelemetry-instrumentation-wsgi ) | wsgi | Yes
Original file line number Diff line number Diff line change 1414
1515
1616_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):
103103 super ().tearDown ()
104104 URLLib3Instrumentor ().uninstrument ()
105105
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+
106119 def test_basic_metric_check_client_size_get (self ):
107120 with urllib3 .PoolManager () as pool :
108121 start_time = default_timer ()
You can’t perform that action at this time.
0 commit comments