Configure GraphQL Custom Match Rule for a Node.js Application

By default, GraphQL Business Transactions is disabled. To configure the Node.js Agent to enable GraphQL Business Transactions, set enableGraphQL true profile()

Once GraphQL Business Transactions is enabled, you can configure a GraphQL custom match rule for a Node.js application:

  1. In the Controller, select Configuration > Instrumentation > Transaction > Detection.
  2. Click Add Rule > Summary > Custom Match Rule.
  3. Select Node.js in the Agent Type dropdown. Click Next.
  4. Enter a name for the match rule and ensure that the enabled checkbox is checked.
  5. Click Select Scope and select the desired scope for the rule. Click OK.
  6. Next, navigate to Rule Configuration > HTTP Request Match Criteria and click Add.
  7. Select URI as the criteria and choose the desired operation from the dropdown list. Then, enter the desired value for the GraphQL incantation (for example, the URL prefix).
  8. Navigate to Split Transactions Using Request Data and click the Split Transactions Using Request Data checkbox.
  9. Select the graphql operation name from the dropdown and select Save.Split Transaction Using Request Data
Upon configuring the rule and sending a GraphQL queries in your application, the Business Transactions page displays separate transactions.