Skip to content

Commit f7a133e

Browse files
authored
add traces attributes (#214)
1 parent d89e2b5 commit f7a133e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/SymfonyInstrumentation.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ public static function register(): void
5757
->setAttribute(TraceAttributes::HTTP_REQUEST_BODY_SIZE, $request->headers->get('Content-Length'))
5858
->setAttribute(TraceAttributes::URL_SCHEME, $request->getScheme())
5959
->setAttribute(TraceAttributes::URL_PATH, $request->getPathInfo())
60+
->setAttribute(TraceAttributes::USER_AGENT_ORIGINAL, $request->headers->get('User-Agent'))
61+
->setAttribute(TraceAttributes::SERVER_ADDRESS, $request->getHost())
62+
->setAttribute(TraceAttributes::SERVER_PORT, $request->getPort())
6063
->startSpan();
6164
$request->attributes->set(SpanInterface::class, $span);
6265
} else {

0 commit comments

Comments
 (0)