Docs
Try Apollo Studio

Sending Apollo Router usage data to Apollo Studio


The Apollo Router can transmit usage data to Apollo Studio via a reporting agent called Spaceport. By default, Spaceport runs automatically as a component within the Apollo Router. Additional details on its modes of operation are provided below.

Enabling usage reporting

You can enable usage reporting in the Apollo Router by setting the following environment variables:

export APOLLO_KEY=<YOUR_GRAPH_API_KEY>
export APOLLO_GRAPH_REF=<YOUR_GRAPH_ID>@<VARIANT>

More information on usage reporting is available in the Studio documentation.

Spaceport can run either as an internal component of a single Apollo Router instance, or as an external resource shared by multiple router instances.

For the majority of users an internal Spaceport instance is sufficient.

To connect the Apollo Router to an external spaceport specify the endpoint in the config.

router.yaml
telemetry:
# Optional Apollo telemetry configuration.
apollo:
# Optional external Spaceport URL.
# If not specified an in-process spaceport is used.
endpoint: "https://my-spaceport"

Running spaceport as a separate process currently requires building from source.

Edit on GitHub
Previous
Health check
Next
Collecting metrics