-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add http.route tag to SymfonyIntegration.php #2992
base: master
Are you sure you want to change the base?
Conversation
6a1adeb
to
b32dca7
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2992 +/- ##
=============================================
- Coverage 72.74% 50.38% -22.36%
- Complexity 2750 2757 +7
=============================================
Files 138 111 -27
Lines 15060 10944 -4116
Branches 1026 0 -1026
=============================================
- Hits 10955 5514 -5441
- Misses 3546 5430 +1884
+ Partials 559 0 -559
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 56 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Benchmarks [ tracer ]Benchmark execution time: 2024-12-20 16:32:12 Comparing candidate commit 7effdac in PR branch Found 1 performance improvements and 2 performance regressions! Performance is the same for 175 metrics, 0 unstable metrics. scenario:PDOBench/benchPDOBaseline
scenario:PDOBench/benchPDOBaseline-opcache
scenario:SamplingRuleMatchingBench/benchRegexMatching2-opcache
|
1c181cf
to
387a651
Compare
Snapshots difference summaryThe following differences have been observed in committed snapshots. It is meant to help the reviewer. If you need to update snapshots, please refer to CONTRIBUTING.md |
644c737
to
ddbe994
Compare
@@ -913,7 +913,6 @@ TEST_WEB_81 := \ | |||
test_web_nette_30 \ | |||
test_web_slim_312 \ | |||
test_web_slim_4 \ | |||
test_web_symfony_52 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we removing those tests from PHP 8.1 up to PHP 8.3? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Symfony 5.2 doesn't actually work with those PHP versions. The tests fail with:
[17-Dec-2024 19:40:57 -03] [ddtrace] [warning] Error raised in ddtrace's closure defined at /Users/gustavo.lopes/repos/dd-trace-php/src/DDTrace/Integrations/Symfony/SymfonyIntegration.php:394 for Symfony\Component\HttpKernel\HttpKernel::handle(): Return type of Symfony\Component\Routing\RouteCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/gustavo.lopes/repos/dd-trace-php/tests/Frameworks/Symfony/Version_5_2/vendor/symfony/routing/RouteCollection.php on line 69
/Users/gustavo.lopes/repos/dd-trace-php/tests/Common/WebFrameworkTestCase.php:74
/Users/gustavo.lopes/repos/dd-trace-php/tests/Common/MultiPHPUnitVersionAdapter_typed.php:33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ddbe994
to
7233cec
Compare
I am missing tests with optional parameters https://symfony.com/doc/current/routing.html#optional-parameters, more than one locale https://symfony.com/doc/current/routing.html#localized-routes-i18n |
7233cec
to
0ee8ad9
Compare
} | ||
$rootSpan->meta['symfony.route.name'] = $route_name; | ||
|
||
// the rest is for determining http.route |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather extract then all the code below this comment to its own function. Comments sooner or later lie. Just my opinion, not blocking the pr or anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've refactored it
*/ | ||
public function dynamicAction(Request $request) | ||
#[Route("/dynamic-path/{param01}", locale: "en")] | ||
#[Route("/caminho-dinamico/{param01}", locale: "pt")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is the PT route reported if locale is pt
. I can't see any test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't report the routes and I don't hit this route, only then en
one. The point is that there being several locales forces the route name not be a key in the route collection; instead we get route_name.locale
.
Description
Adds http.route to symfony. Supersedes #2710 and #2477
Reviewer checklist