Launch GraphOS Studio

Apollo Router Telemetry

Collect observable data to monitor your router and supergraph

In this overview, learn about:

  • How telemetry enables observability and debuggability
  • What data is captured in the 's logs, metrics, and traces
  • What exporters are available to provide telemetry to your application performance monitoring (APM) tools

Apollo Router
native or
Request Lifecycle
(telemetry sources)
Logs, Metrics,
Traces Exporters
APM, agent,
or collector

Observability through telemetry

The health of your is only as good as the health of your . Because the router is the single entry point to the supergraph, all client requests pass through the router's request lifecycle. Any issues with the are likely to affect the handling of all requests to your .

Diagnosing your 's health and performance requires it to show observable data about its inner workings. The more observable data you can monitor and analyze, the faster you can identify unhealthy behaviors, deduce root causes, and implement fixes.

The provides the necessary data to monitor its health and troubleshoot issues. The router's observability is critical for maintaining a healthy, performant and minimizing its mean time to repair (MTTR).

Collect exactly the telemetry you need

Effective telemetry provides just the right amount and granularity of information to maintain your . Too much data can overwhelm your system, for example, with high cardinality metrics. Too little may not provide enough information to debug issues.

Specific events that need to be capturedand the conditions under which they need to be capturedcan change as client applications and change. Different environments, such as production and development, can have different observability requirements.

telemetry is customizable to meet the observability needs of different . You can record custom events in different stages of the router request lifecycle and create custom contexts with attributes to track a request or response as it flows through the . You can shape the volume and rate of emitted telemetry, for example, with batched telemetry.

Router telemetry types

The collects different types of telemetry, including:

These let you collect data about the inner workings of your and export logs, metrics, and traces to your application performance monitoring (APM) and observability tools.

Apollo Router
native or
Request Lifecycle
(telemetry sources)
OTLP-enabled APM
(e.g. New Relic)
Datadog agent
(agent or collector)

Logs and events

Logs record events in the . Examples of logged events include:

  • Information about the lifecycle
  • Warnings about misconfiguration
  • Errors that occurred during a request

Logs can be consumed by logging exporters and as part of spans via tracing exporters.

Metrics and instruments

Metrics monitor aggregate information about the . Metrics include histograms, gauges, and counts. An individual metric is called an instrument. Examples of instruments include:

  • Number of received requests
  • Histogram of request durations
  • Number of in-flight requests

You can find a full list of instruments in the instrument documentation.

Metrics can be consumed via metrics exporters.

Traces and spans

Traces monitor the flow of a request through the . A trace is composed of spans. A span captures a request's duration as it flows through the request lifecycle. Spans may include contextual information about the request, such as the HTTP status code, or the name of the being queried.

Examples of spans include:

  • router - Wraps an entire request from the HTTP perspective
  • supergraph - Wraps a request once parsing has taken place
  • subgraph - Wraps a request to a .

Traces are consumed via tracing exporters.

Router telemetry exporters

The exports its collected telemetry in formats compatible with industry-standard APM tools. The router supports logging, metrics, and tracing exporters for a variety of tools, including:

  • Prometheus
  • OpenTelemetry Collector
  • Datadog
  • New Relic
  • Jaeger
  • Zipkin

For more information, see logging exporters, metrics exporters, and tracing exporters.

Router telemetry attributes

You can annotate events, metrics, and spans with attributes. Attributes are key-value pairs that add contextual information about the pipeline to telemetry. You can then use these attributes to filter and group data in your APMs.

Example attributes include:

  • HTTP status code
  • name

You can use standard attributes or selectors as span attributes.

Custom attributes for spans require a Dedicated or Enterprise plan.

Entity caching
Subgraph error inclusion
Edit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy