@@ -2014,7 +2014,7 @@ static void nr_php_instrument_func_begin(NR_EXECUTE_PROTO) {
20142014}
20152015
20162016#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 ) {
20182018 /*
20192019 * During nr_zend_call_oapi_special_before, the transaction may have been
20202020 * 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
20372037 /*
20382038 * Check for, and handle, frameworks.
20392039 */
2040- // if (wraprec->is_names_wt_simple ) {
2040+ if (name_transaction ) {
20412041
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+ }
20462048}
20472049#endif
20482050
@@ -2221,7 +2223,7 @@ static void nr_php_instrument_func_end(NR_EXECUTE_PROTO, bool create_metric, boo
22212223}
22222224
22232225#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 ) {
22252227#else
22262228void nr_php_observer_fcall_begin (zend_execute_data * execute_data ) {
22272229#endif
@@ -2265,7 +2267,7 @@ void nr_php_observer_fcall_begin(zend_execute_data* execute_data) {
22652267 nr_php_instrument_func_begin (NR_EXECUTE_ORIG_ARGS );
22662268#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO
22672269 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 );
22692271 }
22702272#endif
22712273
@@ -2321,10 +2323,13 @@ void nr_php_observer_fcall_end(zend_execute_data* execute_data,
23212323
23222324#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO
23232325void 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 );
23252327}
23262328void 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);
23282333}
23292334void nr_php_observer_fcall_end (zend_execute_data * execute_data ,
23302335 zval * func_return_value ) {
@@ -2355,6 +2360,11 @@ void nr_php_observer_empty_fcall_end(zend_execute_data* execute_data,
23552360 zval * func_return_value ) {
23562361 (void )execute_data ;
23572362 (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+ }
23582368}
23592369
23602370#endif
0 commit comments