Apollo Gateway

AppSignal for Node.jsThis feature requires version 3.3.0 or higher.
@apollo/gatewayThis feature requires 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.

javascript
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:

javascript
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.