diff --git a/.gitignore b/.gitignore index 9fb9693df8e..31346424ae0 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ .idea/ *.test *.out +gqlgen diff --git a/_examples/go.sum b/_examples/go.sum index 6c27098ea02..e624b8aaeda 100644 --- a/_examples/go.sum +++ b/_examples/go.sum @@ -20,6 +20,8 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -141,6 +143,8 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/go.mod b/go.mod index 9684462b4e6..42769c98894 100644 --- a/go.mod +++ b/go.mod @@ -15,6 +15,7 @@ require ( github.com/urfave/cli/v2 v2.4.0 github.com/vektah/gqlparser/v2 v2.4.2 golang.org/x/tools v0.1.10 + google.golang.org/protobuf v1.28.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index aa94e9855e4..e317c504370 100644 --- a/go.sum +++ b/go.sum @@ -13,6 +13,9 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= @@ -82,8 +85,12 @@ golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/graphql/handler.go b/graphql/handler.go index 921165978c2..b76381f43ec 100644 --- a/graphql/handler.go +++ b/graphql/handler.go @@ -27,6 +27,7 @@ type ( OperationName string `json:"operationName"` Variables map[string]interface{} `json:"variables"` Extensions map[string]interface{} `json:"extensions"` + Headers http.Header `json:"headers"` ReadTime TraceTiming `json:"-"` } diff --git a/graphql/handler/apollofederatedtracingv1/generated/apollo_trace.pb.go b/graphql/handler/apollofederatedtracingv1/generated/apollo_trace.pb.go new file mode 100644 index 00000000000..548d4ad3a99 --- /dev/null +++ b/graphql/handler/apollofederatedtracingv1/generated/apollo_trace.pb.go @@ -0,0 +1,3206 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.19.4 +// source: apollo_trace.proto + +package generated + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Trace_CachePolicy_Scope int32 + +const ( + Trace_CachePolicy_UNKNOWN Trace_CachePolicy_Scope = 0 + Trace_CachePolicy_PUBLIC Trace_CachePolicy_Scope = 1 + Trace_CachePolicy_PRIVATE Trace_CachePolicy_Scope = 2 +) + +// Enum value maps for Trace_CachePolicy_Scope. +var ( + Trace_CachePolicy_Scope_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUBLIC", + 2: "PRIVATE", + } + Trace_CachePolicy_Scope_value = map[string]int32{ + "UNKNOWN": 0, + "PUBLIC": 1, + "PRIVATE": 2, + } +) + +func (x Trace_CachePolicy_Scope) Enum() *Trace_CachePolicy_Scope { + p := new(Trace_CachePolicy_Scope) + *p = x + return p +} + +func (x Trace_CachePolicy_Scope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Trace_CachePolicy_Scope) Descriptor() protoreflect.EnumDescriptor { + return file_apollo_trace_proto_enumTypes[0].Descriptor() +} + +func (Trace_CachePolicy_Scope) Type() protoreflect.EnumType { + return &file_apollo_trace_proto_enumTypes[0] +} + +func (x Trace_CachePolicy_Scope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Trace_CachePolicy_Scope.Descriptor instead. +func (Trace_CachePolicy_Scope) EnumDescriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 0, 0} +} + +type Trace_HTTP_Method int32 + +const ( + Trace_HTTP_UNKNOWN Trace_HTTP_Method = 0 + Trace_HTTP_OPTIONS Trace_HTTP_Method = 1 + Trace_HTTP_GET Trace_HTTP_Method = 2 + Trace_HTTP_HEAD Trace_HTTP_Method = 3 + Trace_HTTP_POST Trace_HTTP_Method = 4 + Trace_HTTP_PUT Trace_HTTP_Method = 5 + Trace_HTTP_DELETE Trace_HTTP_Method = 6 + Trace_HTTP_TRACE Trace_HTTP_Method = 7 + Trace_HTTP_CONNECT Trace_HTTP_Method = 8 + Trace_HTTP_PATCH Trace_HTTP_Method = 9 +) + +// Enum value maps for Trace_HTTP_Method. +var ( + Trace_HTTP_Method_name = map[int32]string{ + 0: "UNKNOWN", + 1: "OPTIONS", + 2: "GET", + 3: "HEAD", + 4: "POST", + 5: "PUT", + 6: "DELETE", + 7: "TRACE", + 8: "CONNECT", + 9: "PATCH", + } + Trace_HTTP_Method_value = map[string]int32{ + "UNKNOWN": 0, + "OPTIONS": 1, + "GET": 2, + "HEAD": 3, + "POST": 4, + "PUT": 5, + "DELETE": 6, + "TRACE": 7, + "CONNECT": 8, + "PATCH": 9, + } +) + +func (x Trace_HTTP_Method) Enum() *Trace_HTTP_Method { + p := new(Trace_HTTP_Method) + *p = x + return p +} + +func (x Trace_HTTP_Method) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Trace_HTTP_Method) Descriptor() protoreflect.EnumDescriptor { + return file_apollo_trace_proto_enumTypes[1].Descriptor() +} + +func (Trace_HTTP_Method) Type() protoreflect.EnumType { + return &file_apollo_trace_proto_enumTypes[1] +} + +func (x Trace_HTTP_Method) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Trace_HTTP_Method.Descriptor instead. +func (Trace_HTTP_Method) EnumDescriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 3, 0} +} + +type Trace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Wallclock time when the trace began. + StartTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // required + // Wallclock time when the trace ended. + EndTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // required + // High precision duration of the trace; may not equal end_time-start_time + // (eg, if your machine's clock changed during the trace). + DurationNs uint64 `protobuf:"varint,11,opt,name=duration_ns,json=durationNs,proto3" json:"duration_ns,omitempty"` // required + // A tree containing information about all resolvers run directly by this + // service, including errors. + Root *Trace_Node `protobuf:"bytes,14,opt,name=root,proto3" json:"root,omitempty"` + // 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. + Signature string `protobuf:"bytes,19,opt,name=signature,proto3" json:"signature,omitempty"` + // 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. + UnexecutedOperationBody string `protobuf:"bytes,27,opt,name=unexecutedOperationBody,proto3" json:"unexecutedOperationBody,omitempty"` + UnexecutedOperationName string `protobuf:"bytes,28,opt,name=unexecutedOperationName,proto3" json:"unexecutedOperationName,omitempty"` + Details *Trace_Details `protobuf:"bytes,6,opt,name=details,proto3" json:"details,omitempty"` + ClientName string `protobuf:"bytes,7,opt,name=client_name,json=clientName,proto3" json:"client_name,omitempty"` + ClientVersion string `protobuf:"bytes,8,opt,name=client_version,json=clientVersion,proto3" json:"client_version,omitempty"` + Http *Trace_HTTP `protobuf:"bytes,10,opt,name=http,proto3" json:"http,omitempty"` + CachePolicy *Trace_CachePolicy `protobuf:"bytes,18,opt,name=cache_policy,json=cachePolicy,proto3" json:"cache_policy,omitempty"` + // 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). + QueryPlan *Trace_QueryPlanNode `protobuf:"bytes,26,opt,name=query_plan,json=queryPlan,proto3" json:"query_plan,omitempty"` + // Was this response served from a full query response cache? (In that case + // the node tree will have no resolvers.) + FullQueryCacheHit bool `protobuf:"varint,20,opt,name=full_query_cache_hit,json=fullQueryCacheHit,proto3" json:"full_query_cache_hit,omitempty"` + // Was this query specified successfully as a persisted query hash? + PersistedQueryHit bool `protobuf:"varint,21,opt,name=persisted_query_hit,json=persistedQueryHit,proto3" json:"persisted_query_hit,omitempty"` + // 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.) + PersistedQueryRegister bool `protobuf:"varint,22,opt,name=persisted_query_register,json=persistedQueryRegister,proto3" json:"persisted_query_register,omitempty"` + // Was this operation registered and a part of the safelist? + RegisteredOperation bool `protobuf:"varint,24,opt,name=registered_operation,json=registeredOperation,proto3" json:"registered_operation,omitempty"` + // Was this operation forbidden due to lack of safelisting? + ForbiddenOperation bool `protobuf:"varint,25,opt,name=forbidden_operation,json=forbiddenOperation,proto3" json:"forbidden_operation,omitempty"` + // Some servers don't do field-level instrumentation for every request and assign + // each request a "weight" for each request that they do instrument. When this + // trace is aggregated into field usage stats, it should count as this value + // towards the estimated_execution_count rather than just 1. This value should + // typically be at least 1. + // + // 0 is treated as 1 for backwards compatibility. + FieldExecutionWeight float64 `protobuf:"fixed64,31,opt,name=field_execution_weight,json=fieldExecutionWeight,proto3" json:"field_execution_weight,omitempty"` +} + +func (x *Trace) Reset() { + *x = Trace{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace) ProtoMessage() {} + +func (x *Trace) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace.ProtoReflect.Descriptor instead. +func (*Trace) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0} +} + +func (x *Trace) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *Trace) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *Trace) GetDurationNs() uint64 { + if x != nil { + return x.DurationNs + } + return 0 +} + +func (x *Trace) GetRoot() *Trace_Node { + if x != nil { + return x.Root + } + return nil +} + +func (x *Trace) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *Trace) GetUnexecutedOperationBody() string { + if x != nil { + return x.UnexecutedOperationBody + } + return "" +} + +func (x *Trace) GetUnexecutedOperationName() string { + if x != nil { + return x.UnexecutedOperationName + } + return "" +} + +func (x *Trace) GetDetails() *Trace_Details { + if x != nil { + return x.Details + } + return nil +} + +func (x *Trace) GetClientName() string { + if x != nil { + return x.ClientName + } + return "" +} + +func (x *Trace) GetClientVersion() string { + if x != nil { + return x.ClientVersion + } + return "" +} + +func (x *Trace) GetHttp() *Trace_HTTP { + if x != nil { + return x.Http + } + return nil +} + +func (x *Trace) GetCachePolicy() *Trace_CachePolicy { + if x != nil { + return x.CachePolicy + } + return nil +} + +func (x *Trace) GetQueryPlan() *Trace_QueryPlanNode { + if x != nil { + return x.QueryPlan + } + return nil +} + +func (x *Trace) GetFullQueryCacheHit() bool { + if x != nil { + return x.FullQueryCacheHit + } + return false +} + +func (x *Trace) GetPersistedQueryHit() bool { + if x != nil { + return x.PersistedQueryHit + } + return false +} + +func (x *Trace) GetPersistedQueryRegister() bool { + if x != nil { + return x.PersistedQueryRegister + } + return false +} + +func (x *Trace) GetRegisteredOperation() bool { + if x != nil { + return x.RegisteredOperation + } + return false +} + +func (x *Trace) GetForbiddenOperation() bool { + if x != nil { + return x.ForbiddenOperation + } + return false +} + +func (x *Trace) GetFieldExecutionWeight() float64 { + if x != nil { + return x.FieldExecutionWeight + } + return 0 +} + +// 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. +type ReportHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // eg "mygraph@myvariant" + GraphRef string `protobuf:"bytes,12,opt,name=graph_ref,json=graphRef,proto3" json:"graph_ref,omitempty"` + // eg "host-01.example.com" + Hostname string `protobuf:"bytes,5,opt,name=hostname,proto3" json:"hostname,omitempty"` + // eg "engineproxy 0.1.0" + AgentVersion string `protobuf:"bytes,6,opt,name=agent_version,json=agentVersion,proto3" json:"agent_version,omitempty"` // required + // eg "prod-4279-20160804T065423Z-5-g3cf0aa8" (taken from `git describe --tags`) + ServiceVersion string `protobuf:"bytes,7,opt,name=service_version,json=serviceVersion,proto3" json:"service_version,omitempty"` + // eg "node v4.6.0" + RuntimeVersion string `protobuf:"bytes,8,opt,name=runtime_version,json=runtimeVersion,proto3" json:"runtime_version,omitempty"` + // eg "Linux box 4.6.5-1-ec2 #1 SMP Mon Aug 1 02:31:38 PDT 2016 x86_64 GNU/Linux" + Uname string `protobuf:"bytes,9,opt,name=uname,proto3" json:"uname,omitempty"` + // 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. + ExecutableSchemaId string `protobuf:"bytes,11,opt,name=executable_schema_id,json=executableSchemaId,proto3" json:"executable_schema_id,omitempty"` +} + +func (x *ReportHeader) Reset() { + *x = ReportHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReportHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReportHeader) ProtoMessage() {} + +func (x *ReportHeader) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReportHeader.ProtoReflect.Descriptor instead. +func (*ReportHeader) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{1} +} + +func (x *ReportHeader) GetGraphRef() string { + if x != nil { + return x.GraphRef + } + return "" +} + +func (x *ReportHeader) GetHostname() string { + if x != nil { + return x.Hostname + } + return "" +} + +func (x *ReportHeader) GetAgentVersion() string { + if x != nil { + return x.AgentVersion + } + return "" +} + +func (x *ReportHeader) GetServiceVersion() string { + if x != nil { + return x.ServiceVersion + } + return "" +} + +func (x *ReportHeader) GetRuntimeVersion() string { + if x != nil { + return x.RuntimeVersion + } + return "" +} + +func (x *ReportHeader) GetUname() string { + if x != nil { + return x.Uname + } + return "" +} + +func (x *ReportHeader) GetExecutableSchemaId() string { + if x != nil { + return x.ExecutableSchemaId + } + return "" +} + +type PathErrorStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Children map[string]*PathErrorStats `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ErrorsCount uint64 `protobuf:"varint,4,opt,name=errors_count,json=errorsCount,proto3" json:"errors_count,omitempty"` + RequestsWithErrorsCount uint64 `protobuf:"varint,5,opt,name=requests_with_errors_count,json=requestsWithErrorsCount,proto3" json:"requests_with_errors_count,omitempty"` +} + +func (x *PathErrorStats) Reset() { + *x = PathErrorStats{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathErrorStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathErrorStats) ProtoMessage() {} + +func (x *PathErrorStats) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PathErrorStats.ProtoReflect.Descriptor instead. +func (*PathErrorStats) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{2} +} + +func (x *PathErrorStats) GetChildren() map[string]*PathErrorStats { + if x != nil { + return x.Children + } + return nil +} + +func (x *PathErrorStats) GetErrorsCount() uint64 { + if x != nil { + return x.ErrorsCount + } + return 0 +} + +func (x *PathErrorStats) GetRequestsWithErrorsCount() uint64 { + if x != nil { + return x.RequestsWithErrorsCount + } + return 0 +} + +type QueryLatencyStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LatencyCount []int64 `protobuf:"zigzag64,13,rep,packed,name=latency_count,json=latencyCount,proto3" json:"latency_count,omitempty"` + RequestCount uint64 `protobuf:"varint,2,opt,name=request_count,json=requestCount,proto3" json:"request_count,omitempty"` + CacheHits uint64 `protobuf:"varint,3,opt,name=cache_hits,json=cacheHits,proto3" json:"cache_hits,omitempty"` + PersistedQueryHits uint64 `protobuf:"varint,4,opt,name=persisted_query_hits,json=persistedQueryHits,proto3" json:"persisted_query_hits,omitempty"` + PersistedQueryMisses uint64 `protobuf:"varint,5,opt,name=persisted_query_misses,json=persistedQueryMisses,proto3" json:"persisted_query_misses,omitempty"` + CacheLatencyCount []int64 `protobuf:"zigzag64,14,rep,packed,name=cache_latency_count,json=cacheLatencyCount,proto3" json:"cache_latency_count,omitempty"` + RootErrorStats *PathErrorStats `protobuf:"bytes,7,opt,name=root_error_stats,json=rootErrorStats,proto3" json:"root_error_stats,omitempty"` + RequestsWithErrorsCount uint64 `protobuf:"varint,8,opt,name=requests_with_errors_count,json=requestsWithErrorsCount,proto3" json:"requests_with_errors_count,omitempty"` + PublicCacheTtlCount []int64 `protobuf:"zigzag64,15,rep,packed,name=public_cache_ttl_count,json=publicCacheTtlCount,proto3" json:"public_cache_ttl_count,omitempty"` + PrivateCacheTtlCount []int64 `protobuf:"zigzag64,16,rep,packed,name=private_cache_ttl_count,json=privateCacheTtlCount,proto3" json:"private_cache_ttl_count,omitempty"` + RegisteredOperationCount uint64 `protobuf:"varint,11,opt,name=registered_operation_count,json=registeredOperationCount,proto3" json:"registered_operation_count,omitempty"` + ForbiddenOperationCount uint64 `protobuf:"varint,12,opt,name=forbidden_operation_count,json=forbiddenOperationCount,proto3" json:"forbidden_operation_count,omitempty"` + // The number of requests that were executed without field-level + // instrumentation (and thus do not contribute to `observed_execution_count` + // fields on this message's cousin-twice-removed FieldStats). + RequestsWithoutFieldInstrumentation uint64 `protobuf:"varint,17,opt,name=requests_without_field_instrumentation,json=requestsWithoutFieldInstrumentation,proto3" json:"requests_without_field_instrumentation,omitempty"` +} + +func (x *QueryLatencyStats) Reset() { + *x = QueryLatencyStats{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryLatencyStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryLatencyStats) ProtoMessage() {} + +func (x *QueryLatencyStats) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryLatencyStats.ProtoReflect.Descriptor instead. +func (*QueryLatencyStats) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryLatencyStats) GetLatencyCount() []int64 { + if x != nil { + return x.LatencyCount + } + return nil +} + +func (x *QueryLatencyStats) GetRequestCount() uint64 { + if x != nil { + return x.RequestCount + } + return 0 +} + +func (x *QueryLatencyStats) GetCacheHits() uint64 { + if x != nil { + return x.CacheHits + } + return 0 +} + +func (x *QueryLatencyStats) GetPersistedQueryHits() uint64 { + if x != nil { + return x.PersistedQueryHits + } + return 0 +} + +func (x *QueryLatencyStats) GetPersistedQueryMisses() uint64 { + if x != nil { + return x.PersistedQueryMisses + } + return 0 +} + +func (x *QueryLatencyStats) GetCacheLatencyCount() []int64 { + if x != nil { + return x.CacheLatencyCount + } + return nil +} + +func (x *QueryLatencyStats) GetRootErrorStats() *PathErrorStats { + if x != nil { + return x.RootErrorStats + } + return nil +} + +func (x *QueryLatencyStats) GetRequestsWithErrorsCount() uint64 { + if x != nil { + return x.RequestsWithErrorsCount + } + return 0 +} + +func (x *QueryLatencyStats) GetPublicCacheTtlCount() []int64 { + if x != nil { + return x.PublicCacheTtlCount + } + return nil +} + +func (x *QueryLatencyStats) GetPrivateCacheTtlCount() []int64 { + if x != nil { + return x.PrivateCacheTtlCount + } + return nil +} + +func (x *QueryLatencyStats) GetRegisteredOperationCount() uint64 { + if x != nil { + return x.RegisteredOperationCount + } + return 0 +} + +func (x *QueryLatencyStats) GetForbiddenOperationCount() uint64 { + if x != nil { + return x.ForbiddenOperationCount + } + return 0 +} + +func (x *QueryLatencyStats) GetRequestsWithoutFieldInstrumentation() uint64 { + if x != nil { + return x.RequestsWithoutFieldInstrumentation + } + return 0 +} + +type StatsContext struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientName string `protobuf:"bytes,2,opt,name=client_name,json=clientName,proto3" json:"client_name,omitempty"` + ClientVersion string `protobuf:"bytes,3,opt,name=client_version,json=clientVersion,proto3" json:"client_version,omitempty"` +} + +func (x *StatsContext) Reset() { + *x = StatsContext{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatsContext) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatsContext) ProtoMessage() {} + +func (x *StatsContext) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatsContext.ProtoReflect.Descriptor instead. +func (*StatsContext) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{4} +} + +func (x *StatsContext) GetClientName() string { + if x != nil { + return x.ClientName + } + return "" +} + +func (x *StatsContext) GetClientVersion() string { + if x != nil { + return x.ClientVersion + } + return "" +} + +type ContextualizedQueryLatencyStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QueryLatencyStats *QueryLatencyStats `protobuf:"bytes,1,opt,name=query_latency_stats,json=queryLatencyStats,proto3" json:"query_latency_stats,omitempty"` + Context *StatsContext `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"` +} + +func (x *ContextualizedQueryLatencyStats) Reset() { + *x = ContextualizedQueryLatencyStats{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContextualizedQueryLatencyStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContextualizedQueryLatencyStats) ProtoMessage() {} + +func (x *ContextualizedQueryLatencyStats) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContextualizedQueryLatencyStats.ProtoReflect.Descriptor instead. +func (*ContextualizedQueryLatencyStats) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{5} +} + +func (x *ContextualizedQueryLatencyStats) GetQueryLatencyStats() *QueryLatencyStats { + if x != nil { + return x.QueryLatencyStats + } + return nil +} + +func (x *ContextualizedQueryLatencyStats) GetContext() *StatsContext { + if x != nil { + return x.Context + } + return nil +} + +type ContextualizedTypeStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Context *StatsContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` + PerTypeStat map[string]*TypeStat `protobuf:"bytes,2,rep,name=per_type_stat,json=perTypeStat,proto3" json:"per_type_stat,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ContextualizedTypeStats) Reset() { + *x = ContextualizedTypeStats{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContextualizedTypeStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContextualizedTypeStats) ProtoMessage() {} + +func (x *ContextualizedTypeStats) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContextualizedTypeStats.ProtoReflect.Descriptor instead. +func (*ContextualizedTypeStats) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{6} +} + +func (x *ContextualizedTypeStats) GetContext() *StatsContext { + if x != nil { + return x.Context + } + return nil +} + +func (x *ContextualizedTypeStats) GetPerTypeStat() map[string]*TypeStat { + if x != nil { + return x.PerTypeStat + } + return nil +} + +type FieldStat struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReturnType string `protobuf:"bytes,3,opt,name=return_type,json=returnType,proto3" json:"return_type,omitempty"` // required; eg "String!" for User.email:String! + // Number of errors whose path is this field. Note that we assume that error + // tracking does *not* require field-level instrumentation so this *will* + // include errors from requests that don't contribute to the + // `observed_execution_count` field (and does not need to be scaled by + // field_execution_weight). + ErrorsCount uint64 `protobuf:"varint,4,opt,name=errors_count,json=errorsCount,proto3" json:"errors_count,omitempty"` + // Number of times that the resolver for this field is directly observed being + // executed. + ObservedExecutionCount uint64 `protobuf:"varint,5,opt,name=observed_execution_count,json=observedExecutionCount,proto3" json:"observed_execution_count,omitempty"` + // Same as `count` but potentially scaled upwards if the server was only + // performing field-level instrumentation on a sampling of operations. For + // example, if the server randomly instruments 1% of requests for this + // operation, this number will be 100 times greater than + // `observed_execution_count`. (When aggregating a Trace into FieldStats, + // this number goes up by the trace's `field_execution_weight` for each + // observed field execution, while `observed_execution_count` above goes + // up by 1.) + EstimatedExecutionCount uint64 `protobuf:"varint,10,opt,name=estimated_execution_count,json=estimatedExecutionCount,proto3" json:"estimated_execution_count,omitempty"` + // Number of times the resolver for this field is executed that resulted in + // at least one error. "Request" is a misnomer here as this corresponds to + // resolver calls, not overall operations. Like `errors_count` above, this + // includes all requests rather than just requests with field-level + // instrumentation. + RequestsWithErrorsCount uint64 `protobuf:"varint,6,opt,name=requests_with_errors_count,json=requestsWithErrorsCount,proto3" json:"requests_with_errors_count,omitempty"` + // Duration histogram for the latency of this field. Note that it is scaled in + // the same way as estimated_execution_count so its "total count" might be + // greater than `observed_execution_count` and may not exactly equal + // `estimated_execution_count` due to rounding. + LatencyCount []int64 `protobuf:"zigzag64,9,rep,packed,name=latency_count,json=latencyCount,proto3" json:"latency_count,omitempty"` +} + +func (x *FieldStat) Reset() { + *x = FieldStat{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FieldStat) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldStat) ProtoMessage() {} + +func (x *FieldStat) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldStat.ProtoReflect.Descriptor instead. +func (*FieldStat) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{7} +} + +func (x *FieldStat) GetReturnType() string { + if x != nil { + return x.ReturnType + } + return "" +} + +func (x *FieldStat) GetErrorsCount() uint64 { + if x != nil { + return x.ErrorsCount + } + return 0 +} + +func (x *FieldStat) GetObservedExecutionCount() uint64 { + if x != nil { + return x.ObservedExecutionCount + } + return 0 +} + +func (x *FieldStat) GetEstimatedExecutionCount() uint64 { + if x != nil { + return x.EstimatedExecutionCount + } + return 0 +} + +func (x *FieldStat) GetRequestsWithErrorsCount() uint64 { + if x != nil { + return x.RequestsWithErrorsCount + } + return 0 +} + +func (x *FieldStat) GetLatencyCount() []int64 { + if x != nil { + return x.LatencyCount + } + return nil +} + +type TypeStat struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Key is (eg) "email" for User.email:String! + PerFieldStat map[string]*FieldStat `protobuf:"bytes,3,rep,name=per_field_stat,json=perFieldStat,proto3" json:"per_field_stat,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *TypeStat) Reset() { + *x = TypeStat{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TypeStat) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TypeStat) ProtoMessage() {} + +func (x *TypeStat) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TypeStat.ProtoReflect.Descriptor instead. +func (*TypeStat) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{8} +} + +func (x *TypeStat) GetPerFieldStat() map[string]*FieldStat { + if x != nil { + return x.PerFieldStat + } + return nil +} + +type ReferencedFieldsForType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Contains (eg) "email" for User.email:String! + FieldNames []string `protobuf:"bytes,1,rep,name=field_names,json=fieldNames,proto3" json:"field_names,omitempty"` + // True if this type is an interface. + IsInterface bool `protobuf:"varint,2,opt,name=is_interface,json=isInterface,proto3" json:"is_interface,omitempty"` +} + +func (x *ReferencedFieldsForType) Reset() { + *x = ReferencedFieldsForType{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReferencedFieldsForType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReferencedFieldsForType) ProtoMessage() {} + +func (x *ReferencedFieldsForType) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReferencedFieldsForType.ProtoReflect.Descriptor instead. +func (*ReferencedFieldsForType) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{9} +} + +func (x *ReferencedFieldsForType) GetFieldNames() []string { + if x != nil { + return x.FieldNames + } + return nil +} + +func (x *ReferencedFieldsForType) GetIsInterface() bool { + if x != nil { + return x.IsInterface + } + return false +} + +// 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 +type Report struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header *ReportHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // key is statsReportKey (# operationName\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). + TracesPerQuery map[string]*TracesAndStats `protobuf:"bytes,5,rep,name=traces_per_query,json=tracesPerQuery,proto3" json:"traces_per_query,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // 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. + EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // required if no traces in this message + // Total number of operations processed during this period. + OperationCount uint64 `protobuf:"varint,6,opt,name=operation_count,json=operationCount,proto3" json:"operation_count,omitempty"` +} + +func (x *Report) Reset() { + *x = Report{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Report) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Report) ProtoMessage() {} + +func (x *Report) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Report.ProtoReflect.Descriptor instead. +func (*Report) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{10} +} + +func (x *Report) GetHeader() *ReportHeader { + if x != nil { + return x.Header + } + return nil +} + +func (x *Report) GetTracesPerQuery() map[string]*TracesAndStats { + if x != nil { + return x.TracesPerQuery + } + return nil +} + +func (x *Report) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *Report) GetOperationCount() uint64 { + if x != nil { + return x.OperationCount + } + return 0 +} + +type ContextualizedStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Context *StatsContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` + QueryLatencyStats *QueryLatencyStats `protobuf:"bytes,2,opt,name=query_latency_stats,json=queryLatencyStats,proto3" json:"query_latency_stats,omitempty"` + // Key is type name. This structure provides data for the count and latency of individual + // field executions and thus only reflects operations for which field-level tracing occurred. + PerTypeStat map[string]*TypeStat `protobuf:"bytes,3,rep,name=per_type_stat,json=perTypeStat,proto3" json:"per_type_stat,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ContextualizedStats) Reset() { + *x = ContextualizedStats{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContextualizedStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContextualizedStats) ProtoMessage() {} + +func (x *ContextualizedStats) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContextualizedStats.ProtoReflect.Descriptor instead. +func (*ContextualizedStats) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{11} +} + +func (x *ContextualizedStats) GetContext() *StatsContext { + if x != nil { + return x.Context + } + return nil +} + +func (x *ContextualizedStats) GetQueryLatencyStats() *QueryLatencyStats { + if x != nil { + return x.QueryLatencyStats + } + return nil +} + +func (x *ContextualizedStats) GetPerTypeStat() map[string]*TypeStat { + if x != nil { + return x.PerTypeStat + } + return nil +} + +// A sequence of traces and stats. An individual operation should either be described as a trace +// or as part of stats, but not both. +type TracesAndStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Trace []*Trace `protobuf:"bytes,1,rep,name=trace,proto3" json:"trace,omitempty"` + StatsWithContext []*ContextualizedStats `protobuf:"bytes,2,rep,name=stats_with_context,json=statsWithContext,proto3" json:"stats_with_context,omitempty"` + // This describes the fields referenced in the operation. Note that this may + // include fields that don't show up in FieldStats (due to being interface fields, + // being nested under null fields or empty lists or non-matching fragments or + // `@include` or `@skip`, etc). It also may be missing fields that show up in FieldStats + // (as FieldStats will include the concrete object type for fields referenced + // via an interface type). + ReferencedFieldsByType map[string]*ReferencedFieldsForType `protobuf:"bytes,4,rep,name=referenced_fields_by_type,json=referencedFieldsByType,proto3" json:"referenced_fields_by_type,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // This field is used to validate that the algorithm used to construct `stats_with_context` + // matches similar algorithms in Apollo's servers. It is otherwise ignored and should not + // be included in reports. + InternalTracesContributingToStats []*Trace `protobuf:"bytes,3,rep,name=internal_traces_contributing_to_stats,json=internalTracesContributingToStats,proto3" json:"internal_traces_contributing_to_stats,omitempty"` +} + +func (x *TracesAndStats) Reset() { + *x = TracesAndStats{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TracesAndStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TracesAndStats) ProtoMessage() {} + +func (x *TracesAndStats) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TracesAndStats.ProtoReflect.Descriptor instead. +func (*TracesAndStats) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{12} +} + +func (x *TracesAndStats) GetTrace() []*Trace { + if x != nil { + return x.Trace + } + return nil +} + +func (x *TracesAndStats) GetStatsWithContext() []*ContextualizedStats { + if x != nil { + return x.StatsWithContext + } + return nil +} + +func (x *TracesAndStats) GetReferencedFieldsByType() map[string]*ReferencedFieldsForType { + if x != nil { + return x.ReferencedFieldsByType + } + return nil +} + +func (x *TracesAndStats) GetInternalTracesContributingToStats() []*Trace { + if x != nil { + return x.InternalTracesContributingToStats + } + return nil +} + +type Trace_CachePolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Scope Trace_CachePolicy_Scope `protobuf:"varint,1,opt,name=scope,proto3,enum=Trace_CachePolicy_Scope" json:"scope,omitempty"` + MaxAgeNs int64 `protobuf:"varint,2,opt,name=max_age_ns,json=maxAgeNs,proto3" json:"max_age_ns,omitempty"` // use 0 for absent, -1 for 0 +} + +func (x *Trace_CachePolicy) Reset() { + *x = Trace_CachePolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace_CachePolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace_CachePolicy) ProtoMessage() {} + +func (x *Trace_CachePolicy) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace_CachePolicy.ProtoReflect.Descriptor instead. +func (*Trace_CachePolicy) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Trace_CachePolicy) GetScope() Trace_CachePolicy_Scope { + if x != nil { + return x.Scope + } + return Trace_CachePolicy_UNKNOWN +} + +func (x *Trace_CachePolicy) GetMaxAgeNs() int64 { + if x != nil { + return x.MaxAgeNs + } + return 0 +} + +type Trace_Details struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The variables associated with this query (unless the reporting agent is + // configured to keep them all private). Values are JSON: ie, strings are + // enclosed in double quotes, etc. The value of a private variable is + // the empty string. + VariablesJson map[string]string `protobuf:"bytes,4,rep,name=variables_json,json=variablesJson,proto3" json:"variables_json,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // This is deprecated and only used for legacy applications + // don't include this in traces inside a FullTracesReport; the operation + // name for these traces comes from the key of the traces_per_query map. + OperationName string `protobuf:"bytes,3,opt,name=operation_name,json=operationName,proto3" json:"operation_name,omitempty"` +} + +func (x *Trace_Details) Reset() { + *x = Trace_Details{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace_Details) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace_Details) ProtoMessage() {} + +func (x *Trace_Details) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace_Details.ProtoReflect.Descriptor instead. +func (*Trace_Details) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Trace_Details) GetVariablesJson() map[string]string { + if x != nil { + return x.VariablesJson + } + return nil +} + +func (x *Trace_Details) GetOperationName() string { + if x != nil { + return x.OperationName + } + return "" +} + +type Trace_Error struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // required + Location []*Trace_Location `protobuf:"bytes,2,rep,name=location,proto3" json:"location,omitempty"` + TimeNs uint64 `protobuf:"varint,3,opt,name=time_ns,json=timeNs,proto3" json:"time_ns,omitempty"` + Json string `protobuf:"bytes,4,opt,name=json,proto3" json:"json,omitempty"` +} + +func (x *Trace_Error) Reset() { + *x = Trace_Error{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace_Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace_Error) ProtoMessage() {} + +func (x *Trace_Error) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace_Error.ProtoReflect.Descriptor instead. +func (*Trace_Error) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *Trace_Error) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *Trace_Error) GetLocation() []*Trace_Location { + if x != nil { + return x.Location + } + return nil +} + +func (x *Trace_Error) GetTimeNs() uint64 { + if x != nil { + return x.TimeNs + } + return 0 +} + +func (x *Trace_Error) GetJson() string { + if x != nil { + return x.Json + } + return "" +} + +type Trace_HTTP struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Method Trace_HTTP_Method `protobuf:"varint,1,opt,name=method,proto3,enum=Trace_HTTP_Method" json:"method,omitempty"` + Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` + // Should exclude manual blacklist ("Auth" by default) + RequestHeaders map[string]*Trace_HTTP_Values `protobuf:"bytes,4,rep,name=request_headers,json=requestHeaders,proto3" json:"request_headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ResponseHeaders map[string]*Trace_HTTP_Values `protobuf:"bytes,5,rep,name=response_headers,json=responseHeaders,proto3" json:"response_headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StatusCode uint32 `protobuf:"varint,6,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` + Secure bool `protobuf:"varint,8,opt,name=secure,proto3" json:"secure,omitempty"` // TLS was used + Protocol string `protobuf:"bytes,9,opt,name=protocol,proto3" json:"protocol,omitempty"` // by convention "HTTP/1.0", "HTTP/1.1", "HTTP/2" or "h2" +} + +func (x *Trace_HTTP) Reset() { + *x = Trace_HTTP{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace_HTTP) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace_HTTP) ProtoMessage() {} + +func (x *Trace_HTTP) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace_HTTP.ProtoReflect.Descriptor instead. +func (*Trace_HTTP) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 3} +} + +func (x *Trace_HTTP) GetMethod() Trace_HTTP_Method { + if x != nil { + return x.Method + } + return Trace_HTTP_UNKNOWN +} + +func (x *Trace_HTTP) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +func (x *Trace_HTTP) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *Trace_HTTP) GetRequestHeaders() map[string]*Trace_HTTP_Values { + if x != nil { + return x.RequestHeaders + } + return nil +} + +func (x *Trace_HTTP) GetResponseHeaders() map[string]*Trace_HTTP_Values { + if x != nil { + return x.ResponseHeaders + } + return nil +} + +func (x *Trace_HTTP) GetStatusCode() uint32 { + if x != nil { + return x.StatusCode + } + return 0 +} + +func (x *Trace_HTTP) GetSecure() bool { + if x != nil { + return x.Secure + } + return false +} + +func (x *Trace_HTTP) GetProtocol() string { + if x != nil { + return x.Protocol + } + return "" +} + +type Trace_Location struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Line uint32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"` + Column uint32 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"` +} + +func (x *Trace_Location) Reset() { + *x = Trace_Location{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace_Location) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace_Location) ProtoMessage() {} + +func (x *Trace_Location) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace_Location.ProtoReflect.Descriptor instead. +func (*Trace_Location) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 4} +} + +func (x *Trace_Location) GetLine() uint32 { + if x != nil { + return x.Line + } + return 0 +} + +func (x *Trace_Location) GetColumn() uint32 { + if x != nil { + return x.Column + } + return 0 +} + +// We store information on each resolver execution as a Node on a tree. +// The structure of the tree corresponds to the structure of the GraphQL +// response; it does not indicate the order in which resolvers were +// invoked. Note that nodes representing indexes (and the root node) +// don't contain all Node fields (eg types and times). +type Trace_Node struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the field (for Nodes representing a resolver call) or the + // index in a list (for intermediate Nodes representing elements of a list). + // field_name is the name of the field as it appears in the GraphQL + // response: ie, it may be an alias. (In that case, the original_field_name + // field holds the actual field name from the schema.) In any context where + // we're building up a path, we use the response_name rather than the + // original_field_name. + // + // Types that are assignable to Id: + // *Trace_Node_ResponseName + // *Trace_Node_Index + Id isTrace_Node_Id `protobuf_oneof:"id"` + OriginalFieldName string `protobuf:"bytes,14,opt,name=original_field_name,json=originalFieldName,proto3" json:"original_field_name,omitempty"` + // The field's return type; e.g. "String!" for User.email:String! + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + // The field's parent type; e.g. "User" for User.email:String! + ParentType string `protobuf:"bytes,13,opt,name=parent_type,json=parentType,proto3" json:"parent_type,omitempty"` + CachePolicy *Trace_CachePolicy `protobuf:"bytes,5,opt,name=cache_policy,json=cachePolicy,proto3" json:"cache_policy,omitempty"` + // relative to the trace's start_time, in ns + StartTime uint64 `protobuf:"varint,8,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // relative to the trace's start_time, in ns + EndTime uint64 `protobuf:"varint,9,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + Error []*Trace_Error `protobuf:"bytes,11,rep,name=error,proto3" json:"error,omitempty"` + Child []*Trace_Node `protobuf:"bytes,12,rep,name=child,proto3" json:"child,omitempty"` +} + +func (x *Trace_Node) Reset() { + *x = Trace_Node{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace_Node) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace_Node) ProtoMessage() {} + +func (x *Trace_Node) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace_Node.ProtoReflect.Descriptor instead. +func (*Trace_Node) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 5} +} + +func (m *Trace_Node) GetId() isTrace_Node_Id { + if m != nil { + return m.Id + } + return nil +} + +func (x *Trace_Node) GetResponseName() string { + if x, ok := x.GetId().(*Trace_Node_ResponseName); ok { + return x.ResponseName + } + return "" +} + +func (x *Trace_Node) GetIndex() uint32 { + if x, ok := x.GetId().(*Trace_Node_Index); ok { + return x.Index + } + return 0 +} + +func (x *Trace_Node) GetOriginalFieldName() string { + if x != nil { + return x.OriginalFieldName + } + return "" +} + +func (x *Trace_Node) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Trace_Node) GetParentType() string { + if x != nil { + return x.ParentType + } + return "" +} + +func (x *Trace_Node) GetCachePolicy() *Trace_CachePolicy { + if x != nil { + return x.CachePolicy + } + return nil +} + +func (x *Trace_Node) GetStartTime() uint64 { + if x != nil { + return x.StartTime + } + return 0 +} + +func (x *Trace_Node) GetEndTime() uint64 { + if x != nil { + return x.EndTime + } + return 0 +} + +func (x *Trace_Node) GetError() []*Trace_Error { + if x != nil { + return x.Error + } + return nil +} + +func (x *Trace_Node) GetChild() []*Trace_Node { + if x != nil { + return x.Child + } + return nil +} + +type isTrace_Node_Id interface { + isTrace_Node_Id() +} + +type Trace_Node_ResponseName struct { + ResponseName string `protobuf:"bytes,1,opt,name=response_name,json=responseName,proto3,oneof"` +} + +type Trace_Node_Index struct { + Index uint32 `protobuf:"varint,2,opt,name=index,proto3,oneof"` +} + +func (*Trace_Node_ResponseName) isTrace_Node_Id() {} + +func (*Trace_Node_Index) isTrace_Node_Id() {} + +// represents a node in the query plan, under which there is a trace tree for that service fetch. +// In particular, each fetch node represents a call to an implementing service, and calls to implementing +// services may not be unique. See https://github.com/apollographql/apollo-server/blob/main/packages/apollo-gateway/src/QueryPlan.ts +// for more information and details. +type Trace_QueryPlanNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Node: + // *Trace_QueryPlanNode_Sequence + // *Trace_QueryPlanNode_Parallel + // *Trace_QueryPlanNode_Fetch + // *Trace_QueryPlanNode_Flatten + Node isTrace_QueryPlanNode_Node `protobuf_oneof:"node"` +} + +func (x *Trace_QueryPlanNode) Reset() { + *x = Trace_QueryPlanNode{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace_QueryPlanNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace_QueryPlanNode) ProtoMessage() {} + +func (x *Trace_QueryPlanNode) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace_QueryPlanNode.ProtoReflect.Descriptor instead. +func (*Trace_QueryPlanNode) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 6} +} + +func (m *Trace_QueryPlanNode) GetNode() isTrace_QueryPlanNode_Node { + if m != nil { + return m.Node + } + return nil +} + +func (x *Trace_QueryPlanNode) GetSequence() *Trace_QueryPlanNode_SequenceNode { + if x, ok := x.GetNode().(*Trace_QueryPlanNode_Sequence); ok { + return x.Sequence + } + return nil +} + +func (x *Trace_QueryPlanNode) GetParallel() *Trace_QueryPlanNode_ParallelNode { + if x, ok := x.GetNode().(*Trace_QueryPlanNode_Parallel); ok { + return x.Parallel + } + return nil +} + +func (x *Trace_QueryPlanNode) GetFetch() *Trace_QueryPlanNode_FetchNode { + if x, ok := x.GetNode().(*Trace_QueryPlanNode_Fetch); ok { + return x.Fetch + } + return nil +} + +func (x *Trace_QueryPlanNode) GetFlatten() *Trace_QueryPlanNode_FlattenNode { + if x, ok := x.GetNode().(*Trace_QueryPlanNode_Flatten); ok { + return x.Flatten + } + return nil +} + +type isTrace_QueryPlanNode_Node interface { + isTrace_QueryPlanNode_Node() +} + +type Trace_QueryPlanNode_Sequence struct { + Sequence *Trace_QueryPlanNode_SequenceNode `protobuf:"bytes,1,opt,name=sequence,proto3,oneof"` +} + +type Trace_QueryPlanNode_Parallel struct { + Parallel *Trace_QueryPlanNode_ParallelNode `protobuf:"bytes,2,opt,name=parallel,proto3,oneof"` +} + +type Trace_QueryPlanNode_Fetch struct { + Fetch *Trace_QueryPlanNode_FetchNode `protobuf:"bytes,3,opt,name=fetch,proto3,oneof"` +} + +type Trace_QueryPlanNode_Flatten struct { + Flatten *Trace_QueryPlanNode_FlattenNode `protobuf:"bytes,4,opt,name=flatten,proto3,oneof"` +} + +func (*Trace_QueryPlanNode_Sequence) isTrace_QueryPlanNode_Node() {} + +func (*Trace_QueryPlanNode_Parallel) isTrace_QueryPlanNode_Node() {} + +func (*Trace_QueryPlanNode_Fetch) isTrace_QueryPlanNode_Node() {} + +func (*Trace_QueryPlanNode_Flatten) isTrace_QueryPlanNode_Node() {} + +type Trace_HTTP_Values struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` +} + +func (x *Trace_HTTP_Values) Reset() { + *x = Trace_HTTP_Values{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace_HTTP_Values) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace_HTTP_Values) ProtoMessage() {} + +func (x *Trace_HTTP_Values) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace_HTTP_Values.ProtoReflect.Descriptor instead. +func (*Trace_HTTP_Values) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 3, 0} +} + +func (x *Trace_HTTP_Values) GetValue() []string { + if x != nil { + return x.Value + } + return nil +} + +// This represents a set of nodes to be executed sequentially by the Gateway executor +type Trace_QueryPlanNode_SequenceNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nodes []*Trace_QueryPlanNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` +} + +func (x *Trace_QueryPlanNode_SequenceNode) Reset() { + *x = Trace_QueryPlanNode_SequenceNode{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace_QueryPlanNode_SequenceNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace_QueryPlanNode_SequenceNode) ProtoMessage() {} + +func (x *Trace_QueryPlanNode_SequenceNode) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace_QueryPlanNode_SequenceNode.ProtoReflect.Descriptor instead. +func (*Trace_QueryPlanNode_SequenceNode) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 6, 0} +} + +func (x *Trace_QueryPlanNode_SequenceNode) GetNodes() []*Trace_QueryPlanNode { + if x != nil { + return x.Nodes + } + return nil +} + +// This represents a set of nodes to be executed in parallel by the Gateway executor +type Trace_QueryPlanNode_ParallelNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Nodes []*Trace_QueryPlanNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` +} + +func (x *Trace_QueryPlanNode_ParallelNode) Reset() { + *x = Trace_QueryPlanNode_ParallelNode{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace_QueryPlanNode_ParallelNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace_QueryPlanNode_ParallelNode) ProtoMessage() {} + +func (x *Trace_QueryPlanNode_ParallelNode) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace_QueryPlanNode_ParallelNode.ProtoReflect.Descriptor instead. +func (*Trace_QueryPlanNode_ParallelNode) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 6, 1} +} + +func (x *Trace_QueryPlanNode_ParallelNode) GetNodes() []*Trace_QueryPlanNode { + if x != nil { + return x.Nodes + } + return nil +} + +// This represents a node to send an operation to an implementing service +type Trace_QueryPlanNode_FetchNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // XXX When we want to include more details about the sub-operation that was + // executed against this service, we should include that here in each fetch node. + // This might include an operation signature, requires directive, reference resolutions, etc. + ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + TraceParsingFailed bool `protobuf:"varint,2,opt,name=trace_parsing_failed,json=traceParsingFailed,proto3" json:"trace_parsing_failed,omitempty"` + // This Trace only contains start_time, end_time, duration_ns, and root; + // all timings were calculated **on the federated service**, and clock skew + // will be handled by the ingress server. + Trace *Trace `protobuf:"bytes,3,opt,name=trace,proto3" json:"trace,omitempty"` + // relative to the outer trace's start_time, in ns, measured in the gateway. + SentTimeOffset uint64 `protobuf:"varint,4,opt,name=sent_time_offset,json=sentTimeOffset,proto3" json:"sent_time_offset,omitempty"` + // Wallclock times measured in the gateway for when this operation was + // sent and received. + SentTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=sent_time,json=sentTime,proto3" json:"sent_time,omitempty"` + ReceivedTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=received_time,json=receivedTime,proto3" json:"received_time,omitempty"` +} + +func (x *Trace_QueryPlanNode_FetchNode) Reset() { + *x = Trace_QueryPlanNode_FetchNode{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace_QueryPlanNode_FetchNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace_QueryPlanNode_FetchNode) ProtoMessage() {} + +func (x *Trace_QueryPlanNode_FetchNode) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace_QueryPlanNode_FetchNode.ProtoReflect.Descriptor instead. +func (*Trace_QueryPlanNode_FetchNode) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 6, 2} +} + +func (x *Trace_QueryPlanNode_FetchNode) GetServiceName() string { + if x != nil { + return x.ServiceName + } + return "" +} + +func (x *Trace_QueryPlanNode_FetchNode) GetTraceParsingFailed() bool { + if x != nil { + return x.TraceParsingFailed + } + return false +} + +func (x *Trace_QueryPlanNode_FetchNode) GetTrace() *Trace { + if x != nil { + return x.Trace + } + return nil +} + +func (x *Trace_QueryPlanNode_FetchNode) GetSentTimeOffset() uint64 { + if x != nil { + return x.SentTimeOffset + } + return 0 +} + +func (x *Trace_QueryPlanNode_FetchNode) GetSentTime() *timestamppb.Timestamp { + if x != nil { + return x.SentTime + } + return nil +} + +func (x *Trace_QueryPlanNode_FetchNode) GetReceivedTime() *timestamppb.Timestamp { + if x != nil { + return x.ReceivedTime + } + return nil +} + +// This node represents a way to reach into the response path and attach related entities. +// XXX Flatten is really not the right name and this node may be renamed in the query planner. +type Trace_QueryPlanNode_FlattenNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResponsePath []*Trace_QueryPlanNode_ResponsePathElement `protobuf:"bytes,1,rep,name=response_path,json=responsePath,proto3" json:"response_path,omitempty"` + Node *Trace_QueryPlanNode `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"` +} + +func (x *Trace_QueryPlanNode_FlattenNode) Reset() { + *x = Trace_QueryPlanNode_FlattenNode{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace_QueryPlanNode_FlattenNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace_QueryPlanNode_FlattenNode) ProtoMessage() {} + +func (x *Trace_QueryPlanNode_FlattenNode) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace_QueryPlanNode_FlattenNode.ProtoReflect.Descriptor instead. +func (*Trace_QueryPlanNode_FlattenNode) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 6, 3} +} + +func (x *Trace_QueryPlanNode_FlattenNode) GetResponsePath() []*Trace_QueryPlanNode_ResponsePathElement { + if x != nil { + return x.ResponsePath + } + return nil +} + +func (x *Trace_QueryPlanNode_FlattenNode) GetNode() *Trace_QueryPlanNode { + if x != nil { + return x.Node + } + return nil +} + +type Trace_QueryPlanNode_ResponsePathElement struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Id: + // *Trace_QueryPlanNode_ResponsePathElement_FieldName + // *Trace_QueryPlanNode_ResponsePathElement_Index + Id isTrace_QueryPlanNode_ResponsePathElement_Id `protobuf_oneof:"id"` +} + +func (x *Trace_QueryPlanNode_ResponsePathElement) Reset() { + *x = Trace_QueryPlanNode_ResponsePathElement{} + if protoimpl.UnsafeEnabled { + mi := &file_apollo_trace_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trace_QueryPlanNode_ResponsePathElement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trace_QueryPlanNode_ResponsePathElement) ProtoMessage() {} + +func (x *Trace_QueryPlanNode_ResponsePathElement) ProtoReflect() protoreflect.Message { + mi := &file_apollo_trace_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trace_QueryPlanNode_ResponsePathElement.ProtoReflect.Descriptor instead. +func (*Trace_QueryPlanNode_ResponsePathElement) Descriptor() ([]byte, []int) { + return file_apollo_trace_proto_rawDescGZIP(), []int{0, 6, 4} +} + +func (m *Trace_QueryPlanNode_ResponsePathElement) GetId() isTrace_QueryPlanNode_ResponsePathElement_Id { + if m != nil { + return m.Id + } + return nil +} + +func (x *Trace_QueryPlanNode_ResponsePathElement) GetFieldName() string { + if x, ok := x.GetId().(*Trace_QueryPlanNode_ResponsePathElement_FieldName); ok { + return x.FieldName + } + return "" +} + +func (x *Trace_QueryPlanNode_ResponsePathElement) GetIndex() uint32 { + if x, ok := x.GetId().(*Trace_QueryPlanNode_ResponsePathElement_Index); ok { + return x.Index + } + return 0 +} + +type isTrace_QueryPlanNode_ResponsePathElement_Id interface { + isTrace_QueryPlanNode_ResponsePathElement_Id() +} + +type Trace_QueryPlanNode_ResponsePathElement_FieldName struct { + FieldName string `protobuf:"bytes,1,opt,name=field_name,json=fieldName,proto3,oneof"` +} + +type Trace_QueryPlanNode_ResponsePathElement_Index struct { + Index uint32 `protobuf:"varint,2,opt,name=index,proto3,oneof"` +} + +func (*Trace_QueryPlanNode_ResponsePathElement_FieldName) isTrace_QueryPlanNode_ResponsePathElement_Id() { +} + +func (*Trace_QueryPlanNode_ResponsePathElement_Index) isTrace_QueryPlanNode_ResponsePathElement_Id() { +} + +var File_apollo_trace_proto protoreflect.FileDescriptor + +var file_apollo_trace_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x61, 0x70, 0x6f, 0x6c, 0x6c, 0x6f, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb6, 0x1a, 0x0a, 0x05, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, + 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, + 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x73, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4e, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x72, + 0x6f, 0x6f, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x38, 0x0a, 0x17, 0x75, 0x6e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x64, 0x79, 0x18, 0x1b, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x17, 0x75, 0x6e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x38, 0x0a, 0x17, 0x75, + 0x6e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x75, 0x6e, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x48, 0x54, + 0x54, 0x50, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x35, 0x0a, 0x0c, 0x63, 0x61, 0x63, 0x68, + 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x0b, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x33, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x1a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x6c, 0x61, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x2f, 0x0a, 0x14, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x68, 0x69, 0x74, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x11, 0x66, 0x75, 0x6c, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x48, 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, + 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x68, 0x69, 0x74, 0x18, 0x15, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x11, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x48, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x18, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, + 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, + 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x31, 0x0a, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x13, 0x66, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x12, 0x66, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x1f, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x14, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x1a, 0x8a, 0x01, 0x0a, 0x0b, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, + 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x0a, 0x6d, 0x61, 0x78, + 0x5f, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, + 0x61, 0x78, 0x41, 0x67, 0x65, 0x4e, 0x73, 0x22, 0x2d, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, + 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, + 0x56, 0x41, 0x54, 0x45, 0x10, 0x02, 0x1a, 0xbc, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x12, 0x48, 0x0a, 0x0e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x5f, + 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x54, 0x72, 0x61, + 0x63, 0x65, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x76, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, + 0x61, 0x6d, 0x65, 0x1a, 0x40, 0x0a, 0x12, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x7b, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x54, 0x72, 0x61, + 0x63, 0x65, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6a, 0x73, + 0x6f, 0x6e, 0x1a, 0x8e, 0x05, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x12, 0x2a, 0x0a, 0x06, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, + 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, + 0x48, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, + 0x2e, 0x48, 0x54, 0x54, 0x50, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x4b, 0x0a, 0x10, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x48, 0x54, 0x54, 0x50, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x1a, 0x1e, 0x0a, 0x06, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x55, 0x0a, 0x13, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x48, 0x54, 0x54, 0x50, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x56, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x77, 0x0a, 0x06, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x01, 0x12, 0x07, + 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, + 0x03, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x50, + 0x55, 0x54, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x06, + 0x12, 0x09, 0x0a, 0x05, 0x54, 0x52, 0x41, 0x43, 0x45, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x43, + 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x41, 0x54, 0x43, + 0x48, 0x10, 0x09, 0x1a, 0x36, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6c, + 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x1a, 0xee, 0x02, 0x0a, 0x04, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x11, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x63, 0x61, 0x63, 0x68, + 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x0b, 0x63, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, + 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, + 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x21, 0x0a, + 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x42, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x1a, 0x8b, 0x07, 0x0a, + 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x3f, + 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, + 0x61, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, + 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, + 0x3f, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x6c, 0x61, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, + 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, + 0x12, 0x36, 0x0a, 0x05, 0x66, 0x65, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, + 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x48, + 0x00, 0x52, 0x05, 0x66, 0x65, 0x74, 0x63, 0x68, 0x12, 0x3c, 0x0a, 0x07, 0x66, 0x6c, 0x61, 0x74, + 0x74, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, + 0x46, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, + 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x1a, 0x3a, 0x0a, 0x0c, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, + 0x65, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x6c, 0x61, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x1a, 0xa2, + 0x02, 0x0a, 0x09, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x30, 0x0a, 0x14, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, + 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x69, 0x6c, 0x65, + 0x64, 0x12, 0x1c, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x06, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x12, + 0x28, 0x0a, 0x10, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x65, 0x6e, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x65, 0x6e, + 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x1a, 0x86, 0x01, 0x0a, 0x0b, 0x46, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x4d, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x54, 0x72, 0x61, + 0x63, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x6e, 0x4e, 0x6f, 0x64, 0x65, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x28, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6c, + 0x61, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x1a, 0x54, 0x0a, 0x13, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x04, 0x0a, 0x02, + 0x69, 0x64, 0x42, 0x06, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, + 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0c, + 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x0d, 0x10, 0x0e, 0x4a, 0x04, 0x08, 0x17, 0x10, 0x18, 0x22, 0x8c, + 0x02, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, + 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x61, 0x70, 0x68, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x66, 0x12, 0x1a, 0x0a, 0x08, + 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, + 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x64, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xf9, 0x01, + 0x0a, 0x0e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x12, 0x39, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, + 0x0a, 0x1a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x4c, 0x0a, 0x0d, 0x43, + 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x50, 0x61, 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xdf, 0x05, 0x0a, 0x11, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, + 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x0d, 0x20, 0x03, 0x28, 0x12, 0x52, 0x0c, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x5f, 0x68, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, + 0x61, 0x63, 0x68, 0x65, 0x48, 0x69, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x65, 0x72, 0x73, + 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x68, 0x69, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x65, + 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6d, 0x69, + 0x73, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x70, 0x65, 0x72, 0x73, + 0x69, 0x73, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x69, 0x73, 0x73, 0x65, 0x73, + 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, + 0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x12, 0x52, 0x11, 0x63, + 0x61, 0x63, 0x68, 0x65, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x39, 0x0a, 0x10, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x50, 0x61, 0x74, + 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0e, 0x72, 0x6f, 0x6f, + 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x16, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x74, 0x74, 0x6c, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x12, 0x52, 0x13, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x74, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, + 0x17, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x74, + 0x74, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x10, 0x20, 0x03, 0x28, 0x12, 0x52, 0x14, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x74, 0x6c, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x1a, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x18, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x65, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x19, 0x66, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x66, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x53, + 0x0a, 0x26, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x6f, + 0x75, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, 0x23, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, + 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x22, 0x5c, 0x0a, 0x0c, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x8e, 0x01, 0x0a, 0x1f, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x42, 0x0a, + 0x13, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x11, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x12, 0x27, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0xdc, 0x01, 0x0a, 0x17, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x54, 0x79, 0x70, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x4d, 0x0a, 0x0d, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x2e, 0x50, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x1a, 0x49, + 0x0a, 0x10, 0x50, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbf, 0x02, 0x0a, 0x09, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x18, 0x6f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x6f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x19, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, + 0x74, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x3b, 0x0a, 0x1a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x57, + 0x69, 0x74, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, + 0x0a, 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x09, 0x20, 0x03, 0x28, 0x12, 0x52, 0x0c, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, + 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x22, 0xa6, 0x01, 0x0a, 0x08, + 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x12, 0x41, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x5f, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x2e, 0x50, 0x65, 0x72, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x70, + 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x1a, 0x4b, 0x0a, 0x11, 0x50, + 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0a, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, + 0x08, 0x02, 0x10, 0x03, 0x22, 0x5d, 0x0a, 0x17, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x22, 0xaa, 0x02, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x25, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x5f, + 0x70, 0x65, 0x72, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x50, + 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x73, 0x50, 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x35, 0x0a, 0x08, + 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x52, 0x0a, 0x13, + 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x50, 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x41, 0x6e, 0x64, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x98, 0x02, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x12, 0x42, 0x0a, 0x13, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x61, 0x74, 0x65, 0x6e, + 0x63, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x52, 0x11, 0x71, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x49, 0x0a, 0x0d, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x1a, 0x49, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x99, 0x03, 0x0a, 0x0e, + 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1c, + 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x06, 0x2e, + 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x12, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x10, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x12, 0x66, 0x0a, 0x19, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x41, 0x6e, 0x64, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x16, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x25, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, + 0x21, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x1a, 0x63, 0x0a, 0x1b, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x16, 0x5a, 0x14, 0x2e, 0x2f, 0x61, 0x70, 0x6f, + 0x6c, 0x6c, 0x6f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x74, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_apollo_trace_proto_rawDescOnce sync.Once + file_apollo_trace_proto_rawDescData = file_apollo_trace_proto_rawDesc +) + +func file_apollo_trace_proto_rawDescGZIP() []byte { + file_apollo_trace_proto_rawDescOnce.Do(func() { + file_apollo_trace_proto_rawDescData = protoimpl.X.CompressGZIP(file_apollo_trace_proto_rawDescData) + }) + return file_apollo_trace_proto_rawDescData +} + +var file_apollo_trace_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_apollo_trace_proto_msgTypes = make([]protoimpl.MessageInfo, 35) +var file_apollo_trace_proto_goTypes = []interface{}{ + (Trace_CachePolicy_Scope)(0), // 0: Trace.CachePolicy.Scope + (Trace_HTTP_Method)(0), // 1: Trace.HTTP.Method + (*Trace)(nil), // 2: Trace + (*ReportHeader)(nil), // 3: ReportHeader + (*PathErrorStats)(nil), // 4: PathErrorStats + (*QueryLatencyStats)(nil), // 5: QueryLatencyStats + (*StatsContext)(nil), // 6: StatsContext + (*ContextualizedQueryLatencyStats)(nil), // 7: ContextualizedQueryLatencyStats + (*ContextualizedTypeStats)(nil), // 8: ContextualizedTypeStats + (*FieldStat)(nil), // 9: FieldStat + (*TypeStat)(nil), // 10: TypeStat + (*ReferencedFieldsForType)(nil), // 11: ReferencedFieldsForType + (*Report)(nil), // 12: Report + (*ContextualizedStats)(nil), // 13: ContextualizedStats + (*TracesAndStats)(nil), // 14: TracesAndStats + (*Trace_CachePolicy)(nil), // 15: Trace.CachePolicy + (*Trace_Details)(nil), // 16: Trace.Details + (*Trace_Error)(nil), // 17: Trace.Error + (*Trace_HTTP)(nil), // 18: Trace.HTTP + (*Trace_Location)(nil), // 19: Trace.Location + (*Trace_Node)(nil), // 20: Trace.Node + (*Trace_QueryPlanNode)(nil), // 21: Trace.QueryPlanNode + nil, // 22: Trace.Details.VariablesJsonEntry + (*Trace_HTTP_Values)(nil), // 23: Trace.HTTP.Values + nil, // 24: Trace.HTTP.RequestHeadersEntry + nil, // 25: Trace.HTTP.ResponseHeadersEntry + (*Trace_QueryPlanNode_SequenceNode)(nil), // 26: Trace.QueryPlanNode.SequenceNode + (*Trace_QueryPlanNode_ParallelNode)(nil), // 27: Trace.QueryPlanNode.ParallelNode + (*Trace_QueryPlanNode_FetchNode)(nil), // 28: Trace.QueryPlanNode.FetchNode + (*Trace_QueryPlanNode_FlattenNode)(nil), // 29: Trace.QueryPlanNode.FlattenNode + (*Trace_QueryPlanNode_ResponsePathElement)(nil), // 30: Trace.QueryPlanNode.ResponsePathElement + nil, // 31: PathErrorStats.ChildrenEntry + nil, // 32: ContextualizedTypeStats.PerTypeStatEntry + nil, // 33: TypeStat.PerFieldStatEntry + nil, // 34: Report.TracesPerQueryEntry + nil, // 35: ContextualizedStats.PerTypeStatEntry + nil, // 36: TracesAndStats.ReferencedFieldsByTypeEntry + (*timestamppb.Timestamp)(nil), // 37: google.protobuf.Timestamp +} +var file_apollo_trace_proto_depIdxs = []int32{ + 37, // 0: Trace.start_time:type_name -> google.protobuf.Timestamp + 37, // 1: Trace.end_time:type_name -> google.protobuf.Timestamp + 20, // 2: Trace.root:type_name -> Trace.Node + 16, // 3: Trace.details:type_name -> Trace.Details + 18, // 4: Trace.http:type_name -> Trace.HTTP + 15, // 5: Trace.cache_policy:type_name -> Trace.CachePolicy + 21, // 6: Trace.query_plan:type_name -> Trace.QueryPlanNode + 31, // 7: PathErrorStats.children:type_name -> PathErrorStats.ChildrenEntry + 4, // 8: QueryLatencyStats.root_error_stats:type_name -> PathErrorStats + 5, // 9: ContextualizedQueryLatencyStats.query_latency_stats:type_name -> QueryLatencyStats + 6, // 10: ContextualizedQueryLatencyStats.context:type_name -> StatsContext + 6, // 11: ContextualizedTypeStats.context:type_name -> StatsContext + 32, // 12: ContextualizedTypeStats.per_type_stat:type_name -> ContextualizedTypeStats.PerTypeStatEntry + 33, // 13: TypeStat.per_field_stat:type_name -> TypeStat.PerFieldStatEntry + 3, // 14: Report.header:type_name -> ReportHeader + 34, // 15: Report.traces_per_query:type_name -> Report.TracesPerQueryEntry + 37, // 16: Report.end_time:type_name -> google.protobuf.Timestamp + 6, // 17: ContextualizedStats.context:type_name -> StatsContext + 5, // 18: ContextualizedStats.query_latency_stats:type_name -> QueryLatencyStats + 35, // 19: ContextualizedStats.per_type_stat:type_name -> ContextualizedStats.PerTypeStatEntry + 2, // 20: TracesAndStats.trace:type_name -> Trace + 13, // 21: TracesAndStats.stats_with_context:type_name -> ContextualizedStats + 36, // 22: TracesAndStats.referenced_fields_by_type:type_name -> TracesAndStats.ReferencedFieldsByTypeEntry + 2, // 23: TracesAndStats.internal_traces_contributing_to_stats:type_name -> Trace + 0, // 24: Trace.CachePolicy.scope:type_name -> Trace.CachePolicy.Scope + 22, // 25: Trace.Details.variables_json:type_name -> Trace.Details.VariablesJsonEntry + 19, // 26: Trace.Error.location:type_name -> Trace.Location + 1, // 27: Trace.HTTP.method:type_name -> Trace.HTTP.Method + 24, // 28: Trace.HTTP.request_headers:type_name -> Trace.HTTP.RequestHeadersEntry + 25, // 29: Trace.HTTP.response_headers:type_name -> Trace.HTTP.ResponseHeadersEntry + 15, // 30: Trace.Node.cache_policy:type_name -> Trace.CachePolicy + 17, // 31: Trace.Node.error:type_name -> Trace.Error + 20, // 32: Trace.Node.child:type_name -> Trace.Node + 26, // 33: Trace.QueryPlanNode.sequence:type_name -> Trace.QueryPlanNode.SequenceNode + 27, // 34: Trace.QueryPlanNode.parallel:type_name -> Trace.QueryPlanNode.ParallelNode + 28, // 35: Trace.QueryPlanNode.fetch:type_name -> Trace.QueryPlanNode.FetchNode + 29, // 36: Trace.QueryPlanNode.flatten:type_name -> Trace.QueryPlanNode.FlattenNode + 23, // 37: Trace.HTTP.RequestHeadersEntry.value:type_name -> Trace.HTTP.Values + 23, // 38: Trace.HTTP.ResponseHeadersEntry.value:type_name -> Trace.HTTP.Values + 21, // 39: Trace.QueryPlanNode.SequenceNode.nodes:type_name -> Trace.QueryPlanNode + 21, // 40: Trace.QueryPlanNode.ParallelNode.nodes:type_name -> Trace.QueryPlanNode + 2, // 41: Trace.QueryPlanNode.FetchNode.trace:type_name -> Trace + 37, // 42: Trace.QueryPlanNode.FetchNode.sent_time:type_name -> google.protobuf.Timestamp + 37, // 43: Trace.QueryPlanNode.FetchNode.received_time:type_name -> google.protobuf.Timestamp + 30, // 44: Trace.QueryPlanNode.FlattenNode.response_path:type_name -> Trace.QueryPlanNode.ResponsePathElement + 21, // 45: Trace.QueryPlanNode.FlattenNode.node:type_name -> Trace.QueryPlanNode + 4, // 46: PathErrorStats.ChildrenEntry.value:type_name -> PathErrorStats + 10, // 47: ContextualizedTypeStats.PerTypeStatEntry.value:type_name -> TypeStat + 9, // 48: TypeStat.PerFieldStatEntry.value:type_name -> FieldStat + 14, // 49: Report.TracesPerQueryEntry.value:type_name -> TracesAndStats + 10, // 50: ContextualizedStats.PerTypeStatEntry.value:type_name -> TypeStat + 11, // 51: TracesAndStats.ReferencedFieldsByTypeEntry.value:type_name -> ReferencedFieldsForType + 52, // [52:52] is the sub-list for method output_type + 52, // [52:52] is the sub-list for method input_type + 52, // [52:52] is the sub-list for extension type_name + 52, // [52:52] is the sub-list for extension extendee + 0, // [0:52] is the sub-list for field type_name +} + +func init() { file_apollo_trace_proto_init() } +func file_apollo_trace_proto_init() { + if File_apollo_trace_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_apollo_trace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReportHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathErrorStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryLatencyStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatsContext); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContextualizedQueryLatencyStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContextualizedTypeStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FieldStat); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypeStat); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReferencedFieldsForType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Report); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContextualizedStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TracesAndStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace_CachePolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace_Details); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace_Error); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace_HTTP); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace_Location); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace_Node); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace_QueryPlanNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace_HTTP_Values); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace_QueryPlanNode_SequenceNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace_QueryPlanNode_ParallelNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace_QueryPlanNode_FetchNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace_QueryPlanNode_FlattenNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_apollo_trace_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trace_QueryPlanNode_ResponsePathElement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_apollo_trace_proto_msgTypes[18].OneofWrappers = []interface{}{ + (*Trace_Node_ResponseName)(nil), + (*Trace_Node_Index)(nil), + } + file_apollo_trace_proto_msgTypes[19].OneofWrappers = []interface{}{ + (*Trace_QueryPlanNode_Sequence)(nil), + (*Trace_QueryPlanNode_Parallel)(nil), + (*Trace_QueryPlanNode_Fetch)(nil), + (*Trace_QueryPlanNode_Flatten)(nil), + } + file_apollo_trace_proto_msgTypes[28].OneofWrappers = []interface{}{ + (*Trace_QueryPlanNode_ResponsePathElement_FieldName)(nil), + (*Trace_QueryPlanNode_ResponsePathElement_Index)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_apollo_trace_proto_rawDesc, + NumEnums: 2, + NumMessages: 35, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_apollo_trace_proto_goTypes, + DependencyIndexes: file_apollo_trace_proto_depIdxs, + EnumInfos: file_apollo_trace_proto_enumTypes, + MessageInfos: file_apollo_trace_proto_msgTypes, + }.Build() + File_apollo_trace_proto = out.File + file_apollo_trace_proto_rawDesc = nil + file_apollo_trace_proto_goTypes = nil + file_apollo_trace_proto_depIdxs = nil +} diff --git a/graphql/handler/apollofederatedtracingv1/generated/apollo_trace.proto b/graphql/handler/apollofederatedtracingv1/generated/apollo_trace.proto new file mode 100644 index 00000000000..a4945382067 --- /dev/null +++ b/graphql/handler/apollofederatedtracingv1/generated/apollo_trace.proto @@ -0,0 +1,431 @@ +syntax = "proto3"; +option go_package = "./generated"; + +import "google/protobuf/timestamp.proto"; + +message Trace { + message CachePolicy { + enum Scope { + UNKNOWN = 0; + PUBLIC = 1; + PRIVATE = 2; + } + + Scope scope = 1; + int64 max_age_ns = 2; // use 0 for absent, -1 for 0 + } + + message Details { + // The variables associated with this query (unless the reporting agent is + // configured to keep them all private). Values are JSON: ie, strings are + // enclosed in double quotes, etc. The value of a private variable is + // the empty string. + map variables_json = 4; + + + // This is deprecated and only used for legacy applications + // don't include this in traces inside a FullTracesReport; the operation + // name for these traces comes from the key of the traces_per_query map. + string operation_name = 3; + } + + message Error { + string message = 1; // required + repeated Location location = 2; + uint64 time_ns = 3; + string json = 4; + } + + message HTTP { + message Values { + repeated string value = 1; + } + + enum Method { + UNKNOWN = 0; + OPTIONS = 1; + GET = 2; + HEAD = 3; + POST = 4; + PUT = 5; + DELETE = 6; + TRACE = 7; + CONNECT = 8; + PATCH = 9; + } + Method method = 1; + string host = 2; + string path = 3; + + // Should exclude manual blacklist ("Auth" by default) + map request_headers = 4; + map response_headers = 5; + + uint32 status_code = 6; + + bool secure = 8; // TLS was used + string protocol = 9; // by convention "HTTP/1.0", "HTTP/1.1", "HTTP/2" or "h2" + } + + message Location { + uint32 line = 1; + uint32 column = 2; + } + + // We store information on each resolver execution as a Node on a tree. + // The structure of the tree corresponds to the structure of the GraphQL + // response; it does not indicate the order in which resolvers were + // invoked. Note that nodes representing indexes (and the root node) + // don't contain all Node fields (eg types and times). + message Node { + // The name of the field (for Nodes representing a resolver call) or the + // index in a list (for intermediate Nodes representing elements of a list). + // field_name is the name of the field as it appears in the GraphQL + // response: ie, it may be an alias. (In that case, the original_field_name + // field holds the actual field name from the schema.) In any context where + // we're building up a path, we use the response_name rather than the + // original_field_name. + oneof id { + string response_name = 1; + uint32 index = 2; + } + + string original_field_name = 14; + + // The field's return type; e.g. "String!" for User.email:String! + string type = 3; + + // The field's parent type; e.g. "User" for User.email:String! + string parent_type = 13; + + CachePolicy cache_policy = 5; + + // relative to the trace's start_time, in ns + uint64 start_time = 8; + // relative to the trace's start_time, in ns + uint64 end_time = 9; + + repeated Error error = 11; + repeated Node child = 12; + + reserved 4; + } + + // represents a node in the query plan, under which there is a trace tree for that service fetch. + // In particular, each fetch node represents a call to an implementing service, and calls to implementing + // services may not be unique. See https://github.com/apollographql/apollo-server/blob/main/packages/apollo-gateway/src/QueryPlan.ts + // for more information and details. + message QueryPlanNode { + // This represents a set of nodes to be executed sequentially by the Gateway executor + message SequenceNode { + repeated QueryPlanNode nodes = 1; + } + // This represents a set of nodes to be executed in parallel by the Gateway executor + message ParallelNode { + repeated QueryPlanNode nodes = 1; + } + // This represents a node to send an operation to an implementing service + message FetchNode { + // XXX When we want to include more details about the sub-operation that was + // executed against this service, we should include that here in each fetch node. + // This might include an operation signature, requires directive, reference resolutions, etc. + string service_name = 1; + + bool trace_parsing_failed = 2; + + // This Trace only contains start_time, end_time, duration_ns, and root; + // all timings were calculated **on the federated service**, and clock skew + // will be handled by the ingress server. + Trace trace = 3; + + // relative to the outer trace's start_time, in ns, measured in the gateway. + uint64 sent_time_offset = 4; + + // Wallclock times measured in the gateway for when this operation was + // sent and received. + google.protobuf.Timestamp sent_time = 5; + google.protobuf.Timestamp received_time = 6; + } + + // This node represents a way to reach into the response path and attach related entities. + // XXX Flatten is really not the right name and this node may be renamed in the query planner. + message FlattenNode { + repeated ResponsePathElement response_path = 1; + QueryPlanNode node = 2; + } + message ResponsePathElement { + oneof id { + string field_name = 1; + uint32 index = 2; + } + } + oneof node { + SequenceNode sequence = 1; + ParallelNode parallel = 2; + FetchNode fetch = 3; + FlattenNode flatten = 4; + } + } + + // Wallclock time when the trace began. + google.protobuf.Timestamp start_time = 4; // required + // Wallclock time when the trace ended. + google.protobuf.Timestamp end_time = 3; // required + // High precision duration of the trace; may not equal end_time-start_time + // (eg, if your machine's clock changed during the trace). + uint64 duration_ns = 11; // required + // A tree containing information about all resolvers run directly by this + // service, including errors. + Node root = 14; + + // ------------------------------------------------------------------------- + // Fields below this line are *not* included in federated traces (the traces + // sent from federated services to the gateway). + + // 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. + string signature = 19; + + // 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. + string unexecutedOperationBody = 27; + string unexecutedOperationName = 28; + + Details details = 6; + + string client_name = 7; + string client_version = 8; + + HTTP http = 10; + + CachePolicy cache_policy = 18; + + // 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). + QueryPlanNode query_plan = 26; + + // Was this response served from a full query response cache? (In that case + // the node tree will have no resolvers.) + bool full_query_cache_hit = 20; + + // Was this query specified successfully as a persisted query hash? + bool persisted_query_hit = 21; + // 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.) + bool persisted_query_register = 22; + + // Was this operation registered and a part of the safelist? + bool registered_operation = 24; + + // Was this operation forbidden due to lack of safelisting? + bool forbidden_operation = 25; + + // Some servers don't do field-level instrumentation for every request and assign + // each request a "weight" for each request that they do instrument. When this + // trace is aggregated into field usage stats, it should count as this value + // towards the estimated_execution_count rather than just 1. This value should + // typically be at least 1. + // + // 0 is treated as 1 for backwards compatibility. + double field_execution_weight = 31; + + + + // removed: Node parse = 12; Node validate = 13; + // Id128 server_id = 1; Id128 client_id = 2; + // String client_reference_id = 23; String client_address = 9; + reserved 1, 2, 9, 12, 13, 23; +} + +// 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. +message ReportHeader { + // eg "mygraph@myvariant" + string graph_ref = 12; + + // eg "host-01.example.com" + string hostname = 5; + + // eg "engineproxy 0.1.0" + string agent_version = 6; // required + // eg "prod-4279-20160804T065423Z-5-g3cf0aa8" (taken from `git describe --tags`) + string service_version = 7; + // eg "node v4.6.0" + string runtime_version = 8; + // eg "Linux box 4.6.5-1-ec2 #1 SMP Mon Aug 1 02:31:38 PDT 2016 x86_64 GNU/Linux" + string uname = 9; + // 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. + string executable_schema_id = 11; + + reserved 3; // removed string service = 3; +} + +message PathErrorStats { + map children = 1; + uint64 errors_count = 4; + uint64 requests_with_errors_count = 5; +} + +message QueryLatencyStats { + repeated sint64 latency_count = 13; + uint64 request_count = 2; + uint64 cache_hits = 3; + uint64 persisted_query_hits = 4; + uint64 persisted_query_misses = 5; + repeated sint64 cache_latency_count = 14; + PathErrorStats root_error_stats = 7; + uint64 requests_with_errors_count = 8; + repeated sint64 public_cache_ttl_count = 15; + repeated sint64 private_cache_ttl_count = 16; + uint64 registered_operation_count = 11; + uint64 forbidden_operation_count = 12; + // The number of requests that were executed without field-level + // instrumentation (and thus do not contribute to `observed_execution_count` + // fields on this message's cousin-twice-removed FieldStats). + uint64 requests_without_field_instrumentation = 17; + // 1, 6, 9, and 10 were old int64 histograms + reserved 1, 6, 9, 10; +} + +message StatsContext { + // string client_reference_id = 1; + reserved 1; + string client_name = 2; + string client_version = 3; +} + +message ContextualizedQueryLatencyStats { + QueryLatencyStats query_latency_stats = 1; + StatsContext context = 2; +} + +message ContextualizedTypeStats { + StatsContext context = 1; + map per_type_stat = 2; +} + +message FieldStat { + string return_type = 3; // required; eg "String!" for User.email:String! + // Number of errors whose path is this field. Note that we assume that error + // tracking does *not* require field-level instrumentation so this *will* + // include errors from requests that don't contribute to the + // `observed_execution_count` field (and does not need to be scaled by + // field_execution_weight). + uint64 errors_count = 4; + // Number of times that the resolver for this field is directly observed being + // executed. + uint64 observed_execution_count = 5; + // Same as `count` but potentially scaled upwards if the server was only + // performing field-level instrumentation on a sampling of operations. For + // example, if the server randomly instruments 1% of requests for this + // operation, this number will be 100 times greater than + // `observed_execution_count`. (When aggregating a Trace into FieldStats, + // this number goes up by the trace's `field_execution_weight` for each + // observed field execution, while `observed_execution_count` above goes + // up by 1.) + uint64 estimated_execution_count = 10; + // Number of times the resolver for this field is executed that resulted in + // at least one error. "Request" is a misnomer here as this corresponds to + // resolver calls, not overall operations. Like `errors_count` above, this + // includes all requests rather than just requests with field-level + // instrumentation. + uint64 requests_with_errors_count = 6; + // Duration histogram for the latency of this field. Note that it is scaled in + // the same way as estimated_execution_count so its "total count" might be + // greater than `observed_execution_count` and may not exactly equal + // `estimated_execution_count` due to rounding. + repeated sint64 latency_count = 9; + reserved 1, 2, 7, 8; +} + +message TypeStat { + // Key is (eg) "email" for User.email:String! + map per_field_stat = 3; + reserved 1, 2; +} + +message ReferencedFieldsForType { + // Contains (eg) "email" for User.email:String! + repeated string field_names = 1; + // True if this type is an interface. + bool is_interface = 2; +} + + + +// 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 +message Report { + ReportHeader header = 1; + + // key is statsReportKey (# operationName\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). + map traces_per_query = 5; + + // 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. + google.protobuf.Timestamp end_time = 2; // required if no traces in this message + + // Total number of operations processed during this period. + uint64 operation_count = 6; +} + +message ContextualizedStats { + StatsContext context = 1; + QueryLatencyStats query_latency_stats = 2; + // Key is type name. This structure provides data for the count and latency of individual + // field executions and thus only reflects operations for which field-level tracing occurred. + map per_type_stat = 3; + +} + +// A sequence of traces and stats. An individual operation should either be described as a trace +// or as part of stats, but not both. +message TracesAndStats { + repeated Trace trace = 1; + repeated ContextualizedStats stats_with_context = 2; + // This describes the fields referenced in the operation. Note that this may + // include fields that don't show up in FieldStats (due to being interface fields, + // being nested under null fields or empty lists or non-matching fragments or + // `@include` or `@skip`, etc). It also may be missing fields that show up in FieldStats + // (as FieldStats will include the concrete object type for fields referenced + // via an interface type). + map referenced_fields_by_type = 4; + // This field is used to validate that the algorithm used to construct `stats_with_context` + // matches similar algorithms in Apollo's servers. It is otherwise ignored and should not + // be included in reports. + repeated Trace internal_traces_contributing_to_stats = 3; +} \ No newline at end of file diff --git a/graphql/handler/apollofederatedtracingv1/tracing.go b/graphql/handler/apollofederatedtracingv1/tracing.go new file mode 100644 index 00000000000..46be2a0ec2b --- /dev/null +++ b/graphql/handler/apollofederatedtracingv1/tracing.go @@ -0,0 +1,98 @@ +package apollofederatedtracingv1 + +import ( + "context" + "encoding/base64" + "fmt" + + "github.com/99designs/gqlgen/graphql" + "github.com/vektah/gqlparser/v2/gqlerror" + "google.golang.org/protobuf/proto" +) + +type ( + Tracer struct { + ClientName string + Version string + Hostname string + TreeBuilder *TreeBuilder + ShouldTrace bool + } +) + +var _ interface { + graphql.HandlerExtension + graphql.ResponseInterceptor + graphql.FieldInterceptor + graphql.OperationInterceptor + graphql.OperationParameterMutator +} = &Tracer{} + +// ExtensionName returns the name of the extension +func (Tracer) ExtensionName() string { + return "ApolloFederatedTracingV1" +} + +// Validate returns errors based on the schema; since this extension doesn't require validation, we return nil +func (Tracer) Validate(graphql.ExecutableSchema) error { + return nil +} + +func (t *Tracer) MutateOperationParameters(ctx context.Context, request *graphql.RawParams) *gqlerror.Error { + t.ShouldTrace = request.Headers.Get("apollo-federation-include-trace") == "ftv1" // check for header + return nil +} + +// InterceptOperation acts on each Graph operation; on each operation, start a tree builder and start the tree's timer for tracing +func (t *Tracer) InterceptOperation(ctx context.Context, next graphql.OperationHandler) graphql.ResponseHandler { + if !t.ShouldTrace { + return next(ctx) + } + + t.TreeBuilder = NewTreeBuilder() + + return next(ctx) +} + +// InterceptField is called on each field's resolution, including information about the path and parent node. +// This information is then used to build the relevant Node Tree used in the FTV1 tracing format +func (t *Tracer) InterceptField(ctx context.Context, next graphql.Resolver) (interface{}, error) { + if !t.ShouldTrace { + return next(ctx) + } + + t.TreeBuilder.WillResolveField(ctx) + + return next(ctx) +} + +// InterceptResponse is called before the overall response is sent, but before each field resolves; as a result +// the final marshaling is deferred to happen at the end of the operation +func (t *Tracer) InterceptResponse(ctx context.Context, next graphql.ResponseHandler) *graphql.Response { + if !t.ShouldTrace { + return next(ctx) + } + t.TreeBuilder.StartTimer(ctx) + + // because we need to update the ftv1 string at a later time (as fields resolve before the response is sent), + // we instantiate the string and use a pointer to be able to update later + var ftv1 string + graphql.RegisterExtension(ctx, "ftv1", &ftv1) + + // now that fields have finished resolving, it stops the timer to calculate trace duration + defer func() { + t.TreeBuilder.StopTimer(ctx) + + // marshal the protobuf ... + p, err := proto.Marshal(t.TreeBuilder.Trace) + if err != nil { + fmt.Print(err) + } + + // ... then set the previously instantiated string as the base64 formatted string as required + ftv1 = base64.StdEncoding.EncodeToString(p) + }() + + resp := next(ctx) + return resp +} diff --git a/graphql/handler/apollofederatedtracingv1/tracing_test.go b/graphql/handler/apollofederatedtracingv1/tracing_test.go new file mode 100644 index 00000000000..625392c4241 --- /dev/null +++ b/graphql/handler/apollofederatedtracingv1/tracing_test.go @@ -0,0 +1,101 @@ +package apollofederatedtracingv1_test + +import ( + "encoding/base64" + "encoding/json" + "fmt" + "net/http" + "net/http/httptest" + "strings" + "testing" + "time" + + "github.com/99designs/gqlgen/graphql" + "github.com/99designs/gqlgen/graphql/handler/apollofederatedtracingv1" + "github.com/99designs/gqlgen/graphql/handler/apollofederatedtracingv1/generated" + "github.com/99designs/gqlgen/graphql/handler/apollotracing" + "github.com/99designs/gqlgen/graphql/handler/extension" + "github.com/99designs/gqlgen/graphql/handler/lru" + "github.com/99designs/gqlgen/graphql/handler/testserver" + "github.com/99designs/gqlgen/graphql/handler/transport" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/vektah/gqlparser/v2/gqlerror" + "google.golang.org/protobuf/proto" +) + +func TestApolloTracing(t *testing.T) { + now := time.Unix(0, 0) + + graphql.Now = func() time.Time { + defer func() { + now = now.Add(100 * time.Nanosecond) + }() + return now + } + + h := testserver.New() + h.AddTransport(transport.POST{}) + h.Use(&apollofederatedtracingv1.Tracer{}) + + resp := doRequest(h, http.MethodPost, "/graphql", `{"query":"{ name }"}`) + assert.Equal(t, http.StatusOK, resp.Code, resp.Body.String()) + var respData struct { + Extensions struct { + FTV1 string `json:"ftv1"` + } `json:"extensions"` + } + require.NoError(t, json.Unmarshal(resp.Body.Bytes(), &respData)) + + tracing := respData.Extensions.FTV1 + pbuf, _ := base64.StdEncoding.DecodeString(tracing) + ftv1 := &generated.Trace{} + err := proto.Unmarshal(pbuf, ftv1) + require.Nil(t, err) + + require.Zero(t, ftv1.StartTime.Nanos, ftv1.StartTime.Nanos) + require.EqualValues(t, 900, ftv1.EndTime.Nanos) + require.EqualValues(t, 900, ftv1.DurationNs) + + fmt.Printf("%#v\n", resp.Body.String()) + require.Equal(t, "Query", ftv1.Root.Child[0].ParentType) + require.Equal(t, "name", ftv1.Root.Child[0].GetResponseName()) + require.Equal(t, "String!", ftv1.Root.Child[0].Type) +} + +func TestApolloTracing_withFail(t *testing.T) { + now := time.Unix(0, 0) + + graphql.Now = func() time.Time { + defer func() { + now = now.Add(100 * time.Nanosecond) + }() + return now + } + + h := testserver.New() + h.AddTransport(transport.POST{}) + h.Use(extension.AutomaticPersistedQuery{Cache: lru.New(100)}) + h.Use(apollotracing.Tracer{}) + + resp := doRequest(h, http.MethodPost, "/graphql", `{"operationName":"A","extensions":{"persistedQuery":{"version":1,"sha256Hash":"338bbc16ac780daf81845339fbf0342061c1e9d2b702c96d3958a13a557083a6"}}}`) + assert.Equal(t, http.StatusOK, resp.Code, resp.Body.String()) + b := resp.Body.Bytes() + t.Log(string(b)) + var respData struct { + Errors gqlerror.List + } + require.NoError(t, json.Unmarshal(b, &respData)) + require.Len(t, respData.Errors, 1) + require.Equal(t, "PersistedQueryNotFound", respData.Errors[0].Message) +} + +func doRequest(handler http.Handler, method, target, body string) *httptest.ResponseRecorder { + r := httptest.NewRequest(method, target, strings.NewReader(body)) + r.Header.Set("Content-Type", "application/json") + r.Header.Set("apollo-federation-include-trace", "ftv1") + w := httptest.NewRecorder() + + handler.ServeHTTP(w, r) + return w +} diff --git a/graphql/handler/apollofederatedtracingv1/tree_builder.go b/graphql/handler/apollofederatedtracingv1/tree_builder.go new file mode 100644 index 00000000000..a54b12db580 --- /dev/null +++ b/graphql/handler/apollofederatedtracingv1/tree_builder.go @@ -0,0 +1,144 @@ +package apollofederatedtracingv1 + +import ( + "context" + "fmt" + "sync" + "time" + + "github.com/99designs/gqlgen/graphql" + "github.com/99designs/gqlgen/graphql/handler/apollofederatedtracingv1/generated" + "google.golang.org/protobuf/types/known/timestamppb" +) + +type TreeBuilder struct { + Trace *generated.Trace + rootNode generated.Trace_Node + nodes map[string]NodeMap // nodes is used to store a pointer map using the node path (e.g. todo[0].id) to itself as well as it's parent + + startTime *time.Time + stopped bool + mu sync.Mutex +} + +type NodeMap struct { + self *generated.Trace_Node + parent *generated.Trace_Node +} + +// NewTreeBuilder is used to start the node tree with a default root node, along with the related tree nodes map entry +func NewTreeBuilder() *TreeBuilder { + tb := TreeBuilder{ + rootNode: generated.Trace_Node{}, + } + + t := generated.Trace{ + Root: &tb.rootNode, + } + tb.nodes = make(map[string]NodeMap) + tb.nodes[""] = NodeMap{self: &tb.rootNode, parent: nil} + + tb.Trace = &t + + return &tb +} + +// StartTimer marks the time using protobuf timestamp format for use in timing calculations +func (tb *TreeBuilder) StartTimer(ctx context.Context) { + if tb.startTime != nil { + fmt.Println(fmt.Errorf("StartTimer called twice")) + } + if tb.stopped { + fmt.Println(fmt.Errorf("StartTimer called after StopTimer")) + } + + rc := graphql.GetOperationContext(ctx) + start := rc.Stats.OperationStart + + tb.Trace.StartTime = timestamppb.New(start) + tb.startTime = &start +} + +// StopTimer marks the end of the timer, along with setting the related fields in the protobuf representation +func (tb *TreeBuilder) StopTimer(ctx context.Context) { + if tb.startTime == nil { + fmt.Println(fmt.Errorf("StopTimer called before StartTimer")) + } + if tb.stopped { + fmt.Println(fmt.Errorf("StopTimer called twice")) + } + + ts := graphql.Now().UTC() + tb.Trace.DurationNs = uint64(ts.Sub(*tb.startTime).Nanoseconds()) + tb.Trace.EndTime = timestamppb.New(ts) + tb.stopped = true +} + +// On each field, it calculates the time started at as now - tree.StartTime, as well as a deferred function upon full resolution of the +// field as now - tree.StartTime; these are used by Apollo to calculate how fields are being resolved in the AST +func (tb *TreeBuilder) WillResolveField(ctx context.Context) { + if tb.startTime == nil { + fmt.Println(fmt.Errorf("WillResolveField called before StartTimer")) + return + } + if tb.stopped { + fmt.Println(fmt.Errorf("WillResolveField called after StopTimer")) + return + } + fc := graphql.GetFieldContext(ctx) + + node := tb.newNode(fc) + node.StartTime = uint64(graphql.Now().Sub(*tb.startTime).Nanoseconds()) + defer func() { + node.EndTime = uint64(graphql.Now().Sub(*tb.startTime).Nanoseconds()) + }() + + node.Type = fc.Field.Definition.Type.String() + node.ParentType = fc.Object +} + +// newNode is called on each new node within the AST and sets related values such as the entry in the tree.node map and ID attribute +func (tb *TreeBuilder) newNode(path *graphql.FieldContext) *generated.Trace_Node { + // if the path is empty, it is the root node of the operation + if path.Path().String() == "" { + return &tb.rootNode + } + + self := &generated.Trace_Node{} + pn := tb.ensureParentNode(path) + + if path.Index != nil { + self.Id = &generated.Trace_Node_Index{Index: uint32(*path.Index)} + } else { + self.Id = &generated.Trace_Node_ResponseName{ResponseName: path.Field.Name} + } + + // lock the map from being read/written concurrently to avoid panics + tb.mu.Lock() + nodeRef := tb.nodes[path.Path().String()] + // set the values for the node references to help build the tree + nodeRef.parent = pn + nodeRef.self = self + + // since they are references, we point the parent to it's children nodes + nodeRef.parent.Child = append(nodeRef.parent.Child, self) + nodeRef.self = self + tb.nodes[path.Path().String()] = nodeRef + tb.mu.Unlock() + + return self +} + +// ensureParentNode ensures the node isn't orphaned +func (tb *TreeBuilder) ensureParentNode(path *graphql.FieldContext) *generated.Trace_Node { + // lock to read briefly, then unlock to avoid r/w issues + tb.mu.Lock() + nodeRef := tb.nodes[path.Parent.Path().String()] + tb.mu.Unlock() + + if nodeRef.self != nil { + return nodeRef.self + } + + return tb.newNode(path.Parent) +} diff --git a/graphql/handler/transport/http_form.go b/graphql/handler/transport/http_form.go index 3874eef4838..ca306b43b91 100644 --- a/graphql/handler/transport/http_form.go +++ b/graphql/handler/transport/http_form.go @@ -191,6 +191,8 @@ func (f MultipartForm) Do(w http.ResponseWriter, r *http.Request, exec graphql.G } } + params.Headers = r.Header + params.ReadTime = graphql.TraceTiming{ Start: start, End: graphql.Now(), diff --git a/graphql/handler/transport/http_get.go b/graphql/handler/transport/http_get.go index d97c89c63fd..0ba581001b9 100644 --- a/graphql/handler/transport/http_get.go +++ b/graphql/handler/transport/http_get.go @@ -32,6 +32,7 @@ func (h GET) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecut raw := &graphql.RawParams{ Query: r.URL.Query().Get("query"), OperationName: r.URL.Query().Get("operationName"), + Headers: r.Header, } raw.ReadTime.Start = graphql.Now() diff --git a/graphql/handler/transport/http_post.go b/graphql/handler/transport/http_post.go index deefeb38d00..99c3157185c 100644 --- a/graphql/handler/transport/http_post.go +++ b/graphql/handler/transport/http_post.go @@ -36,6 +36,9 @@ func (h POST) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecu writeJsonErrorf(w, "json body could not be decoded: "+err.Error()) return } + + params.Headers = r.Header + params.ReadTime = graphql.TraceTiming{ Start: start, End: graphql.Now(),