@@ -1991,7 +1991,7 @@ static void nr_php_instrument_func_begin(NR_EXECUTE_PROTO) {
1991
1991
}
1992
1992
1993
1993
#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO
1994
- void nr_php_observer_fcall_begin_late (zend_execute_data * execute_data , nrtime_t txn_start_time ) {
1994
+ void nr_php_observer_fcall_begin_late (zend_execute_data * execute_data , nrtime_t txn_start_time , bool name_transaction ) {
1995
1995
/*
1996
1996
* During nr_zend_call_oapi_special_before, the transaction may have been
1997
1997
* ended and/or a new transaction may have started. To detect this, we
@@ -2014,12 +2014,14 @@ void nr_php_observer_fcall_begin_late(zend_execute_data* execute_data, nrtime_t
2014
2014
/*
2015
2015
* Check for, and handle, frameworks.
2016
2016
*/
2017
- // if (wraprec->is_names_wt_simple ) {
2017
+ if (name_transaction ) {
2018
2018
2019
- // nr_txn_name_from_function(NRPRG(txn),
2020
- // nr_php_op_array_function_name(NR_OP_ARRAY),
2021
- // nr_php_class_entry_name(NR_OP_ARRAY->scope));
2022
- //}
2019
+ nr_txn_name_from_function (NRPRG (txn ),
2020
+ nr_php_op_array_function_name (NR_OP_ARRAY ),
2021
+ NR_OP_ARRAY -> scope ?
2022
+ nr_php_class_entry_name (NR_OP_ARRAY -> scope ) :
2023
+ NULL );
2024
+ }
2023
2025
}
2024
2026
#endif
2025
2027
@@ -2198,7 +2200,7 @@ static void nr_php_instrument_func_end(NR_EXECUTE_PROTO, bool create_metric, boo
2198
2200
}
2199
2201
2200
2202
#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO
2201
- static void nr_php_observer_fcall_begin_common (zend_execute_data * execute_data , bool call_late ) {
2203
+ static void nr_php_observer_fcall_begin_common (zend_execute_data * execute_data , bool call_late , bool name_transaction ) {
2202
2204
#else
2203
2205
void nr_php_observer_fcall_begin (zend_execute_data * execute_data ) {
2204
2206
#endif
@@ -2242,7 +2244,7 @@ void nr_php_observer_fcall_begin(zend_execute_data* execute_data) {
2242
2244
nr_php_instrument_func_begin (NR_EXECUTE_ORIG_ARGS );
2243
2245
#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO
2244
2246
if (call_late ) {
2245
- nr_php_observer_fcall_begin_late (execute_data , nr_txn_start_time (NRPRG (txn )));
2247
+ nr_php_observer_fcall_begin_late (execute_data , nr_txn_start_time (NRPRG (txn )), name_transaction );
2246
2248
}
2247
2249
#endif
2248
2250
@@ -2298,10 +2300,13 @@ void nr_php_observer_fcall_end(zend_execute_data* execute_data,
2298
2300
2299
2301
#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO
2300
2302
void nr_php_observer_fcall_begin (zend_execute_data * execute_data ) {
2301
- nr_php_observer_fcall_begin_common (execute_data , false);
2303
+ nr_php_observer_fcall_begin_common (execute_data , false, false );
2302
2304
}
2303
2305
void nr_php_observer_fcall_begin_instrumented (zend_execute_data * execute_data ) {
2304
- nr_php_observer_fcall_begin_common (execute_data , true);
2306
+ nr_php_observer_fcall_begin_common (execute_data , true, false);
2307
+ }
2308
+ void nr_php_observer_fcall_begin_name_transaction (zend_execute_data * execute_data ) {
2309
+ nr_php_observer_fcall_begin_common (execute_data , true, true);
2305
2310
}
2306
2311
void nr_php_observer_fcall_end (zend_execute_data * execute_data ,
2307
2312
zval * func_return_value ) {
@@ -2332,6 +2337,11 @@ void nr_php_observer_empty_fcall_end(zend_execute_data* execute_data,
2332
2337
zval * func_return_value ) {
2333
2338
(void )execute_data ;
2334
2339
(void )func_return_value ;
2340
+
2341
+ /* need a way to register framework info while tt_detail is 0 */
2342
+ if (nrunlikely (OP_ARRAY_IS_A_FILE (NR_OP_ARRAY ))) {
2343
+ nr_php_execute_file (NR_OP_ARRAY , NR_EXECUTE_ORIG_ARGS );
2344
+ }
2335
2345
}
2336
2346
2337
2347
#endif
0 commit comments