diff --git a/Cargo.lock b/Cargo.lock index 14963fd9b4..c79063463e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1316,6 +1316,7 @@ dependencies = [ "rmp-serde", "serde", "serde_json", + "tinybytes", "tokio", "tokio-util", "uuid", @@ -1984,7 +1985,6 @@ dependencies = [ "datadog-trace-protobuf", "ddcommon 0.0.1", "http 0.2.11", - "hyper 0.14.28", "serde", "tracing", ] diff --git a/appsec/tests/integration/src/docker/php/build_dev_php.sh b/appsec/tests/integration/src/docker/php/build_dev_php.sh index 4221002b61..ed6e1ed9c0 100755 --- a/appsec/tests/integration/src/docker/php/build_dev_php.sh +++ b/appsec/tests/integration/src/docker/php/build_dev_php.sh @@ -80,6 +80,21 @@ EOD chmod +x /tmp/apxs_wrapper } +function run_dsymutil { + if [[ $(uname) != Darwin ]] then + return + fi + local readonly dir=$1 exe= + find "$dir" -type f -exec test -x '{}' \; -print | while read -r exe; do + if ! grep -q '^#!' "$exe"; then + local readonly dSYM_DIR="${exe}.dSYM" + if [[ ! -d $dSYM_DIR ]]; then + dsymutil "$exe" + fi + fi + done +} + function get_xdebug_version { local -r version=$1 local readonly version_id=$(php_version_id $version) @@ -294,6 +309,7 @@ function build_php { make install-sapi || true make install-binaries install-headers install-modules install-programs install-build + run_dsymutil "$prefix_dir" rm -rf "$build_dir" cd - } @@ -462,11 +478,12 @@ function install_xdebug { "$php_prefix/bin/phpize" mkdir -p "$build_dir" cd "$build_dir" - "$xdebug_source_dir/configure" "--with-php-config=$php_prefix/bin/php-config" + CFLAGS="$CFLAGS -ggdb" "$xdebug_source_dir/configure" "--with-php-config=$php_prefix/bin/php-config" make -j make install cd - + run_dsymutil "$php_prefix/lib" rm -rf "$build_dir" } diff --git a/appsec/tests/integration/src/test/www/symfony62/config/packages/test/framework.yaml b/appsec/tests/integration/src/test/www/symfony62/config/packages/test/framework.yaml index d051c84008..ee44ae54c1 100644 --- a/appsec/tests/integration/src/test/www/symfony62/config/packages/test/framework.yaml +++ b/appsec/tests/integration/src/test/www/symfony62/config/packages/test/framework.yaml @@ -1,4 +1,4 @@ framework: test: true session: - storage_id: session.storage.mock_file + storage_factory_id: session.storage.factory.mock_file diff --git a/appsec/tests/integration/src/test/www/symfony62/src/Controller/HomeController.php b/appsec/tests/integration/src/test/www/symfony62/src/Controller/HomeController.php index ba2f481df4..7fbe2fc90e 100644 --- a/appsec/tests/integration/src/test/www/symfony62/src/Controller/HomeController.php +++ b/appsec/tests/integration/src/test/www/symfony62/src/Controller/HomeController.php @@ -21,13 +21,11 @@ public function homeAction(Request $request) ); } - /** - * @Route("/dynamic-path/{param01}", name="dynamic-path") - */ - public function dynamicAction(Request $request) + #[Route("/dynamic-path/{param01}")] + public function dynamicAction(Request $request, string $param01) { return new Response( - 'Hi!' + "Hi $param01!" ); } } diff --git a/docker-compose.yml b/docker-compose.yml index 39e19d3b68..edfe5a2c69 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -246,7 +246,7 @@ services: test-agent: image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:latest ports: - - "127.0.0.1:9126:8126" + - "9126:9126" volumes: - ./tests/snapshots:/snapshots environment: diff --git a/src/DDTrace/Integrations/Symfony/SymfonyIntegration.php b/src/DDTrace/Integrations/Symfony/SymfonyIntegration.php index c633513ec0..80668f9d9c 100644 --- a/src/DDTrace/Integrations/Symfony/SymfonyIntegration.php +++ b/src/DDTrace/Integrations/Symfony/SymfonyIntegration.php @@ -10,7 +10,9 @@ use DDTrace\Type; use DDTrace\Util\Normalizer; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Event\ControllerEvent; use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\Routing\Route; class SymfonyIntegration extends Integration { @@ -307,6 +309,42 @@ function ($This, $scope, $args) use ($integration) { } ); + \DDTrace\trace_method( + 'Symfony\Component\EventDispatcher\EventDispatcher', + 'dispatch', + function (SpanData $span, $args) { + $event = $args[0]; + + if (!($event instanceof ControllerEvent)) { + return; + } + + $request = $event->getRequest(); + $controller = $event->getController()[0]; + + if (!property_exists($controller, 'container')) { + return; + } + + $rc = new \ReflectionClass(get_class($controller)); + $container = $rc->getProperty('container'); + $container->setAccessible(true); + $container = $container->getValue($controller); + + $router = $container->get('router'); + $routeName = $request->attributes->get('_route'); + + $routeCollection = $router->getRouteCollection(); + /** @var Route $route */ + $route = $routeCollection->get($routeName); + if (!isset($route)) { + return; + } + $root_span = \DDTrace\root_span(); + $root_span->meta[Tag::HTTP_ROUTE] = $route->getPath(); + } + ); + $this->loadSymfony($this); return Integration::LOADED; @@ -394,7 +432,7 @@ function (SpanData $span, $args, $response) use ($integration) { $parameters = $request->get('_route_params'); if (!empty($parameters) && is_array($parameters) && - function_exists('\datadog\appsec\push_address')) { + function_exists('datadog\appsec\push_address')) { \datadog\appsec\push_address("server.request.path_params", $parameters); } diff --git a/tests/Common/TracerTestTrait.php b/tests/Common/TracerTestTrait.php index 3390ad9468..e783497351 100644 --- a/tests/Common/TracerTestTrait.php +++ b/tests/Common/TracerTestTrait.php @@ -310,7 +310,7 @@ public function tracesFromWebRequest($fn, $tracer = null, callable $until = null // Clearing existing dumped file $this->resetRequestDumper(); - // The we server has to be configured to send traces to the provided requests dumper. + // The web server has to be configured to send traces to the provided requests dumper. $fn($tracer); self::putEnv('DD_TRACE_SHUTDOWN_TIMEOUT'); diff --git a/tests/Common/WebFrameworkTestCase.php b/tests/Common/WebFrameworkTestCase.php index c1ae0bdadb..059e318607 100644 --- a/tests/Common/WebFrameworkTestCase.php +++ b/tests/Common/WebFrameworkTestCase.php @@ -141,9 +141,18 @@ protected static function getInis() // The following values should be made configurable from the outside. I could not get env XDEBUG_CONFIG // to work setting it both in docker-compose.yml and in `getEnvs()` above, but that should be the best // option. + 'xdebug.start_with_request' => 'yes', + + // 2 'xdebug.remote_enable' => 1, 'xdebug.remote_host' => 'host.docker.internal', 'xdebug.remote_autostart' => 1, + // 'xdebug.remote_log' => '/tmp/xdebug.log', + + // 3 + 'xdebug.mode' => 'develop,debug', + 'xdebug.client_host' => 'host.docker.internal', + // 'xdebug.log' => '/tmp/xdebug.log', ] + ($enableOpcache ? ["zend_extension" => "opcache.so"] : []); } diff --git a/tests/Frameworks/Symfony/Version_6_2/src/Controller/CommonScenariosController.php b/tests/Frameworks/Symfony/Version_6_2/src/Controller/CommonScenariosController.php index ec2777c2e4..3a631f694c 100644 --- a/tests/Frameworks/Symfony/Version_6_2/src/Controller/CommonScenariosController.php +++ b/tests/Frameworks/Symfony/Version_6_2/src/Controller/CommonScenariosController.php @@ -10,9 +10,7 @@ class CommonScenariosController extends AbstractController { - /** - * @Route("/simple", name="simple") - */ + #[Route("/simple", name:"simple")] public function simpleAction(Request $request) { // replace this example code with whatever you need @@ -21,9 +19,7 @@ public function simpleAction(Request $request) ); } - /** - * @Route("/simple_view", name="simple_view") - */ + #[Route("/simple_view", name:"simple_view")] public function simpleViewAction(Request $request) { // replace this example code with whatever you need @@ -43,9 +39,9 @@ public function dynamicWithOptionalsAction($param01, $param02) } /** - * @Route("/error", name="error") * @throws \Exception */ + #[Route("/error", name:"error")] public function errorAction(Request $request) { throw new \Exception('An exception occurred'); diff --git a/tests/Integrations/Symfony/V3_0/CommonScenariosTest.php b/tests/Integrations/Symfony/V3_0/CommonScenariosTest.php index 4f9d14068d..3e99d03780 100644 --- a/tests/Integrations/Symfony/V3_0/CommonScenariosTest.php +++ b/tests/Integrations/Symfony/V3_0/CommonScenariosTest.php @@ -42,6 +42,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple?key=value&', 'http.status_code' => '200', @@ -79,6 +80,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\CommonScenariosController@simpleViewAction', 'symfony.route.name' => 'simple_view', + 'http.route' => '/simple_view', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple_view?key=value&', 'http.status_code' => '200', @@ -125,6 +127,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\CommonScenariosController@errorAction', 'symfony.route.name' => 'error', + 'http.route' => '/error', 'http.method' => 'GET', 'http.url' => 'http://localhost/error?key=value&', 'http.status_code' => '500', diff --git a/tests/Integrations/Symfony/V3_0/TraceSearchConfigTest.php b/tests/Integrations/Symfony/V3_0/TraceSearchConfigTest.php index 82be10bfa6..bf934a5c46 100644 --- a/tests/Integrations/Symfony/V3_0/TraceSearchConfigTest.php +++ b/tests/Integrations/Symfony/V3_0/TraceSearchConfigTest.php @@ -42,6 +42,7 @@ public function testScenario() )->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple', 'http.status_code' => '200', diff --git a/tests/Integrations/Symfony/V3_3/CommonScenariosTest.php b/tests/Integrations/Symfony/V3_3/CommonScenariosTest.php index 7e6d402ec9..ba0c97b767 100644 --- a/tests/Integrations/Symfony/V3_3/CommonScenariosTest.php +++ b/tests/Integrations/Symfony/V3_3/CommonScenariosTest.php @@ -42,6 +42,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple?key=value&', 'http.status_code' => '200', @@ -80,6 +81,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\CommonScenariosController@simpleViewAction', 'symfony.route.name' => 'simple_view', + 'http.route' => '/simple_view', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple_view?key=value&', 'http.status_code' => '200', @@ -127,6 +129,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\CommonScenariosController@errorAction', 'symfony.route.name' => 'error', + 'http.route' => '/error', 'http.method' => 'GET', 'http.url' => 'http://localhost/error?key=value&', 'http.status_code' => '500', diff --git a/tests/Integrations/Symfony/V3_3/TraceSearchConfigTest.php b/tests/Integrations/Symfony/V3_3/TraceSearchConfigTest.php index 2c9478e5a3..8763eda8e4 100644 --- a/tests/Integrations/Symfony/V3_3/TraceSearchConfigTest.php +++ b/tests/Integrations/Symfony/V3_3/TraceSearchConfigTest.php @@ -42,6 +42,7 @@ public function testScenario() )->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple', 'http.status_code' => '200', diff --git a/tests/Integrations/Symfony/V3_4/AutofinishedTracesSymfony34Test.php b/tests/Integrations/Symfony/V3_4/AutofinishedTracesSymfony34Test.php index 5e69751943..1dfb248b71 100644 --- a/tests/Integrations/Symfony/V3_4/AutofinishedTracesSymfony34Test.php +++ b/tests/Integrations/Symfony/V3_4/AutofinishedTracesSymfony34Test.php @@ -36,6 +36,7 @@ public function testEndpointThatExitsWithNoProcess() )->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\HomeController@actionBeingTerminatedByExit', 'symfony.route.name' => 'terminated_by_exit', + 'http.route' => '/terminated_by_exit', 'http.method' => 'GET', 'http.url' => 'http://localhost/terminated_by_exit', 'http.status_code' => '200', diff --git a/tests/Integrations/Symfony/V3_4/CommonScenariosTest.php b/tests/Integrations/Symfony/V3_4/CommonScenariosTest.php index 4973645565..3f64e90ea4 100644 --- a/tests/Integrations/Symfony/V3_4/CommonScenariosTest.php +++ b/tests/Integrations/Symfony/V3_4/CommonScenariosTest.php @@ -49,6 +49,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple?key=value&', 'http.status_code' => '200', @@ -87,6 +88,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\CommonScenariosController@simpleViewAction', 'symfony.route.name' => 'simple_view', + 'http.route' => '/simple_view', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple_view?key=value&', 'http.status_code' => '200', @@ -136,6 +138,7 @@ public function provideSpecs() ->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\CommonScenariosController@errorAction', 'symfony.route.name' => 'error', + 'http.route' => '/error', 'http.method' => 'GET', 'http.url' => 'http://localhost/error?key=value&', 'http.status_code' => '500', diff --git a/tests/Integrations/Symfony/V3_4/TemplateEnginesTest.php b/tests/Integrations/Symfony/V3_4/TemplateEnginesTest.php index 910c479081..a0c8ddb38b 100644 --- a/tests/Integrations/Symfony/V3_4/TemplateEnginesTest.php +++ b/tests/Integrations/Symfony/V3_4/TemplateEnginesTest.php @@ -29,6 +29,7 @@ public function testAlternateTemplatingEngine() )->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\HomeController@indexAction', 'symfony.route.name' => 'alternate_templating', + 'http.route' => '/alternate_templating', 'http.method' => 'GET', 'http.url' => 'http://localhost/alternate_templating', 'http.status_code' => '200', diff --git a/tests/Integrations/Symfony/V3_4/TraceSearchConfigTest.php b/tests/Integrations/Symfony/V3_4/TraceSearchConfigTest.php index b7ffd3eba3..7126d4b6ac 100644 --- a/tests/Integrations/Symfony/V3_4/TraceSearchConfigTest.php +++ b/tests/Integrations/Symfony/V3_4/TraceSearchConfigTest.php @@ -42,6 +42,7 @@ public function testScenario() )->withExactTags([ 'symfony.route.action' => 'AppBundle\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple', 'http.status_code' => '200', diff --git a/tests/Integrations/Symfony/V4_0/CommonScenariosTest.php b/tests/Integrations/Symfony/V4_0/CommonScenariosTest.php index e93bc42506..bc00aa3442 100644 --- a/tests/Integrations/Symfony/V4_0/CommonScenariosTest.php +++ b/tests/Integrations/Symfony/V4_0/CommonScenariosTest.php @@ -50,6 +50,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple?key=value&', 'http.status_code' => '200', @@ -88,6 +89,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleViewAction', 'symfony.route.name' => 'simple_view', + 'http.route' => '/simple_view', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple_view?key=value&', 'http.status_code' => '200', @@ -135,6 +137,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@errorAction', 'symfony.route.name' => 'error', + 'http.route' => '/error', 'http.method' => 'GET', 'http.url' => 'http://localhost/error?key=value&', 'http.status_code' => '500', diff --git a/tests/Integrations/Symfony/V4_0/TraceSearchConfigTest.php b/tests/Integrations/Symfony/V4_0/TraceSearchConfigTest.php index 1cacc0f82a..88dd8bf81d 100644 --- a/tests/Integrations/Symfony/V4_0/TraceSearchConfigTest.php +++ b/tests/Integrations/Symfony/V4_0/TraceSearchConfigTest.php @@ -42,6 +42,7 @@ public function testScenario() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple', 'http.status_code' => '200', diff --git a/tests/Integrations/Symfony/V4_2/CommonScenariosTest.php b/tests/Integrations/Symfony/V4_2/CommonScenariosTest.php index f2a703c53d..c293613a34 100644 --- a/tests/Integrations/Symfony/V4_2/CommonScenariosTest.php +++ b/tests/Integrations/Symfony/V4_2/CommonScenariosTest.php @@ -50,6 +50,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple?key=value&', 'http.status_code' => '200', @@ -88,6 +89,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleViewAction', 'symfony.route.name' => 'simple_view', + 'http.route' => '/simple_view', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple_view?key=value&', 'http.status_code' => '200', @@ -135,6 +137,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@errorAction', 'symfony.route.name' => 'error', + 'http.route' => '/error', 'http.method' => 'GET', 'http.url' => 'http://localhost/error?key=value&', 'http.status_code' => '500', diff --git a/tests/Integrations/Symfony/V4_2/TraceSearchConfigTest.php b/tests/Integrations/Symfony/V4_2/TraceSearchConfigTest.php index 5e7d684b29..77f9509044 100644 --- a/tests/Integrations/Symfony/V4_2/TraceSearchConfigTest.php +++ b/tests/Integrations/Symfony/V4_2/TraceSearchConfigTest.php @@ -42,6 +42,7 @@ public function testScenario() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple', 'http.status_code' => '200', diff --git a/tests/Integrations/Symfony/V4_4/CommonScenariosTest.php b/tests/Integrations/Symfony/V4_4/CommonScenariosTest.php index 5ef29b708f..880e2730b5 100644 --- a/tests/Integrations/Symfony/V4_4/CommonScenariosTest.php +++ b/tests/Integrations/Symfony/V4_4/CommonScenariosTest.php @@ -50,6 +50,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple?key=value&', 'http.status_code' => '200', @@ -90,6 +91,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleViewAction', 'symfony.route.name' => 'simple_view', + 'http.route' => '/simple_view', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple_view?key=value&', 'http.status_code' => '200', @@ -137,6 +139,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@errorAction', 'symfony.route.name' => 'error', + 'http.route' => '/error', 'http.method' => 'GET', 'http.url' => 'http://localhost/error?key=value&', 'http.status_code' => '500', diff --git a/tests/Integrations/Symfony/V4_4/TraceSearchConfigTest.php b/tests/Integrations/Symfony/V4_4/TraceSearchConfigTest.php index a751f93854..4bd9abad30 100644 --- a/tests/Integrations/Symfony/V4_4/TraceSearchConfigTest.php +++ b/tests/Integrations/Symfony/V4_4/TraceSearchConfigTest.php @@ -42,6 +42,7 @@ public function testScenario() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple', 'http.status_code' => '200', diff --git a/tests/Integrations/Symfony/V5_0/CommonScenariosTest.php b/tests/Integrations/Symfony/V5_0/CommonScenariosTest.php index 4877a3df41..e96fe20b52 100644 --- a/tests/Integrations/Symfony/V5_0/CommonScenariosTest.php +++ b/tests/Integrations/Symfony/V5_0/CommonScenariosTest.php @@ -50,6 +50,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple?key=value&', 'http.status_code' => '200', @@ -90,6 +91,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleViewAction', 'symfony.route.name' => 'simple_view', + 'http.route' => '/simple_view', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple_view?key=value&', 'http.status_code' => '200', @@ -137,6 +139,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@errorAction', 'symfony.route.name' => 'error', + 'http.route' => '/error', 'http.method' => 'GET', 'http.url' => 'http://localhost/error?key=value&', 'http.status_code' => '500', diff --git a/tests/Integrations/Symfony/V5_0/TraceSearchConfigTest.php b/tests/Integrations/Symfony/V5_0/TraceSearchConfigTest.php index 58e5e95683..e83b145a47 100644 --- a/tests/Integrations/Symfony/V5_0/TraceSearchConfigTest.php +++ b/tests/Integrations/Symfony/V5_0/TraceSearchConfigTest.php @@ -42,6 +42,7 @@ public function testScenario() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple', 'http.status_code' => '200', diff --git a/tests/Integrations/Symfony/V5_1/CommonScenariosTest.php b/tests/Integrations/Symfony/V5_1/CommonScenariosTest.php index 4007c20974..0f57fe3dd6 100644 --- a/tests/Integrations/Symfony/V5_1/CommonScenariosTest.php +++ b/tests/Integrations/Symfony/V5_1/CommonScenariosTest.php @@ -50,6 +50,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple?key=value&', 'http.status_code' => '200', @@ -90,6 +91,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleViewAction', 'symfony.route.name' => 'simple_view', + 'http.route' => '/simple_view', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple_view?key=value&', 'http.status_code' => '200', @@ -137,6 +139,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@errorAction', 'symfony.route.name' => 'error', + 'http.route' => '/error', 'http.method' => 'GET', 'http.url' => 'http://localhost/error?key=value&', 'http.status_code' => '500', diff --git a/tests/Integrations/Symfony/V5_1/TraceSearchConfigTest.php b/tests/Integrations/Symfony/V5_1/TraceSearchConfigTest.php index 9a6022439a..1cdde78ddd 100644 --- a/tests/Integrations/Symfony/V5_1/TraceSearchConfigTest.php +++ b/tests/Integrations/Symfony/V5_1/TraceSearchConfigTest.php @@ -42,6 +42,7 @@ public function testScenario() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple', 'http.status_code' => '200', diff --git a/tests/Integrations/Symfony/V5_2/CommonScenariosTest.php b/tests/Integrations/Symfony/V5_2/CommonScenariosTest.php index 26e2a39be0..9bda41e4fd 100644 --- a/tests/Integrations/Symfony/V5_2/CommonScenariosTest.php +++ b/tests/Integrations/Symfony/V5_2/CommonScenariosTest.php @@ -50,6 +50,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple?key=value&', 'http.status_code' => '200', @@ -88,6 +89,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleViewAction', 'symfony.route.name' => 'simple_view', + 'http.route' => '/simple_view', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple_view?key=value&', 'http.status_code' => '200', @@ -133,6 +135,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@errorAction', 'symfony.route.name' => 'error', + 'http.route' => '/error', 'http.method' => 'GET', 'http.url' => 'http://localhost/error?key=value&', 'http.status_code' => '500', diff --git a/tests/Integrations/Symfony/V5_2/TraceSearchConfigTest.php b/tests/Integrations/Symfony/V5_2/TraceSearchConfigTest.php index 2e391cbb73..86584cfbda 100644 --- a/tests/Integrations/Symfony/V5_2/TraceSearchConfigTest.php +++ b/tests/Integrations/Symfony/V5_2/TraceSearchConfigTest.php @@ -42,6 +42,7 @@ public function testScenario() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple', 'http.status_code' => '200', diff --git a/tests/Integrations/Symfony/V6_2/CommonScenariosTest.php b/tests/Integrations/Symfony/V6_2/CommonScenariosTest.php index ec2400813c..605db929c0 100644 --- a/tests/Integrations/Symfony/V6_2/CommonScenariosTest.php +++ b/tests/Integrations/Symfony/V6_2/CommonScenariosTest.php @@ -50,6 +50,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple?key=value&', 'http.status_code' => '200', @@ -88,6 +89,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleViewAction', 'symfony.route.name' => 'simple_view', + 'http.route' => '/simple_view', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple_view?key=value&', 'http.status_code' => '200', @@ -133,6 +135,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@errorAction', 'symfony.route.name' => 'error', + 'http.route' => '/error', 'http.method' => 'GET', 'http.url' => 'http://localhost/error?key=value&', 'http.status_code' => '500', diff --git a/tests/Integrations/Symfony/V6_2/TraceSearchConfigTest.php b/tests/Integrations/Symfony/V6_2/TraceSearchConfigTest.php index a48c7aafbd..b032711526 100644 --- a/tests/Integrations/Symfony/V6_2/TraceSearchConfigTest.php +++ b/tests/Integrations/Symfony/V6_2/TraceSearchConfigTest.php @@ -42,6 +42,7 @@ public function testScenario() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple', 'http.status_code' => '200', diff --git a/tests/Integrations/Symfony/V7_0/CommonScenariosTest.php b/tests/Integrations/Symfony/V7_0/CommonScenariosTest.php index 220c89f012..9c23b1970d 100644 --- a/tests/Integrations/Symfony/V7_0/CommonScenariosTest.php +++ b/tests/Integrations/Symfony/V7_0/CommonScenariosTest.php @@ -50,6 +50,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleAction', 'symfony.route.name' => 'simple', + 'http.route' => '/simple', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple?key=value&', 'http.status_code' => '200', @@ -88,6 +89,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@simpleViewAction', 'symfony.route.name' => 'simple_view', + 'http.route' => '/simple_view', 'http.method' => 'GET', 'http.url' => 'http://localhost/simple_view?key=value&', 'http.status_code' => '200', @@ -133,6 +135,7 @@ public function provideSpecs() )->withExactTags([ 'symfony.route.action' => 'App\Controller\CommonScenariosController@errorAction', 'symfony.route.name' => 'error', + 'http.route' => '/error', 'http.method' => 'GET', 'http.url' => 'http://localhost/error?key=value&', 'http.status_code' => '500', diff --git a/tests/composer.json b/tests/composer.json index f714b921d3..fe9224c225 100644 --- a/tests/composer.json +++ b/tests/composer.json @@ -17,6 +17,7 @@ "phpunit/phpunit": "<10", "phpspec/prophecy": "*", "symfony/process": "<5", + "symfony/routing": "<=6.0", "ext-sockets": "*" }, "config": {