You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The unique reporting agent that generated this report.
349
+
stringagent_id=13;
350
+
323
351
reserved3; // removed string service = 3;
324
352
}
325
353
@@ -371,6 +399,29 @@ message QueryLatencyStats {
371
399
reserved1, 6, 9, 10;
372
400
}
373
401
402
+
// Stats on the query that can be populated by the gateway or router.
403
+
messageLimitsStats {
404
+
// The strategy used in cost calculations.
405
+
stringstrategy=1;
406
+
// The estimated cost as calculated via the strategy specified in stats context
407
+
// The reason that this is a histogram rather than fixed cost is that it can be affected by paging variables.
408
+
repeatedsint64cost_estimated=2 ;
409
+
// The maximum estimated cost of the query
410
+
uint64max_cost_estimated=3;
411
+
// The actual cost using the strategy specified in stats context
412
+
repeatedsint64cost_actual=4 ;
413
+
// The maximum estimated cost of the query
414
+
uint64max_cost_actual=5;
415
+
// The total depth of the query
416
+
uint64depth=6;
417
+
// The height of the query
418
+
uint64height=7;
419
+
// The number of aliases in the query
420
+
uint64alias_count=8;
421
+
// The number of root fields in the query
422
+
uint64root_field_count=9;
423
+
}
424
+
374
425
// The context around a block of stats and traces indicating from which client the operation was executed and its
375
426
// operation type. Operation type and subtype are only used by Apollo Router.
376
427
messageStatsContext {
@@ -379,6 +430,12 @@ message StatsContext {
379
430
stringclient_version=3;
380
431
stringoperation_type=4;
381
432
stringoperation_subtype=5;
433
+
// The result of the operation. Either OK or the error code that caused the operation to fail.
434
+
// This will not contain all errors from a query, only the primary reason the operation failed. e.g. a limits failure or an auth failure.
435
+
stringresult=6;
436
+
// Client awareness contexts
437
+
stringclient_library_name=7;
438
+
stringclient_library_version=8;
382
439
}
383
440
384
441
messageContextualizedQueryLatencyStats {
@@ -426,12 +483,27 @@ message FieldStat {
426
483
reserved1, 2, 7, 8;
427
484
}
428
485
486
+
// As FieldStat only gets returned for FTV1 payloads this is a separate message that can be used to collect stats in the router or gateway obtained directly from the request schema and response.
487
+
messageLocalFieldStat {
488
+
stringreturn_type=1; // required; eg "String!" for User.email:String!
489
+
// Histogram of returned array sizes
490
+
repeatedsint64array_size=2 ;
491
+
}
492
+
429
493
messageTypeStat {
430
494
// Key is (eg) "email" for User.email:String!
431
495
map<string, FieldStat> per_field_stat=3;
496
+
432
497
reserved1, 2;
433
498
}
434
499
500
+
messageLocalTypeStat {
501
+
// Key is (eg) "email" for User.email:String!
502
+
// Unlike FieldStat, this is populated outside of FTV1 requests.
0 commit comments