Skip to content

Commit b2a5b53

Browse files
committed
fix instrumented function metric
1 parent 5b4edd0 commit b2a5b53

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

agent/php_observer.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,15 @@ static zend_observer_fcall_handlers nr_php_fcall_register_handlers(
115115
}
116116
}
117117
handlers.begin = wraprec->special_instrumentation_before ?
118-
(zend_observer_fcall_begin_handler)wraprec->special_instrumentation_before :
119-
nr_php_observer_fcall_begin_instrumented;
118+
(zend_observer_fcall_begin_handler)wraprec->special_instrumentation_before :
119+
wraprec->is_transient ?
120+
nr_php_observer_fcall_begin :
121+
nr_php_observer_fcall_begin_instrumented;
120122
handlers.end = wraprec->special_instrumentation ?
121-
(zend_observer_fcall_end_handler)wraprec->special_instrumentation :
122-
wraprec->create_metric ? nr_php_observer_fcall_end_create_metric:
123-
nr_php_observer_fcall_end;
123+
(zend_observer_fcall_end_handler)wraprec->special_instrumentation :
124+
wraprec->create_metric ?
125+
nr_php_observer_fcall_end_create_metric :
126+
nr_php_observer_fcall_end;
124127
return handlers;
125128
}
126129
#endif

0 commit comments

Comments
 (0)