PHPackages                             jomashop/module-new-relic-monitoring-for-gql - 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. [API Development](/categories/api)
4. /
5. jomashop/module-new-relic-monitoring-for-gql

ActiveMagento2-module[API Development](/categories/api)

jomashop/module-new-relic-monitoring-for-gql
============================================

Send GraphQL transactions to New Relic

1.1.1(4y ago)15145.9k—3.8%3[2 PRs](https://github.com/joma-webdevs/automatic-graphql-transaction-naming-for-new-relic/pulls)PHP

Since Jun 29Pushed 2y ago3 watchersCompare

[ Source](https://github.com/joma-webdevs/automatic-graphql-transaction-naming-for-new-relic)[ Packagist](https://packagist.org/packages/jomashop/module-new-relic-monitoring-for-gql)[ RSS](/packages/jomashop-module-new-relic-monitoring-for-gql/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Magento 2 - Automatic GraphQL transaction naming for New Relic
==============================================================

[](#magento-2---automatic-graphql-transaction-naming-for-new-relic)

New Relic's PHP agent has support for automatic transaction naming for REST and SOAP, but not GraphQL. Thus, this Magento 2 module is developed to support sending a GraphQL transaction name to New Relic automatically.

Details
-------

[](#details)

A transaction is named based on the service class and method that handled the request, `/GraphQl/Controller/GraphQl\{operation name|(query|mutation)}\{name|Multiple}`.

The logic is explained as follows:

1. If the `operationName` field is set, use the operation name.
2. If the `operationName` field is not set, use the name of the query or mutation.
3. If a GraphQL query consists of multiple queries or mutations, the transaction would be indicated as 'Multiple'. Note that in any cases, the `operationName` field takes the priority.

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

[](#installation)

```
composer require jomashop/module-new-relic-monitoring-for-gql

```

Examples
--------

[](#examples)

1. Operation name is set

```
mutation createCustomerTest{
  createCustomer(
    input: {
      firstname: "Bob"
      lastname: "Loblaw"
      email: "test@example.com"
      password: "b0bl0bl@w"
      is_subscribed: true
    }
  ) {
    customer {
      firstname
      lastname
      email
      is_subscribed
    }
  }
}
```

In New Relic, the transaction name would be: `/GraphQl/Controller/GraphQl\Mutation\createCustomerTest`

2. Operation name is not set and only 1 query/mutation is requested

```
mutation {
  createCustomer(
    input: {
      firstname: "Bob"
      lastname: "Loblaw"
      email: "test@example.com"
      password: "b0bl0bl@w"
      is_subscribed: true
    }
  ) {
    customer {
      firstname
      lastname
      email
      is_subscribed
    }
  }
}
```

In NR, the transaction name would be `/GraphQl/Controller/GraphQl\Mutation\createCustomer`

3. Operation name is not set and multiple queries/mutations are requested

```
query {
  cmsBlocks(identifiers: "footer_links_block") {
    items {
      identifier
      title
      content
    }
  },
  storeConfig {
    id
    code
    website_id
    locale
    base_currency_code
    default_display_currency_code
    timezone
    weight_unit
    base_url
    base_link_url
    base_static_url
    base_media_url
    secure_base_url
    secure_base_link_url
    secure_base_static_url
    secure_base_media_url
    store_name
  }
}
```

In NR, the transaction name would be `/GraphQl/Controller/GraphQl\Query\Multiple`

Change Log
----------

[](#change-log)

- v1.1.1: Send requested fields as a custom parameter to NR
- v1.1.0: Able to log GraphQl errors

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

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 ~200 days

Total

3

Last Release

1748d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/05abbed121ec9bce2195e77844cbcf38805e937cafc61baa10bcb2a549eeedbc?d=identicon)[jomashop\_packagist](/maintainers/jomashop_packagist)

---

Top Contributors

[![captain-mel](https://avatars.githubusercontent.com/u/61065256?v=4)](https://github.com/captain-mel "captain-mel (4 commits)")[![captain-melanie](https://avatars.githubusercontent.com/u/20979257?v=4)](https://github.com/captain-melanie "captain-melanie (2 commits)")

---

Tags

graphqlgraphql-transactionmagentomagento2newrelictransactionname

### Embed Badge

![Health badge](/badges/jomashop-module-new-relic-monitoring-for-gql/health.svg)

```
[![Health](https://phpackages.com/badges/jomashop-module-new-relic-monitoring-for-gql/health.svg)](https://phpackages.com/packages/jomashop-module-new-relic-monitoring-for-gql)
```

###  Alternatives

[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8044.5M33](/packages/smile-elasticsuite)[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[graycore/magento2-cors

A Magento 2 module that enables CORS on the GraphQL and REST Apis

99516.1k](/packages/graycore-magento2-cors)[elgentos/module-prismicio

Magento 2 - Prismic.io integration

39112.0k3](/packages/elgentos-module-prismicio)[zepgram/module-rest

Technical module to industrialize API REST call with dependency injection pattern using Guzzle library

1326.2k](/packages/zepgram-module-rest)

PHPackages © 2026

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