File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,12 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint)
4545 $ uri = $ arguments ['keys ' ]['uri ' ] ?? '' ;
4646 $ host = $ base_uri === null ? (parse_url ($ uri , PHP_URL_HOST ) ?? '' ) : $ base_uri ->getHost ();
4747
48+ $ uri = $ this ->shouldIgnoreUri ($ instance )
49+ ? '<IGNORED> '
50+ : SupportUri::sanitize (parse_url ($ uri , PHP_URL_PATH ) ?? '/ ' );
51+
4852 $ labels = [
49- 'uri ' => SupportUri:: sanitize ( parse_url ( $ uri, PHP_URL_PATH ) ?? ' / ' ) ,
53+ 'uri ' => $ uri ,
5054 'host ' => $ host ,
5155 'method ' => $ method ,
5256 'http_status_code ' => '200 ' ,
@@ -66,6 +70,11 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint)
6670 return $ result ;
6771 }
6872
73+ private function shouldIgnoreUri (Client $ instance ): bool
74+ {
75+ return $ instance ->getConfig ('ignore_uri ' ) === true ;
76+ }
77+
6978 private function onFullFilled (Timer $ timer , array $ labels ): callable
7079 {
7180 return function (ResponseInterface $ response ) use ($ timer , $ labels ) {
You can’t perform that action at this time.
0 commit comments