diff --git a/src/Monolog/Handler/NewRelicHandler.php b/src/Monolog/Handler/NewRelicHandler.php index a79f9557..8c8de787 100644 --- a/src/Monolog/Handler/NewRelicHandler.php +++ b/src/Monolog/Handler/NewRelicHandler.php @@ -77,6 +77,7 @@ class NewRelicHandler extends AbstractProcessingHandler if ($transactionName = $this->getTransactionName($record['context'])) { $this->setNewRelicTransactionName($transactionName); + unset($record['context']['transaction_name']); } if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Exception) { @@ -86,11 +87,6 @@ class NewRelicHandler extends AbstractProcessingHandler newrelic_notice_error($record['message']); } - if (isset($record['context']['transaction_name'])) { - newrelic_name_transaction($record['context']['transaction_name']); - unset($record['context']['transaction_name']); - } - foreach ($record['context'] as $key => $parameter) { if (is_array($parameter) && $this->explodeArrays) { foreach ($parameter as $paramKey => $paramValue) {