Skip to content

Commit

Permalink
Update deprecated attributes (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
weslenteche authored Oct 20, 2023
1 parent 6ec34b4 commit f58bbf8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public function recordRequest(RequestSending $request): void
TraceAttributes::HTTP_REQUEST_METHOD => $request->request->method(),
TraceAttributes::URL_FULL => $processedUrl,
TraceAttributes::URL_PATH => $parsedUrl['path'] ?? '',
TraceAttributes::HTTP_HOST => $parsedUrl['host'] ?? '',
TraceAttributes::URL_SCHEME => $parsedUrl['scheme'] ?? '',
TraceAttributes::SERVER_ADDRESS => $parsedUrl['host'] ?? '',
TraceAttributes::SERVER_PORT => $parsedUrl['port'] ?? '',
Expand Down
2 changes: 1 addition & 1 deletion src/Instrumentation/Psr18/src/Psr18Instrumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static function register(): void
->setAttribute(TraceAttributes::URL_FULL, (string) $request->getUri())
->setAttribute(TraceAttributes::HTTP_REQUEST_METHOD, $request->getMethod())
->setAttribute(TraceAttributes::NETWORK_PROTOCOL_VERSION, $request->getProtocolVersion())
->setAttribute(TraceAttributes::HTTP_USER_AGENT, $request->getHeaderLine('User-Agent'))
->setAttribute(TraceAttributes::USER_AGENT_ORIGINAL, $request->getHeaderLine('User-Agent'))
->setAttribute(TraceAttributes::HTTP_REQUEST_BODY_SIZE, $request->getHeaderLine('Content-Length'))
->setAttribute(TraceAttributes::SERVER_ADDRESS, $request->getUri()->getHost())
->setAttribute(TraceAttributes::SERVER_PORT, $request->getUri()->getPort())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function: 'wp_initial_constants',
->setAttribute(TraceAttributes::URL_FULL, (string) $request->getUri())
->setAttribute(TraceAttributes::HTTP_REQUEST_METHOD, $request->getMethod())
->setAttribute(TraceAttributes::NETWORK_PROTOCOL_VERSION, $request->getProtocolVersion())
->setAttribute(TraceAttributes::HTTP_USER_AGENT, $request->getHeaderLine('User-Agent'))
->setAttribute(TraceAttributes::USER_AGENT_ORIGINAL, $request->getHeaderLine('User-Agent'))
->setAttribute(TraceAttributes::HTTP_REQUEST_BODY_SIZE, $request->getHeaderLine('Content-Length'))
->setAttribute(TraceAttributes::CLIENT_ADDRESS, $request->getUri()->getHost())
->setAttribute(TraceAttributes::CLIENT_PORT, $request->getUri()->getPort())
Expand Down

0 comments on commit f58bbf8

Please sign in to comment.