This module intends to create custom event data in new relic for every graphQl request made in Magento 2. It will create one event for each root node in the graphQl request.
This module depends on Magento 2 - Automatic GraphQL transaction naming for New Relic from joma-webdevs to extract query details, as a side effect it will add to the APM transaction more GraphQl request data
The event name is GraphQlTransaction and its data has the following structure:
{
"operation": "Mutation|Query",
"transactionName": "/GraphQl/Controller/GraphQl\\Query\\country",
"nodeName": "country"
}
This module is intended to be installed with composer. From the root of your Magento 2 project:
- Download the package
composer require graycore/new-relic-graph-ql
- Enable the package
./bin/magento module:enable Graycore_NewRelicGraphQl