Skip to content

Commit

Permalink
InstrumentedFunction supp metric on first call only
Browse files Browse the repository at this point in the history
  • Loading branch information
ZNeumann committed May 22, 2024
1 parent f731852 commit 2c09632
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions agent/php_observer.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,18 @@ static zend_observer_fcall_handlers nr_php_fcall_register_handlers(
}
}
handlers.begin = wraprec->special_instrumentation_before ?
(zend_observer_fcall_begin_handler)wraprec->special_instrumentation_before :
(zend_observer_fcall_begin_handler) wraprec->special_instrumentation_before :
wraprec->is_transient ?
nr_php_observer_fcall_begin :
nr_php_observer_fcall_begin_instrumented;
handlers.end = wraprec->special_instrumentation ?
(zend_observer_fcall_end_handler)wraprec->special_instrumentation :
(zend_observer_fcall_end_handler) wraprec->special_instrumentation :
wraprec->is_exception_handler ?
nr_php_observer_fcall_end_exception_handler :
wraprec->create_metric ?
nr_php_observer_fcall_end_create_metric :
nr_php_observer_fcall_end;
nr_txn_force_single_count(NRPRG(txn), wraprec->supportability_metric);
return handlers;
}

Expand Down

0 comments on commit 2c09632

Please sign in to comment.