Skip to content

Commit 5c91aa5

Browse files
committed
re-test symfony exception handling
1 parent 2387078 commit 5c91aa5

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

agent/fw_drupal8.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#define PHP_PACKAGE_NAME "drupal/core"
2323

24-
NR_PHP_WRAPPER(nr_drupal_exception) {
24+
NR_PHP_WRAPPER(nr_symfony4_exception) {
2525
int priority = nr_php_error_get_priority(E_ERROR);
2626
zval* event = NULL;
2727
zval* exception = NULL;
@@ -30,7 +30,7 @@ NR_PHP_WRAPPER(nr_drupal_exception) {
3030
(void)wraprec;
3131
nrl_warning(NRL_ERROR, "nr_drupal_exception: HANDLING DRUPAL EXCEPTION");
3232

33-
NR_PHP_WRAPPER_REQUIRE_FRAMEWORK(NR_FW_DRUPAL8);
33+
// NR_PHP_WRAPPER_REQUIRE_FRAMEWORK(NR_FW_DRUPAL8);
3434

3535
if (NR_SUCCESS != nr_txn_record_error_worthy(NRPRG(txn), priority)) {
3636
nrl_warning(NRL_ERROR, "nr_drupal_exception: NOT ERROR WORTHY");
@@ -789,9 +789,14 @@ void nr_drupal8_enable(TSRMLS_D) {
789789

790790
nr_php_error_install_exception_handler();
791791

792-
nr_php_wrap_user_function(NR_PSTR("Drupal\\Core\\EventSubscriber\\HttpExcepti"
793-
"onSubscriberBase::onException"),
794-
nr_drupal_exception TSRMLS_CC);
792+
nr_php_wrap_user_function(
793+
NR_PSTR("Symfony\\Component\\HttpKernel\\"
794+
"EventListener\\ExceptionListener::onKernelException"),
795+
nr_symfony4_exception TSRMLS_CC);
796+
797+
// nr_php_wrap_user_function(NR_PSTR("Drupal\\Core\\EventSubscriber\\HttpExcepti"
798+
// "onSubscriberBase::onException"),
799+
// nr_drupal_exception TSRMLS_CC);
795800
/*
796801
* The drupal_modules config setting controls instrumentation of modules,
797802
* hooks, and views.

0 commit comments

Comments
 (0)