Skip to content

Commit

Permalink
Assumes the root path (/) for urls without declared paths (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-angeli-gimenes authored Nov 8, 2023
1 parent 6804d04 commit 25e2567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Aspect/HttpClientMetricAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function process(ProceedingJoinPoint $proceedingJoinPoint)
$host = $base_uri === null ? (parse_url($uri, PHP_URL_HOST) ?? '') : $base_uri->getHost();

$labels = [
'uri' => SupportUri::sanitize(parse_url($uri, PHP_URL_PATH)),
'uri' => SupportUri::sanitize(parse_url($uri, PHP_URL_PATH) ?? '/'),
'host' => $host,
'method' => $method,
'http_status_code' => '200',
Expand Down

0 comments on commit 25e2567

Please sign in to comment.