graycore/new-relic-graph-ql

This package is abandoned and no longer maintained. No replacement package was suggested.

Create custom events for every graphQl query and mutation in magento 2

dev-main 2021-12-03 19:46 UTC

This package is auto-updated.

Last update: 2023-06-29 01:56:53 UTC


README

Purpose

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.

Details

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"
}

Getting Started

This module is intended to be installed with composer. From the root of your Magento 2 project:

  1. Download the package
composer require graycore/new-relic-graph-ql
  1. Enable the package
./bin/magento module:enable Graycore_NewRelicGraphQl