@@ -2014,7 +2014,7 @@ static void nr_php_instrument_func_begin(NR_EXECUTE_PROTO) {
2014
2014
}
2015
2015
2016
2016
#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO
2017
- void nr_php_observer_fcall_begin_late (zend_execute_data * execute_data , nrtime_t txn_start_time ) {
2017
+ void nr_php_observer_fcall_begin_late (zend_execute_data * execute_data , nrtime_t txn_start_time , bool name_transaction ) {
2018
2018
/*
2019
2019
* During nr_zend_call_oapi_special_before, the transaction may have been
2020
2020
* ended and/or a new transaction may have started. To detect this, we
@@ -2037,12 +2037,14 @@ void nr_php_observer_fcall_begin_late(zend_execute_data* execute_data, nrtime_t
2037
2037
/*
2038
2038
* Check for, and handle, frameworks.
2039
2039
*/
2040
- // if (wraprec->is_names_wt_simple ) {
2040
+ if (name_transaction ) {
2041
2041
2042
- // nr_txn_name_from_function(NRPRG(txn),
2043
- // nr_php_op_array_function_name(NR_OP_ARRAY),
2044
- // nr_php_class_entry_name(NR_OP_ARRAY->scope));
2045
- //}
2042
+ nr_txn_name_from_function (NRPRG (txn ),
2043
+ nr_php_op_array_function_name (NR_OP_ARRAY ),
2044
+ NR_OP_ARRAY -> scope ?
2045
+ nr_php_class_entry_name (NR_OP_ARRAY -> scope ) :
2046
+ NULL );
2047
+ }
2046
2048
}
2047
2049
#endif
2048
2050
@@ -2221,7 +2223,7 @@ static void nr_php_instrument_func_end(NR_EXECUTE_PROTO, bool create_metric, boo
2221
2223
}
2222
2224
2223
2225
#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO
2224
- static void nr_php_observer_fcall_begin_common (zend_execute_data * execute_data , bool call_late ) {
2226
+ static void nr_php_observer_fcall_begin_common (zend_execute_data * execute_data , bool call_late , bool name_transaction ) {
2225
2227
#else
2226
2228
void nr_php_observer_fcall_begin (zend_execute_data * execute_data ) {
2227
2229
#endif
@@ -2265,7 +2267,7 @@ void nr_php_observer_fcall_begin(zend_execute_data* execute_data) {
2265
2267
nr_php_instrument_func_begin (NR_EXECUTE_ORIG_ARGS );
2266
2268
#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO
2267
2269
if (call_late ) {
2268
- nr_php_observer_fcall_begin_late (execute_data , nr_txn_start_time (NRPRG (txn )));
2270
+ nr_php_observer_fcall_begin_late (execute_data , nr_txn_start_time (NRPRG (txn )), name_transaction );
2269
2271
}
2270
2272
#endif
2271
2273
@@ -2321,10 +2323,13 @@ void nr_php_observer_fcall_end(zend_execute_data* execute_data,
2321
2323
2322
2324
#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO
2323
2325
void nr_php_observer_fcall_begin (zend_execute_data * execute_data ) {
2324
- nr_php_observer_fcall_begin_common (execute_data , false);
2326
+ nr_php_observer_fcall_begin_common (execute_data , false, false );
2325
2327
}
2326
2328
void nr_php_observer_fcall_begin_instrumented (zend_execute_data * execute_data ) {
2327
- nr_php_observer_fcall_begin_common (execute_data , true);
2329
+ nr_php_observer_fcall_begin_common (execute_data , true, false);
2330
+ }
2331
+ void nr_php_observer_fcall_begin_name_transaction (zend_execute_data * execute_data ) {
2332
+ nr_php_observer_fcall_begin_common (execute_data , true, true);
2328
2333
}
2329
2334
void nr_php_observer_fcall_end (zend_execute_data * execute_data ,
2330
2335
zval * func_return_value ) {
@@ -2355,6 +2360,11 @@ void nr_php_observer_empty_fcall_end(zend_execute_data* execute_data,
2355
2360
zval * func_return_value ) {
2356
2361
(void )execute_data ;
2357
2362
(void )func_return_value ;
2363
+
2364
+ /* need a way to register framework info while tt_detail is 0 */
2365
+ if (nrunlikely (OP_ARRAY_IS_A_FILE (NR_OP_ARRAY ))) {
2366
+ nr_php_execute_file (NR_OP_ARRAY , NR_EXECUTE_ORIG_ARGS );
2367
+ }
2358
2368
}
2359
2369
2360
2370
#endif
0 commit comments