router icon indicating copy to clipboard operation
router copied to clipboard

Query planner metrics

Open BrynCooke opened this issue 1 year ago • 1 comments

Add a selector to allow displaying metrics about query plans. Metrics should be accessible via context so that we can write a selector to obtain

  • depth
  • breadth
  • anything else that is useful

BrynCooke avatar Mar 18 '24 15:03 BrynCooke

This would be really helpful for another large customer. We are tuning with APOLLO_FEDERATION_DEBUG=true when there is lots of use with @shareable it would also be maybe helpful to turn on a per-request debug mode that hade even more info for a given operation about the planning process, like:

  • Number of paths computed
  • Number steps used
  • Number of edges checked
  • Number of subgraphs considered

Also the outputted operation plan for each subgraph is a little different than the client operation, so other helpful stuff includes:

  • Size of the subgraph operation in fields and bytes
  • Aliases or requires overrides used

smyrick avatar Mar 18 '24 21:03 smyrick