Skip to content

Commit b494199

Browse files
Update CodeIgniterInstrumentation.php
1 parent 2a04e50 commit b494199

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Instrumentation/CodeIgniter/src/CodeIgniterInstrumentation.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,8 @@ public static function register(): void
149149
$span->setAttribute(TraceAttributes::HTTP_ROUTE, $routeName);
150150

151151
// Update span name to follow OpenTelemetry HTTP naming convention: {http.method} {http.route}
152-
$request = $requestProperty->getValue($igniter);
153-
$method = ($request instanceof RequestInterface) ? $request->getMethod() : 'unknown';
154-
$span->updateName(sprintf('%s %s', $method, $routeName));
152+
$spanName = $span->getName();
153+
$span->updateName(sprintf('%s %s', $spanName, $routeName));
155154

156155
}
157156

0 commit comments

Comments
 (0)