Apollo Gateway

This feature requires AppSignal for Node.js version 3.3.0 or higher.
This feature requires @apollo/gateway version 2.6.0 or higher.

Installation and usage

To use the Apollo Gateway instrumentation, you need to disable the GraphQL instrumentation in the service that acts as the gateway. This is because the gateway will send its own spans using the @apollo/gateway OpenTelemetry instrumentation for the queries it proxies to the services that implements in the supergraph.

To do so, you can use the disableInstrumentations option in the appsignal configuration.

Node.js
const { Appsignal } = require("@appsignal/nodejs"); new Appsignal({ active: true, name: "your-app-name", pushApiKey: "your-push-api-key", disableDefaultInstrumentations: ["@opentelemetry/instrumentation-graphql"], });

You also need to enable the OpenTelemetry instrumentation in your Apollo Gateway config:

Node.js
const config = { telemetry: { includeDocument: true, reportExceptions: 1, }, };

Features

The Apollo Gateway instrumentation will send root spans to AppSignal based on the queries it receives and routes to the subgraphs.

You will be able to inspect this data in the Event timeline of performance issues:

Screenshot of Event timeline showing gateway.request events

If your federated services are also instrumented with AppSignal, you'll get the usual GraphQL spans for them as well.