-
Notifications
You must be signed in to change notification settings - Fork 69
feat(agent): end transaction for laravel horizon #1123
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
base: dev
Are you sure you want to change the base?
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1123 +/- ##
==========================================
+ Coverage 78.14% 78.17% +0.02%
==========================================
Files 193 193
Lines 28053 28058 +5
==========================================
+ Hits 21923 21934 +11
+ Misses 6130 6124 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
agent/fw_laravel_queue.c
Outdated
* used by wrapping the handle method of the HorizonCommand and | ||
* SupervisorCommand class. | ||
*/ | ||
NR_PHP_WRAPPER(nr_laravel_horizon_end) { |
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 would prefer a name like nr_laravel_horizon_end_txn
to be more clear what this function does.
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.
Good point, updated the name: f049a15
|
||
$txn = get_txn(); | ||
foreach ($txn->getTrace()->findSegmentsByName('Custom/foobar') as $segment) { | ||
echo $segment->name; |
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.
This output should be captured in an EXPECT
statement of some sort as well as any other echo's - this is true for all tests in this PR.
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.
Added: c1712c5
agent/fw_laravel.c
Outdated
|
||
nr_php_txn_end(1, 0 TSRMLS_CC); | ||
|
||
nrl_verbosedebug(NRL_TXN, "Ending Laravel Horizon Transaction"); |
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.
The code is not very consistent about using logging subsystems, but most log messages in fw_*.c
modules use NRL_FRAMEWORK
logging subsystem. Since this code runs in the context of framework's instrumentation, I'd suggest using either NRL_FRAMEWORK
or NRL_INSTRUMENT
subsystem.
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.
Good point, changed: 819903e
This PR does the following: