Skip to content

Commit

Permalink
Laravel: nullify missing attributes to reduce noise.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLightfootWild committed Oct 2, 2024
1 parent 45a6932 commit ee8cebe
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ public function recordRequest(RequestSending $request): void
->setAttributes([
TraceAttributes::HTTP_REQUEST_METHOD => $request->request->method(),
TraceAttributes::URL_FULL => $processedUrl,
TraceAttributes::URL_PATH => $parsedUrl['path'] ?? '',
TraceAttributes::URL_SCHEME => $parsedUrl['scheme'] ?? '',
TraceAttributes::SERVER_ADDRESS => $parsedUrl['host'] ?? '',
TraceAttributes::SERVER_PORT => $parsedUrl['port'] ?? '',
TraceAttributes::URL_PATH => $parsedUrl['path'] ?? null,
TraceAttributes::URL_SCHEME => $parsedUrl['scheme'] ?? null,
TraceAttributes::SERVER_ADDRESS => $parsedUrl['host'] ?? null,
TraceAttributes::SERVER_PORT => $parsedUrl['port'] ?? null,
])
->startSpan();
$this->spans[$this->createRequestComparisonHash($request->request)] = $span;
Expand Down

0 comments on commit ee8cebe

Please sign in to comment.