PHPackages                             spryker-eco/new-relic - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. spryker-eco/new-relic

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

spryker-eco/new-relic
=====================

NewRelic module

2.1.0(1y ago)01.5M↓12.4%2[1 PRs](https://github.com/spryker-eco/new-relic/pulls)4MITPHPPHP &gt;=7.3CI passing

Since Aug 10Pushed 2mo ago22 watchersCompare

[ Source](https://github.com/spryker-eco/new-relic)[ Packagist](https://packagist.org/packages/spryker-eco/new-relic)[ RSS](/packages/spryker-eco-new-relic/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (15)Versions (7)Used By (4)

NewRelic Module
===============

[](#newrelic-module)

[![CI](https://github.com/spryker-eco/new-relic/workflows/CI/badge.svg?branch=master)](https://github.com/spryker-eco/new-relic/actions?query=workflow%3ACI+branch%3Amaster)[![Latest Stable Version](https://camo.githubusercontent.com/d9db6f7e9442b3558ddc82d668b3fc7b1fde6b3db6da61d083b48827c6287149/68747470733a2f2f706f7365722e707567782e6f72672f737072796b65722d65636f2f6e65772d72656c69632f762f737461626c652e737667)](https://packagist.org/packages/spryker-eco/new-relic)[![License](https://camo.githubusercontent.com/9fa34ab45fadba5e91e8216baab80631c7f48713495dc6b3371edce24e966c8e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f737072796b65722d65636f2f6e65772d72656c69632e7376673f623d6d6173746572)](https://github.com/spryker-eco/new-relic)[![Minimum PHP Version](https://camo.githubusercontent.com/9c50dc780fa576f5c39b4feff00c05345c1471be0808881a09e750b91220dc54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e332d3838393242462e737667)](https://php.net/)

Provides a New Relic monitoring extension plugin and deployment tracking for Spryker applications.

Installation
------------

[](#installation)

```
composer require spryker-eco/new-relic

```

Documentation
-------------

[](#documentation)

- [Configure New Relic service](https://docs.spryker.com/docs/dg/dev/integrate-and-configure/configure-services#new-relic)
- [Performance monitoring guidelines](https://docs.spryker.com/docs/dg/dev/guidelines/performance-guidelines/monitoring)

Changelog: 2.x to 3.0 (Release Candidate)
-----------------------------------------

[](#changelog-2x-to-30-release-candidate)

### Breaking Changes

[](#breaking-changes)

#### PHP Requirement

[](#php-requirement)

- **2.x**: PHP &gt;= 7.3
- **3.x**: PHP &gt;= 8.3

#### Deployment Recording: REST API v2 to NerdGraph GraphQL

[](#deployment-recording-rest-api-v2-to-nerdgraph-graphql)

The New Relic REST API v2 (and its API keys) reached **EOL on March 1, 2025**. Version 3.x migrates deployment recording to the [NerdGraph GraphQL API](https://docs.newrelic.com/docs/change-tracking/change-tracking-graphql/).

**Environment variable changes:**

2.x (removed)3.x (new)Description`NEWRELIC:NEW_RELIC_DEPLOYMENT_API_URL``NEWRELIC:NEW_RELIC_NERDGRAPH_API_URL`API endpoint (default: `https://api.newrelic.com/graphql`)`NEWRELIC:NEW_RELIC_API_KEY``NEWRELIC:NEW_RELIC_USER_API_KEY`Authentication key (User API key instead of REST API key)`NEWRELIC:NEW_RELIC_APPLICATION_ID_ARRAY``NEWRELIC:NEW_RELIC_ENTITY_GUID_ARRAY`Entity identifiers (entity GUIDs instead of application IDs)**Config method changes in `NewRelicConfig` (Zed):**

2.x (removed)3.x (new)`getNewRelicDeploymentApiUrl()``getNerdGraphApiUrl()``getNewRelicApiKey()``getUserApiKey()``getNewRelicApplicationIdArray()``getEntityGuidArray()`**Console command changes:**

The `newrelic:record-deployment` command arguments changed:

2.x3.x`app_name` (required)Removed (entity GUIDs come from env config)`revision` (required)`revision` (required)`user` (optional)`user` (optional)`description` (optional)`description` (optional)`changelog` (optional)`changelog` (optional)**Backward-compatible migration:**

1. Generate a [New Relic User API key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/) (replaces the old REST API key)
2. Find your entity GUIDs in the New Relic UI (replaces application IDs)
3. Set the new environment variables in your deploy configuration
4. Update any project-level `NewRelicConfig` overrides to use the new method names

#### Facade Return Type

[](#facade-return-type)

- **2.x**: `NewRelicFacade::recordDeployment()` returned `RecordDeploymentInterface`
- **3.x**: `NewRelicFacade::recordDeployment()` returns `void`

#### Service Layer Architecture

[](#service-layer-architecture)

- **2.x**: `NewRelicMonitoringExtensionPlugin` called `newrelic_*` PHP functions directly inline
- **3.x**: Plugin delegates to `NewRelicServiceFactory::createNewRelicApi()` which returns a `NewRelicApiInterface` model

If you extended `NewRelicMonitoringExtensionPlugin` in your project, update your code to use the factory pattern:

```
// 2.x - direct function calls
newrelic_name_transaction($name);

// 3.x - via factory model
$this->getFactory()->createNewRelicApi()->nameTransaction($name);
```

### New Features

[](#new-features)

#### Optional: Default Transaction Name Plugin

[](#optional-default-transaction-name-plugin)

Spryker's `spryker/monitoring` module already sets route-based transaction names via `ControllerListener` plugins (e.g. `homepage`, `Product/List/Index`, `storefront-api.catalog-search`). This works well for requests that reach a controller.

However, requests that never reach routing — 404s, middleware rejections, health checks, early errors — fall back to New Relic's generic auto-naming (e.g. `WebTransaction/Action/index`), making them hard to identify.

The new **optional** `NewRelicTransactionNameHandlerPlugin` sets a meaningful default at boot time, before routing:

```
YVES:GET/en/cart
ZED:POST/api/products
GLUE:GET/catalog-search

```

Format: `APPLICATION:HTTP_METHOD/path`

For normal requests, the route-based name from `ControllerListener` overwrites this default later. For requests that never reach a controller, this default remains — giving visibility into otherwise unnamed transactions.

**This plugin is optional.** The module works without it, just like 2.x. To enable it, register it in the application plugins list. For Yves, add it to `ShopApplicationDependencyProvider`:

```
// src/Pyz/Yves/ShopApplication/ShopApplicationDependencyProvider.php

use SprykerEco\Service\NewRelic\Plugin\NewRelicTransactionNameHandlerPlugin;

protected function getApplicationPlugins(): array
{
    return [
        new YvesHttpApplicationPlugin(),
        // ... other plugins
        new NewRelicTransactionNameHandlerPlugin(), // should be registered early, before RouterApplicationPlugin
    ];
}
```

The same approach applies to Zed (`ApplicationDependencyProvider`) and Glue (`GlueBackendApiApplication`/`GlueStorefrontApiApplication` dependency providers).

#### CI Modernization

[](#ci-modernization)

- GitHub Actions: `ubuntu-22.04`, PHP `8.3`/`8.4` matrix, `actions/checkout@v4`
- PHPStan and Codeception test suites for all new code

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance64

Regular maintenance activity

Popularity40

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~749 days

Total

4

Last Release

589d ago

Major Versions

1.0.0 → 2.0.02019-08-21

PHP version history (3 changes)1.0.0PHP &gt;=7.1

2.0.1PHP &gt;=7.2

2.1.0PHP &gt;=7.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10738957?v=4)[Spryker Bot](/maintainers/spryker-bot)[@spryker-bot](https://github.com/spryker-bot)

---

Top Contributors

[![stereomon](https://avatars.githubusercontent.com/u/1382877?v=4)](https://github.com/stereomon "stereomon (25 commits)")[![dereuromark](https://avatars.githubusercontent.com/u/39854?v=4)](https://github.com/dereuromark "dereuromark (25 commits)")[![alex-galych](https://avatars.githubusercontent.com/u/18210425?v=4)](https://github.com/alex-galych "alex-galych (15 commits)")[![asaulenko](https://avatars.githubusercontent.com/u/20285714?v=4)](https://github.com/asaulenko "asaulenko (5 commits)")[![demkos](https://avatars.githubusercontent.com/u/2093777?v=4)](https://github.com/demkos "demkos (4 commits)")[![ishakuta](https://avatars.githubusercontent.com/u/193552?v=4)](https://github.com/ishakuta "ishakuta (3 commits)")[![a-sabaa](https://avatars.githubusercontent.com/u/1667759?v=4)](https://github.com/a-sabaa "a-sabaa (2 commits)")[![Nidhognit](https://avatars.githubusercontent.com/u/13098647?v=4)](https://github.com/Nidhognit "Nidhognit (1 commits)")[![spryker-release-bot](https://avatars.githubusercontent.com/u/26904324?v=4)](https://github.com/spryker-release-bot "spryker-release-bot (1 commits)")

###  Code Quality

TestsCodeception

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/spryker-eco-new-relic/health.svg)

```
[![Health](https://phpackages.com/badges/spryker-eco-new-relic/health.svg)](https://phpackages.com/packages/spryker-eco-new-relic)
```

###  Alternatives

[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2322.9M248](/packages/open-telemetry-sdk)[spryker/search

Search module

152.8M64](/packages/spryker-search)[pagemachine/typo3-formlog

Form log for TYPO3

23225.3k6](/packages/pagemachine-typo3-formlog)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8674.9k](/packages/illuminated-console-logger)[open-telemetry/opentelemetry-auto-wordpress

OpenTelemetry auto-instrumentation for Wordpress

17166.0k](/packages/open-telemetry-opentelemetry-auto-wordpress)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
