Download the PHP package jomashop/module-new-relic-monitoring-for-gql without Composer
On this page you can find all versions of the php package jomashop/module-new-relic-monitoring-for-gql. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jomashop/module-new-relic-monitoring-for-gql
More information about jomashop/module-new-relic-monitoring-for-gql
Files in jomashop/module-new-relic-monitoring-for-gql
Package module-new-relic-monitoring-for-gql
Short Description Send GraphQL transactions to New Relic
License
Informations about the package module-new-relic-monitoring-for-gql
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
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:
- If the
operationName
field is set, use the operation name. - If the
operationName
field is not set, use the name of the query or mutation. - 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
Examples
- Operation name is set
In New Relic, the transaction name would be: /GraphQl/Controller/GraphQl\Mutation\createCustomerTest
- Operation name is not set and only 1 query/mutation is requested
In NR, the transaction name would be /GraphQl/Controller/GraphQl\Mutation\createCustomer
- Operation name is not set and multiple queries/mutations are requested
In NR, the transaction name would be /GraphQl/Controller/GraphQl\Query\Multiple
Change Log
- v1.1.1: Send requested fields as a custom parameter to NR
- v1.1.0: Able to log GraphQl errors