mdg.engine.proto.reports

Members list

Type members

Classlikes

final case class ContextualizedQueryLatencyStats(queryLatencyStats: Option[QueryLatencyStats], context: Option[StatsContext], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[ContextualizedQueryLatencyStats]

Attributes

Companion
object
Supertypes
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ContextualizedQueryLatencyStats extends GeneratedMessageCompanion[ContextualizedQueryLatencyStats]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[ContextualizedQueryLatencyStats]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class ContextualizedStats(context: Option[StatsContext], queryLatencyStats: Option[QueryLatencyStats], perTypeStat: Map[String, TypeStat], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[ContextualizedStats]

Value parameters

perTypeStat

Key is type name.

Attributes

Companion
object
Supertypes
trait Updatable[ContextualizedStats]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ContextualizedStats extends GeneratedMessageCompanion[ContextualizedStats]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[ContextualizedStats]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class ContextualizedTypeStats(context: Option[StatsContext], perTypeStat: Map[String, TypeStat], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[ContextualizedTypeStats]

Attributes

Companion
object
Supertypes
trait Updatable[ContextualizedTypeStats]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ContextualizedTypeStats extends GeneratedMessageCompanion[ContextualizedTypeStats]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[ContextualizedTypeStats]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class Field(name: String, returnType: String, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[Field]

Value parameters

name

required; eg "email" for User.email:String!

returnType

required; eg "String!" for User.email:String!

Attributes

Companion
object
Supertypes
trait Updatable[Field]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Field extends GeneratedMessageCompanion[Field]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[Field]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
Field.type
final case class FieldStat(returnType: String, errorsCount: Long, count: Long, requestsWithErrorsCount: Long, latencyCount: Seq[Long], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[FieldStat]

Value parameters

latencyCount

Duration histogram; see docs/histograms.md

returnType

required; eg "String!" for User.email:String!

Attributes

Companion
object
Supertypes
trait Updatable[FieldStat]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object FieldStat extends GeneratedMessageCompanion[FieldStat]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[FieldStat]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
FieldStat.type
final case class PathErrorStats(children: Map[String, PathErrorStats], errorsCount: Long, requestsWithErrorsCount: Long, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[PathErrorStats]

Attributes

Companion
object
Supertypes
trait Updatable[PathErrorStats]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object PathErrorStats extends GeneratedMessageCompanion[PathErrorStats]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[PathErrorStats]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class QueryLatencyStats(latencyCount: Seq[Long], requestCount: Long, cacheHits: Long, persistedQueryHits: Long, persistedQueryMisses: Long, cacheLatencyCount: Seq[Long], rootErrorStats: Option[PathErrorStats], requestsWithErrorsCount: Long, publicCacheTtlCount: Seq[Long], privateCacheTtlCount: Seq[Long], registeredOperationCount: Long, forbiddenOperationCount: Long, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[QueryLatencyStats]

Attributes

Companion
object
Supertypes
trait Updatable[QueryLatencyStats]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object QueryLatencyStats extends GeneratedMessageCompanion[QueryLatencyStats]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[QueryLatencyStats]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class Report(header: Option[ReportHeader], tracesPerQuery: Map[String, TracesAndStats], endTime: Option[Timestamp], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[Report]

This is the top-level message used by the new traces ingress. This is designed for the apollo-engine-reporting TypeScript agent and will eventually be documented as a public ingress API. This message consists solely of traces; the equivalent of the StatsReport is automatically generated server-side from this message. Agent should either send a trace or include it in the stats for every request in this report. Generally, buffering up until a large size has been reached (say, 4MB) or 5-10 seconds has passed is appropriate. This message used to be know as FullTracesReport, but got renamed since it isn't just for traces anymore

This is the top-level message used by the new traces ingress. This is designed for the apollo-engine-reporting TypeScript agent and will eventually be documented as a public ingress API. This message consists solely of traces; the equivalent of the StatsReport is automatically generated server-side from this message. Agent should either send a trace or include it in the stats for every request in this report. Generally, buffering up until a large size has been reached (say, 4MB) or 5-10 seconds has passed is appropriate. This message used to be know as FullTracesReport, but got renamed since it isn't just for traces anymore

Value parameters

endTime

This is the time that the requests in this trace are considered to have taken place If this field is not present the max of the end_time of each trace will be used instead. If there are no traces and no end_time present the report will not be able to be processed. Note: This will override the end_time from traces. required if no traces in this message

tracesPerQuery

key is statsReportKey (# operationName&92;nsignature) Note that the nested traces will not have a signature or details.operationName (because the key is adequate). We also assume that traces don't have legacy_per_query_implicit_operation_name, and we don't require them to have details.raw_query (which would consume a lot of space and has privacy/data access issues, and isn't currently exposed by our app anyway).

Attributes

Companion
object
Supertypes
trait Updatable[Report]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Report extends GeneratedMessageCompanion[Report]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[Report]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
Report.type
final case class ReportHeader(hostname: String, agentVersion: String, serviceVersion: String, runtimeVersion: String, uname: String, schemaTag: String, executableSchemaId: String, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[ReportHeader]

The service value embedded within the header key is not guaranteed to contain an actual service, and, in most cases, the service information is trusted to come from upstream processing. If the service is specified in this header, then it is checked to match the context that is reporting it. Otherwise, the service information is deduced from the token context of the reporter and then sent along via other mechanisms (in Kafka, the `ReportKafkaKey). The other information (hostname, agent_version, etc.) is sent by the Apollo Engine Reporting agent, but we do not currently save that information to any of our persistent storage.

The service value embedded within the header key is not guaranteed to contain an actual service, and, in most cases, the service information is trusted to come from upstream processing. If the service is specified in this header, then it is checked to match the context that is reporting it. Otherwise, the service information is deduced from the token context of the reporter and then sent along via other mechanisms (in Kafka, the `ReportKafkaKey). The other information (hostname, agent_version, etc.) is sent by the Apollo Engine Reporting agent, but we do not currently save that information to any of our persistent storage.

Value parameters

agentVersion

eg "engineproxy 0.1.0" required

executableSchemaId

An id that is used to represent the schema to Apollo Graph Manager Using this in place of what used to be schema_hash, since that is no longer attached to a schema in the backend.

hostname

eg "host-01.example.com"

runtimeVersion

eg "node v4.6.0"

schemaTag

eg "current", "prod"

serviceVersion

eg "prod-4279-20160804T065423Z-5-g3cf0aa8" (taken from git describe --tags)

uname

eg "Linux box 4.6.5-1-ec2 #1 SMP Mon Aug 1 02:31:38 PDT 2016 x86_64 GNU/Linux"

Attributes

Companion
object
Supertypes
trait Updatable[ReportHeader]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ReportHeader extends GeneratedMessageCompanion[ReportHeader]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[ReportHeader]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
object ReportsProto extends GeneratedFileObject

Attributes

Supertypes
class GeneratedFileObject
class Object
trait Matchable
class Any
Self type
final case class StatsContext(clientReferenceId: String, clientName: String, clientVersion: String, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[StatsContext]

Attributes

Companion
object
Supertypes
trait Updatable[StatsContext]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object StatsContext extends GeneratedMessageCompanion[StatsContext]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[StatsContext]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class Trace(startTime: Option[Timestamp], endTime: Option[Timestamp], durationNs: Long, root: Option[Node], signature: String, unexecutedOperationBody: String, unexecutedOperationName: String, details: Option[Details], clientName: String, clientVersion: String, clientAddress: String, clientReferenceId: String, http: Option[HTTP], cachePolicy: Option[CachePolicy], queryPlan: Option[QueryPlanNode], fullQueryCacheHit: Boolean, persistedQueryHit: Boolean, persistedQueryRegister: Boolean, registeredOperation: Boolean, forbiddenOperation: Boolean, legacySignatureNeedsResigning: String, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[Trace]

Value parameters

clientName

Note: engineproxy always sets client_name, client_version, and client_address to "none". apollo-engine-reporting allows for them to be set by the user.

durationNs

High precision duration of the trace; may not equal end_time-start_time (eg, if your machine's clock changed during the trace). required

endTime

Wallclock time when the trace ended. required

forbiddenOperation

Was this operation forbidden due to lack of safelisting?

fullQueryCacheHit

Was this response served from a full query response cache? (In that case the node tree will have no resolvers.)

legacySignatureNeedsResigning

Older agents (eg the Go engineproxy) relied to some degree on the Engine backend to run their own semi-compatible implementation of a specific variant of query signatures. The backend does not do this for new agents (which set the above 'signature' field). It used to still "re-sign" signatures from engineproxy, but we've now simplified the backend to no longer do this. Deprecated and ignored in FullTracesReports.

persistedQueryHit

Was this query specified successfully as a persisted query hash?

persistedQueryRegister

Did this query contain both a full query string and a persisted query hash? (This typically means that a previous request was rejected as an unknown persisted query.)

queryPlan

If this Trace was created by a gateway, this is the query plan, including sub-Traces for federated services. Note that the 'root' tree on the top-level Trace won't contain any resolvers (though it could contain errors that occurred in the gateway itself).

registeredOperation

Was this operation registered and a part of the safelist?

root

A tree containing information about all resolvers run directly by this service, including errors.

signature

In addition to details.raw_query, we include a "signature" of the query, which can be normalized: for example, you may want to discard aliases, drop unused operations and fragments, sort fields, etc. The most important thing here is that the signature match the signature in StatsReports. In StatsReports signatures show up as the key in the per_query map (with the operation name prepended). The signature should be a valid GraphQL query. All traces must have a signature; if this Trace is in a FullTracesReport that signature is in the key of traces_per_query rather than in this field. Engineproxy provides the signature in legacy_signature_needs_resigning instead.

startTime

Wallclock time when the trace began. required

unexecutedOperationBody

Optional: when GraphQL parsing or validation against the GraphQL schema fails, these fields can include reference to the operation being sent for users to dig into the set of operations that are failing validation.

Attributes

Companion
object
Supertypes
trait Updatable[Trace]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Trace extends GeneratedMessageCompanion[Trace]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[Trace]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
Trace.type
final case class TracesAndStats(trace: Seq[Trace], statsWithContext: Seq[ContextualizedStats], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[TracesAndStats]

A sequence of traces and stats. An individual trace should either be counted as a stat or trace

A sequence of traces and stats. An individual trace should either be counted as a stat or trace

Attributes

Companion
object
Supertypes
trait Updatable[TracesAndStats]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TracesAndStats extends GeneratedMessageCompanion[TracesAndStats]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[TracesAndStats]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class Type(name: String, field: Seq[Field], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[Type]

Value parameters

name

required; eg "User" for User.email:String!

Attributes

Companion
object
Supertypes
trait Updatable[Type]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Type extends GeneratedMessageCompanion[Type]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[Type]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
Type.type
final case class TypeStat(perFieldStat: Map[String, FieldStat], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[TypeStat]

Value parameters

perFieldStat

Key is (eg) "email" for User.email:String!

Attributes

Companion
object
Supertypes
trait Updatable[TypeStat]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TypeStat extends GeneratedMessageCompanion[TypeStat]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[TypeStat]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
TypeStat.type