Trace

mdg.engine.proto.reports.Trace
See theTrace companion object
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
Graph
Supertypes
trait Updatable[Trace]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def companion: Trace.type
def getEndTime: Timestamp
def getField(`__field`: FieldDescriptor): PValue
def getFieldByNumber(`__fieldNumber`: Int): Any
def getHttp: HTTP
def getRoot: Node
def getStartTime: Timestamp
override def serializedSize: Int

Attributes

Definition Classes
GeneratedMessage
def toProtoString: String

Returns a human-readable ASCII format representation of this message.

Returns a human-readable ASCII format representation of this message.

The original message can be decoded from this format by using fromAscii on the companion object.

Attributes

Returns

human-readable representation of this message.

def withClientAddress(`__v`: String): Trace
def withClientName(`__v`: String): Trace
def withClientReferenceId(`__v`: String): Trace
def withClientVersion(`__v`: String): Trace
def withDetails(`__v`: Details): Trace
def withDurationNs(`__v`: Long): Trace
def withEndTime(`__v`: Timestamp): Trace
def withForbiddenOperation(`__v`: Boolean): Trace
def withFullQueryCacheHit(`__v`: Boolean): Trace
def withHttp(`__v`: HTTP): Trace
def withPersistedQueryHit(`__v`: Boolean): Trace
def withPersistedQueryRegister(`__v`: Boolean): Trace
def withRegisteredOperation(`__v`: Boolean): Trace
def withRoot(`__v`: Node): Trace
def withSignature(`__v`: String): Trace
def withStartTime(`__v`: Timestamp): Trace
def withUnexecutedOperationBody(`__v`: String): Trace
def withUnexecutedOperationName(`__v`: String): Trace
def withUnknownFields(`__v`: UnknownFieldSet): Trace
def writeTo(`_output__`: CodedOutputStream): Unit

Serializes the message into the given coded output stream

Serializes the message into the given coded output stream

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def toByteArray: Array[Byte]

Serializes the message and returns a byte array containing its raw bytes

Serializes the message and returns a byte array containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
final def toByteString: ByteString

Serializes the message and returns a ByteString containing its raw bytes

Serializes the message and returns a ByteString containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
final def toPMessage: PMessage

Attributes

Inherited from:
GeneratedMessage
def update(ms: Lens[Trace, Trace] => () => Trace*): A

Attributes

Inherited from:
Updatable
final def writeDelimitedTo(output: OutputStream): Unit

Attributes

Inherited from:
GeneratedMessage
final def writeTo(output: OutputStream): Unit

Serializes the message into the given output stream

Serializes the message into the given output stream

Attributes

Inherited from:
GeneratedMessage