Statistics
36285
16
0
18d
Badges
Tags
api
Dependencies

NewRelic PHP agent integration for Nette Framework

Build Status Latest Stable Version Composer Downloads

Versions

State Version Branch Nette PHP
stable ^8.0 master ^3.0 >=7.1
stable ^7.0 master ^2.4 >=5.6

Installation

composer require vrtak-cz/newrelic-nette

edit app/config/config.neon

extensions:
    newrelic: VrtakCZ\NewRelic\Nette\Extension

Config

newrelic:
    enabled: Yes #default
    appName: YourApplicationName #optional
    license: yourLicenseCode #optional
    actionKey: action # default - optional - action parameter name
    logLevel: #defaults
        - critical
        - exception
        - error

    # optional options with default values
    rum:
        enabled: auto # other options are Yes/No
    transactionTracer:
        enabled: Yes
        detail: 1
        recordSql: obfuscated
        slowSql: Yes
        threshold: apdex_f
        stackTraceThreshold: 500
        explainThreshold: 500
    errorCollector:
        enabled: Yes
        recordDatabaseErrors: Yes
    parameters:
        capture: No
        ignored: []
    customParameters:
        paramName: paramValue

Realtime User Monitoring

add this component factory to your base presenter

/**
 * @var \VrtakCZ\NewRelic\Nette\RUM\HeaderControl
 * @inject
 */
protected $headerControl;

/**
 * @var \VrtakCZ\NewRelic\Nette\RUM\FooterControl
 * @inject
 */
protected $footerControl;

protected function createComponentNewRelicHeader()
{
    $this->headerControl->disableScriptTag(); // optional
    return $this->headerControl;
}

protected function createComponentNewRelicFooter()
{
    $this->footerControl->disableScriptTag(); // optional
    return $this->footerControl;
}

and add this to your @layout header (before </head>)

{control newRelicHeader}

and add this to your @layout footer (before </body>)

{control newRelicFooter}

License

NewRelic Nette is licensed under the MIT License - see the LICENSE file for details

  • v8.0.0 8.0.0

    • Updated to Nette 3.0. Nette 2.4 will be supported only in 7.x releases.
    • Dropped PHP 5.6 and 7.1 support.
    • Added PHP 7.3 support.
  • v7.0.0 7.0.0

    • dropped Nette 2.3 support
    • dropped PHP 5.5 support
    • Removed dependence on Nette\Object
    • added PHP 7.1 and 7.2 support
  • v6.1.0 6.1.0

    • added support for Throwable
  • v6.0.0 6.0.0

    • added Tracy 2.4.x support
    • added Nette 2.4.x support
    • removed Tracy 2.2.x support
    • removed PHP 5.4.x support
    • removed ratio support (both global and RUM)
    • fixed PHP 7.0 compatability
    • improve CS
  • v5.0.0 5.0

    • added Nette 2.3.x support
    • removed PHP 5.3.x support
    • added Travis with lint & CS
  • v4.0.0 Nette 2.2

    Initial support for Nette 2.2.x

    Tracy support splitted to separate repo https://github.com/Vrtak-CZ/NewRelic-Tracy

  • v3.0.0 Nette 2.1

    Nette 2.1.x compatability

  • v1.3.0 v1.3.0

    • add more options see README.md file
    • cleanup
  • v1.1.2 v1.1.2

    bug fix release

  • v1.1.0 v1.1.0

    • remove newrelic dependency from composer
    • add check if is newrelic extension enabled
  • v1.0.0 First Stable

    • Some fixies
    • add support for parameters
    • add support for Realtime User Monitoring

Is this addon outdated? Did you find an issue? Please report it.

Componette Componette admin@componette.com