Skip to content
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

Updated Laravel and Symfony quickstarts #696

Merged

Conversation

kishannsangani
Copy link
Member

@kishannsangani kishannsangani commented Jun 2, 2022

Updated laravel and symfony quickstarts to create sample application with OTel PHP SDK integrated.

Closes #678
Closes #679

@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #696 (d88263b) into main (90edbd3) will not change coverage.
The diff coverage is n/a.

❗ Current head d88263b differs from pull request most recent head 3534f3d. Consider uploading reports for the commit 3534f3d to get more accurate results

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #696   +/-   ##
=========================================
  Coverage     82.77%   82.77%           
  Complexity     1242     1242           
=========================================
  Files           139      139           
  Lines          3036     3036           
=========================================
  Hits           2513     2513           
  Misses          523      523           
Flag Coverage Δ
7.4 82.76% <ø> (ø)
8.0 82.82% <ø> (ø)
8.1 82.82% <ø> (ø)

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


Continue to review full report at Codecov.

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

@kishannsangani kishannsangani changed the title Updates Laravel and Symfony quickstarts Updated Laravel and Symfony quickstarts Jun 2, 2022
@kishannsangani kishannsangani marked this pull request as ready for review June 2, 2022 14:05
Copy link
Member

@tidal tidal left a comment

Choose a reason for hiding this comment

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

This is still patching the front controller and using global states (which is the opposite of best practices)

@kishannsangani
Copy link
Member Author

kishannsangani commented Jun 3, 2022

This is still patching the front controller and using global states (which is the opposite of best practices)

@tidal For HelloController in both Laravel and Symfony, we have used TracerProvider::getDefaultTracer() to get default tracer and AbstractSpan::getCurrent() to get current span, i.e. rootSpan. However, in Symfony, there is a change in index.php. Unlike Laravel which calls the kernel terminate function in the index.php itself, Symfony index.php returns a function that returns kernel based on the context provided. We should end span only after kernel terminate is called but I couldn't trace where it is called. So I placed the end span snippet in the kernel terminate function itself that uses global variables. I can use AbstractSpan::getCurrent() to get the current span but I cannot get the current scope via that function. Can you help me out with this?

@kishannsangani
Copy link
Member Author

@tidal Can you help me resolve this PR? What should I do w.r.t. this PR?

@kishannsangani
Copy link
Member Author

As discussed in the SIG meeting today, incorporated changes from PR by DrLuke into this PR.

@tidal tidal merged commit 13ce2da into open-telemetry:main Jun 29, 2022
@kishannsangani kishannsangani deleted the update_laravel_symfony_quickstarts branch September 7, 2022 13:00
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.

Symfony Example Laravel Example
3 participants