-
Notifications
You must be signed in to change notification settings - Fork 174
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
Implementation of optional sentry tracing with twig #430
Implementation of optional sentry tracing with twig #430
Conversation
I never looked at the internals of Twig in depth, but looking at how the profiler is integrated in Symfony they extends the |
@ste93cry I actually did this first but decoupled it later on to lower the dependency and risk of breaking on changes there. There is no real advantage for us to extend it. I will rebase this one later this week to apply the changes of the DBAL integration. |
Ok, only then I will review the code because doing it now would be useless as a lot of things are gonna change 😃
I just checked and the class is not marked as |
@ste93cry AFAIK this should not be a problem. We register our own After checking it again this was my reason for not using it. Registering your own extensions in Twig like the way I build it is how it is commonly done. Edit: |
After checking: I feel unsure if we need to use the |
IMHO we should also check if the |
b5bd18a
to
a3f6cb8
Compare
a3f6cb8
to
6d29db8
Compare
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 solved the static analysis issues, LGTM now! 👍
d09af90
to
c353ce6
Compare
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.
It looks good, more features can always be added later if we will see there is need. LGTM!
@ste93cry thanks a lot. I will rebase the the last one. :) |
Hi @rjd22 Could some documentation of this option be added in the Readme ? |
This adds tracing capabilities for Twig templates. For more info about tracing (which got released in 4.1) see https://docs.sentry.io/product/performance/distributed-tracing/ |
At last ;), the Twig tracing with tests. This also includes the same suggested dependencies fix as the DbalListener. Hopefully git can figure out the merge conflicts :D.
To use Twig tracing you will have to enable the following options:
Good luck!