Skip to content

fix: update Symfony instrumentation to prefer route path template over route name for HTTP route attributes#495

Open
Apoorva64 wants to merge 2 commits intoopen-telemetry:mainfrom
Apoorva64:fix/opentelemetry-php-contrib/opentelemetry-auto-symfony/http-route-uses-route-name-instead-of-template-path
Open

fix: update Symfony instrumentation to prefer route path template over route name for HTTP route attributes#495
Apoorva64 wants to merge 2 commits intoopen-telemetry:mainfrom
Apoorva64:fix/opentelemetry-php-contrib/opentelemetry-auto-symfony/http-route-uses-route-name-instead-of-template-path

Conversation

@Apoorva64
Copy link
Copy Markdown

@Apoorva64 Apoorva64 requested a review from a team as a code owner December 31, 2025 13:45
@welcome
Copy link
Copy Markdown

welcome bot commented Dec 31, 2025

Thanks for opening your first pull request! If you haven't yet signed our Contributor License Agreement (CLA), then please do so that we can accept your contribution. A link should appear shortly in this PR if you have not already signed one.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.44%. Comparing base (a3c02c8) to head (f175fbf).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #495      +/-   ##
============================================
- Coverage     83.46%   83.44%   -0.02%     
  Complexity     2330     2330              
============================================
  Files           149      149              
  Lines          8791     8791              
============================================
- Hits           7337     7336       -1     
- Misses         1454     1455       +1     
Flag Coverage Δ
Aws 93.37% <ø> (ø)
Context/Swoole 0.00% <ø> (ø)
Exporter/Instana 49.80% <ø> (ø)
Instrumentation/AwsSdk 82.00% <ø> (ø)
Instrumentation/CakePHP 20.42% <ø> (ø)
Instrumentation/CodeIgniter 79.31% <ø> (ø)
Instrumentation/Curl 86.88% <ø> (-0.28%) ⬇️
Instrumentation/Doctrine 92.82% <ø> (ø)
Instrumentation/ExtAmqp 88.80% <ø> (ø)
Instrumentation/ExtRdKafka 86.13% <ø> (ø)
Instrumentation/Guzzle 76.25% <ø> (ø)
Instrumentation/HttpAsyncClient 78.94% <ø> (ø)
Instrumentation/IO 0.00% <ø> (ø)
Instrumentation/Laravel 71.65% <ø> (ø)
Instrumentation/MongoDB 76.84% <ø> (ø)
Instrumentation/MySqli 93.39% <ø> (ø)
Instrumentation/OpenAIPHP 86.71% <ø> (ø)
Instrumentation/PDO 85.67% <ø> (ø)
Instrumentation/PostgreSql 91.36% <ø> (ø)
Instrumentation/Psr14 77.41% <ø> (ø)
Instrumentation/Psr15 89.74% <ø> (ø)
Instrumentation/Psr16 97.43% <ø> (ø)
Instrumentation/Psr18 79.41% <ø> (ø)
Instrumentation/Psr3 67.70% <ø> (ø)
Instrumentation/Psr6 97.56% <ø> (ø)
Instrumentation/ReactPHP 99.41% <ø> (ø)
Instrumentation/Session 94.28% <ø> (ø)
Instrumentation/Slim 84.21% <ø> (ø)
Instrumentation/Yii 83.33% <ø> (ø)
Logs/Monolog 100.00% <ø> (ø)
Propagation/CloudTrace 90.69% <ø> (ø)
Propagation/Instana 98.07% <ø> (ø)
Propagation/ServerTiming 94.73% <ø> (ø)
Propagation/TraceResponse 94.73% <ø> (ø)
ResourceDetectors/Azure 91.66% <ø> (ø)
ResourceDetectors/Container 93.02% <ø> (ø)
ResourceDetectors/DigitalOcean 100.00% <ø> (ø)
Sampler/Xray 78.38% <ø> (ø)
Shims/OpenTracing 92.99% <ø> (ø)
SqlCommenter 95.58% <ø> (ø)
Symfony 88.14% <ø> (ø)
Utils/Test 87.79% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3c02c8...f175fbf. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Apoorva64 Apoorva64 force-pushed the fix/opentelemetry-php-contrib/opentelemetry-auto-symfony/http-route-uses-route-name-instead-of-template-path branch 2 times, most recently from be0c762 to f175fbf Compare January 7, 2026 15:16
hook(
Router::class,
'matchRequest',
post: static function (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the parameter contains non-scalar values, presumably they are passed by reference and can be modified here? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[opentelemetry-php-contrib] [opentelemetry-auto-symfony] http.route uses route name instead of route template path

3 participants