NewRelic module provide an object-oriented PHP wrapper for New Relic monitoring service.
NewRelic module provide a logger and a wrapper for New Relic PHP API.
The current route is used to set the name of each transaction. Moreover, the module allow exceptions logging if enabled.
<?php
return array(
'newrelic' => array(
// Sets the newrelic app name. Note that this will discard metrics
// collected before the name is set. If empty then your php.ini
// configuration will take precedence.
'application_name' => null,
// May be null and will only be set if application name is also given.
'license' => null,
// If false then neither change the auto_instrument or manually
// instrument the real user monitoring.
'browser_timing_enabled' => false,
// When true tell the newrelic extension to insert Real User Monitoring
// scripts automatically.
'browser_timing_auto_instrument' => true,
// When true, a logger with the newrelic writer will be called for
// dispatch error events.
'exceptions_logging_enabled' => false,
),
);
<?php
$client = $this->getServiceLocator()->get('NewRelic\Client');
$client->ignoreTransaction();
<?php
$client = $this->getServiceLocator()->get('NewRelic\Client');
$client->backgroundJob(true);
<?php
$client = $this->getServiceLocator()->get('NewRelic\Client');
$client->addCustomMetric('salesprice', $price);