Skip to content

Conversation

cedricziel
Copy link
Contributor

@cedricziel cedricziel commented Mar 26, 2025

This PR improves the Laravel auto-instrumentation with several key enhancements:

  • Add controller method instrumentation for better request tracing
  • Improve view rendering instrumentation with exception handling
  • Add event debugging capabilities
  • Fix middleware instrumentation to prevent double-hooking
  • Enhance HTTP client and request tracing
  • Improve span naming and protocol handling
  • Add helper methods for trace structure assessment
  • Various bug fixes and code style improvements

The changes focus on making the Laravel instrumentation more robust and providing better observability into Laravel applications.

Copy link

codecov bot commented Mar 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.35%. Comparing base (ea137c0) to head (558ca93).
Report is 55 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #336      +/-   ##
============================================
+ Coverage     79.45%   81.35%   +1.90%     
+ Complexity     1772     1631     -141     
============================================
  Files           137      113      -24     
  Lines          7568     6704     -864     
============================================
- Hits           6013     5454     -559     
+ Misses         1555     1250     -305     
Flag Coverage Δ
Aws 92.24% <ø> (ø)
Context/Swoole 0.00% <ø> (ø)
Instrumentation/CakePHP 20.27% <ø> (ø)
Instrumentation/CodeIgniter 73.77% <ø> (ø)
Instrumentation/Curl 90.42% <ø> (ø)
Instrumentation/Doctrine 93.25% <ø> (ø)
Instrumentation/ExtAmqp 89.26% <ø> (ø)
Instrumentation/ExtRdKafka 86.23% <ø> (ø)
Instrumentation/Guzzle 69.51% <ø> (ø)
Instrumentation/HttpAsyncClient 78.31% <ø> (ø)
Instrumentation/IO 70.68% <ø> (ø)
Instrumentation/Laravel ?
Instrumentation/MongoDB 74.28% <ø> (ø)
Instrumentation/MySqli 95.81% <ø> (ø)
Instrumentation/OpenAIPHP 87.31% <ø> (ø)
Instrumentation/PDO 90.15% <ø> (ø)
Instrumentation/Psr14 77.14% <ø> (ø)
Instrumentation/Psr15 89.41% <ø> (ø)
Instrumentation/Psr16 97.56% <ø> (ø)
Instrumentation/Psr18 77.77% <ø> (ø)
Instrumentation/Psr3 59.49% <ø> (ø)
Instrumentation/Psr6 97.67% <ø> (ø)
Instrumentation/Slim 86.30% <ø> (ø)
Instrumentation/Symfony 84.93% <ø> (ø)
Instrumentation/Yii 77.68% <ø> (ø)
Logs/Monolog 100.00% <ø> (ø)
Propagation/ServerTiming ?
Propagation/TraceResponse 100.00% <100.00%> (ø)
ResourceDetectors/Azure 91.66% <ø> (ø)
ResourceDetectors/Container 93.02% <ø> (ø)
Sampler/RuleBased 33.51% <ø> (ø)
Shims/OpenTracing 92.45% <ø> (ø)
Symfony 87.81% <ø> (ø)
Utils/Test 70.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...tion/TraceResponse/src/TraceResponsePropagator.php 100.00% <100.00%> (ø)

... and 24 files 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 ea137c0...558ca93. Read the comment docs.

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

@cedricziel cedricziel changed the title feat: Enhance Laravel instrumentation feat: Enhance Laravel auto-instrumentation Mar 29, 2025
Copy link

stale bot commented Jul 19, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 19, 2025
@evilpilaf
Copy link

@cedricziel what's the status of this project? any reason it wasn't continued?

@stale stale bot removed the stale label Sep 9, 2025
@brettmc
Copy link
Contributor

brettmc commented Sep 9, 2025

what's the status of this project? any reason it wasn't continued?

@evilpilaf we haven't heard from Cedric for quite some time. Do you have the skills to test this out and assess whether it's in a working state? It looks like a good contribution, but I'm no Symfony expert...

@evilpilaf
Copy link

what's the status of this project? any reason it wasn't continued?

@evilpilaf we haven't heard from Cedric for quite some time. Do you have the skills to test this out and assess whether it's in a working state? It looks like a good contribution, but I'm no Symfony expert...

@brettmc no sadly I am not experienced in Symfony (or PHP for that regard 😅) so I don't think I can help testing this thoroughly

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.

3 participants