setTag('app', 'api'); $scope->setTag('http.method', $request->method()); $routeName = $request->route()?->getName(); if (is_string($routeName) && $routeName !== '') { $scope->setTag('route_name', $routeName); } }); return $next($request); } }