From ebddce49302ddf2728f448d9bdcdc9b9076ca8b2 Mon Sep 17 00:00:00 2001 From: Kofo Okesola Date: Tue, 24 Oct 2023 07:58:57 +0100 Subject: [PATCH] addgraphstats to analytics record proto --- analytics/analytics.proto | 20 ++ analytics/proto/analytics.pb.go | 403 ++++++++++++++++++++++++++------ 2 files changed, 351 insertions(+), 72 deletions(-) diff --git a/analytics/analytics.proto b/analytics/analytics.proto index 27b90ae91..1205a7aa9 100644 --- a/analytics/analytics.proto +++ b/analytics/analytics.proto @@ -40,6 +40,7 @@ message AnalyticsRecord { string OauthID = 29; string TimeZone = 30; string ApiSchema = 31; + GraphQLStats GraphQLStats = 32; } message Latency { @@ -74,3 +75,22 @@ message NetworkStats { int64 BytesIn = 3; int64 BytesOut = 4; } + +enum GraphQLOperations{ + OPERATION_QUERY = 0; + OPERATION_MUTATION = 1; + OPERATION_SUBSCRIPTION = 2; +} + +message GraphQLStats{ + map Types = 1; + GraphQLOperations OperationType = 2; + string Variables = 3; + repeated string RootFields = 4; + bool HasError = 5; + repeated string GraphErrors = 6; +} + +message RepeatedFields{ + repeated string fields = 1; +} diff --git a/analytics/proto/analytics.pb.go b/analytics/proto/analytics.pb.go index 205ad3643..5f1eaf12b 100644 --- a/analytics/proto/analytics.pb.go +++ b/analytics/proto/analytics.pb.go @@ -7,12 +7,11 @@ package proto import ( - reflect "reflect" - sync "sync" - 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 ( @@ -22,6 +21,55 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type GraphQLOperations int32 + +const ( + GraphQLOperations_OPERATION_QUERY GraphQLOperations = 0 + GraphQLOperations_OPERATION_MUTATION GraphQLOperations = 1 + GraphQLOperations_OPERATION_SUBSCRIPTION GraphQLOperations = 2 +) + +// Enum value maps for GraphQLOperations. +var ( + GraphQLOperations_name = map[int32]string{ + 0: "OPERATION_QUERY", + 1: "OPERATION_MUTATION", + 2: "OPERATION_SUBSCRIPTION", + } + GraphQLOperations_value = map[string]int32{ + "OPERATION_QUERY": 0, + "OPERATION_MUTATION": 1, + "OPERATION_SUBSCRIPTION": 2, + } +) + +func (x GraphQLOperations) Enum() *GraphQLOperations { + p := new(GraphQLOperations) + *p = x + return p +} + +func (x GraphQLOperations) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GraphQLOperations) Descriptor() protoreflect.EnumDescriptor { + return file_analytics_proto_enumTypes[0].Descriptor() +} + +func (GraphQLOperations) Type() protoreflect.EnumType { + return &file_analytics_proto_enumTypes[0] +} + +func (x GraphQLOperations) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GraphQLOperations.Descriptor instead. +func (GraphQLOperations) EnumDescriptor() ([]byte, []int) { + return file_analytics_proto_rawDescGZIP(), []int{0} +} + type AnalyticsRecord struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -58,6 +106,7 @@ type AnalyticsRecord struct { OauthID string `protobuf:"bytes,29,opt,name=OauthID,proto3" json:"OauthID,omitempty"` TimeZone string `protobuf:"bytes,30,opt,name=TimeZone,proto3" json:"TimeZone,omitempty"` ApiSchema string `protobuf:"bytes,31,opt,name=ApiSchema,proto3" json:"ApiSchema,omitempty"` + GraphQLStats *GraphQLStats `protobuf:"bytes,32,opt,name=GraphQLStats,proto3" json:"GraphQLStats,omitempty"` } func (x *AnalyticsRecord) Reset() { @@ -309,6 +358,13 @@ func (x *AnalyticsRecord) GetApiSchema() string { return "" } +func (x *AnalyticsRecord) GetGraphQLStats() *GraphQLStats { + if x != nil { + return x.GraphQLStats + } + return nil +} + type Latency struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -663,6 +719,140 @@ func (x *NetworkStats) GetBytesOut() int64 { return 0 } +type GraphQLStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Types map[string]*RepeatedFields `protobuf:"bytes,1,rep,name=Types,proto3" json:"Types,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + OperationType GraphQLOperations `protobuf:"varint,2,opt,name=OperationType,proto3,enum=normalproto.GraphQLOperations" json:"OperationType,omitempty"` + Variables string `protobuf:"bytes,3,opt,name=Variables,proto3" json:"Variables,omitempty"` + RootFields []string `protobuf:"bytes,4,rep,name=RootFields,proto3" json:"RootFields,omitempty"` + HasError bool `protobuf:"varint,5,opt,name=HasError,proto3" json:"HasError,omitempty"` + GraphErrors []string `protobuf:"bytes,6,rep,name=GraphErrors,proto3" json:"GraphErrors,omitempty"` +} + +func (x *GraphQLStats) Reset() { + *x = GraphQLStats{} + if protoimpl.UnsafeEnabled { + mi := &file_analytics_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GraphQLStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphQLStats) ProtoMessage() {} + +func (x *GraphQLStats) ProtoReflect() protoreflect.Message { + mi := &file_analytics_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 GraphQLStats.ProtoReflect.Descriptor instead. +func (*GraphQLStats) Descriptor() ([]byte, []int) { + return file_analytics_proto_rawDescGZIP(), []int{7} +} + +func (x *GraphQLStats) GetTypes() map[string]*RepeatedFields { + if x != nil { + return x.Types + } + return nil +} + +func (x *GraphQLStats) GetOperationType() GraphQLOperations { + if x != nil { + return x.OperationType + } + return GraphQLOperations_OPERATION_QUERY +} + +func (x *GraphQLStats) GetVariables() string { + if x != nil { + return x.Variables + } + return "" +} + +func (x *GraphQLStats) GetRootFields() []string { + if x != nil { + return x.RootFields + } + return nil +} + +func (x *GraphQLStats) GetHasError() bool { + if x != nil { + return x.HasError + } + return false +} + +func (x *GraphQLStats) GetGraphErrors() []string { + if x != nil { + return x.GraphErrors + } + return nil +} + +type RepeatedFields struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Fields []string `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` +} + +func (x *RepeatedFields) Reset() { + *x = RepeatedFields{} + if protoimpl.UnsafeEnabled { + mi := &file_analytics_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepeatedFields) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepeatedFields) ProtoMessage() {} + +func (x *RepeatedFields) ProtoReflect() protoreflect.Message { + mi := &file_analytics_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 RepeatedFields.ProtoReflect.Descriptor instead. +func (*RepeatedFields) Descriptor() ([]byte, []int) { + return file_analytics_proto_rawDescGZIP(), []int{8} +} + +func (x *RepeatedFields) GetFields() []string { + if x != nil { + return x.Fields + } + return nil +} + var File_analytics_proto protoreflect.FileDescriptor var file_analytics_proto_rawDesc = []byte{ @@ -670,7 +860,7 @@ var file_analytics_proto_rawDesc = []byte{ 0x6f, 0x12, 0x0b, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 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, - 0xbe, 0x07, 0x0a, 0x0f, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x63, + 0xfd, 0x07, 0x0a, 0x0f, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, @@ -730,48 +920,83 @@ var file_analytics_proto_rawDesc = []byte{ 0x6e, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x41, 0x70, 0x69, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x41, 0x70, 0x69, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x22, 0x3b, 0x0a, 0x07, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x54, - 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x54, 0x6f, 0x74, 0x61, - 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x22, 0x23, 0x0a, - 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x53, 0x4f, 0x43, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x49, 0x53, 0x4f, 0x43, 0x6f, - 0x64, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x04, 0x43, 0x69, 0x74, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x6f, 0x72, - 0x6d, 0x61, 0x6c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x2e, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, - 0x1c, 0x0a, 0x09, 0x47, 0x65, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x09, 0x47, 0x65, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x1a, 0x38, 0x0a, - 0x0a, 0x4e, 0x61, 0x6d, 0x65, 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, 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, 0x22, 0x60, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x4c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x4c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x4c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x09, 0x4c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x07, 0x47, 0x65, - 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x04, 0x43, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x52, 0x04, 0x43, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x08, - 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x9c, 0x01, 0x0a, 0x0c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x12, 0x28, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x4f, 0x70, 0x65, 0x6e, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x43, 0x6c, - 0x6f, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x49, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x49, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x42, 0x79, 0x74, 0x65, 0x73, 0x4f, 0x75, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x42, 0x79, 0x74, 0x65, 0x73, 0x4f, 0x75, 0x74, 0x42, 0x08, - 0x5a, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x3d, 0x0a, 0x0c, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x52, 0x0c, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, + 0x3b, 0x0a, 0x07, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, + 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x54, 0x6f, 0x74, 0x61, 0x6c, + 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x22, 0x23, 0x0a, 0x07, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x53, 0x4f, 0x43, 0x6f, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x49, 0x53, 0x4f, 0x43, 0x6f, 0x64, + 0x65, 0x22, 0x92, 0x01, 0x0a, 0x04, 0x43, 0x69, 0x74, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6e, 0x6f, 0x72, 0x6d, + 0x61, 0x6c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x69, 0x74, 0x79, 0x2e, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1c, + 0x0a, 0x09, 0x47, 0x65, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x09, 0x47, 0x65, 0x6f, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x44, 0x1a, 0x38, 0x0a, 0x0a, + 0x4e, 0x61, 0x6d, 0x65, 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, 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, 0x22, 0x60, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x4c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x4c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x4c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x09, 0x4c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x6f, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x04, 0x43, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x43, 0x69, 0x74, 0x79, 0x52, 0x04, 0x43, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x08, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9c, + 0x01, 0x0a, 0x0c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, + 0x28, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x43, 0x6c, 0x6f, + 0x73, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x49, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x42, 0x79, 0x74, 0x65, 0x73, 0x49, + 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x42, 0x79, 0x74, 0x65, 0x73, 0x4f, 0x75, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x42, 0x79, 0x74, 0x65, 0x73, 0x4f, 0x75, 0x74, 0x22, 0xe3, 0x02, + 0x0a, 0x0c, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x3a, + 0x0a, 0x05, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x72, 0x61, 0x70, + 0x68, 0x51, 0x4c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x05, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1e, 0x2e, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x0d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x1e, + 0x0a, 0x0a, 0x52, 0x6f, 0x6f, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x52, 0x6f, 0x6f, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x48, 0x61, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x48, 0x61, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x47, 0x72, + 0x61, 0x70, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0b, 0x47, 0x72, 0x61, 0x70, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x1a, 0x55, 0x0a, 0x0a, + 0x54, 0x79, 0x70, 0x65, 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, 0x31, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x6f, + 0x72, 0x6d, 0x61, 0x6c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x28, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2a, 0x5c, 0x0a, + 0x11, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x50, 0x45, 0x52, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x55, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, + 0x1a, 0x0a, 0x16, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x55, 0x42, + 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x42, 0x08, 0x5a, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -786,33 +1011,42 @@ func file_analytics_proto_rawDescGZIP() []byte { return file_analytics_proto_rawDescData } -var file_analytics_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_analytics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_analytics_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_analytics_proto_goTypes = []interface{}{ - (*AnalyticsRecord)(nil), // 0: normalproto.AnalyticsRecord - (*Latency)(nil), // 1: normalproto.Latency - (*Country)(nil), // 2: normalproto.Country - (*City)(nil), // 3: normalproto.City - (*Location)(nil), // 4: normalproto.Location - (*GeoData)(nil), // 5: normalproto.GeoData - (*NetworkStats)(nil), // 6: normalproto.NetworkStats - nil, // 7: normalproto.City.NamesEntry - (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp + (GraphQLOperations)(0), // 0: normalproto.GraphQLOperations + (*AnalyticsRecord)(nil), // 1: normalproto.AnalyticsRecord + (*Latency)(nil), // 2: normalproto.Latency + (*Country)(nil), // 3: normalproto.Country + (*City)(nil), // 4: normalproto.City + (*Location)(nil), // 5: normalproto.Location + (*GeoData)(nil), // 6: normalproto.GeoData + (*NetworkStats)(nil), // 7: normalproto.NetworkStats + (*GraphQLStats)(nil), // 8: normalproto.GraphQLStats + (*RepeatedFields)(nil), // 9: normalproto.RepeatedFields + nil, // 10: normalproto.City.NamesEntry + nil, // 11: normalproto.GraphQLStats.TypesEntry + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp } var file_analytics_proto_depIdxs = []int32{ - 8, // 0: normalproto.AnalyticsRecord.TimeStamp:type_name -> google.protobuf.Timestamp - 1, // 1: normalproto.AnalyticsRecord.Latency:type_name -> normalproto.Latency - 5, // 2: normalproto.AnalyticsRecord.Geo:type_name -> normalproto.GeoData - 6, // 3: normalproto.AnalyticsRecord.Network:type_name -> normalproto.NetworkStats - 8, // 4: normalproto.AnalyticsRecord.ExpireAt:type_name -> google.protobuf.Timestamp - 7, // 5: normalproto.City.Names:type_name -> normalproto.City.NamesEntry - 2, // 6: normalproto.GeoData.Country:type_name -> normalproto.Country - 3, // 7: normalproto.GeoData.City:type_name -> normalproto.City - 4, // 8: normalproto.GeoData.Location:type_name -> normalproto.Location - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 12, // 0: normalproto.AnalyticsRecord.TimeStamp:type_name -> google.protobuf.Timestamp + 2, // 1: normalproto.AnalyticsRecord.Latency:type_name -> normalproto.Latency + 6, // 2: normalproto.AnalyticsRecord.Geo:type_name -> normalproto.GeoData + 7, // 3: normalproto.AnalyticsRecord.Network:type_name -> normalproto.NetworkStats + 12, // 4: normalproto.AnalyticsRecord.ExpireAt:type_name -> google.protobuf.Timestamp + 8, // 5: normalproto.AnalyticsRecord.GraphQLStats:type_name -> normalproto.GraphQLStats + 10, // 6: normalproto.City.Names:type_name -> normalproto.City.NamesEntry + 3, // 7: normalproto.GeoData.Country:type_name -> normalproto.Country + 4, // 8: normalproto.GeoData.City:type_name -> normalproto.City + 5, // 9: normalproto.GeoData.Location:type_name -> normalproto.Location + 11, // 10: normalproto.GraphQLStats.Types:type_name -> normalproto.GraphQLStats.TypesEntry + 0, // 11: normalproto.GraphQLStats.OperationType:type_name -> normalproto.GraphQLOperations + 9, // 12: normalproto.GraphQLStats.TypesEntry.value:type_name -> normalproto.RepeatedFields + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_analytics_proto_init() } @@ -905,19 +1139,44 @@ func file_analytics_proto_init() { return nil } } + file_analytics_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GraphQLStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_analytics_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepeatedFields); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_analytics_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, + NumEnums: 1, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, GoTypes: file_analytics_proto_goTypes, DependencyIndexes: file_analytics_proto_depIdxs, + EnumInfos: file_analytics_proto_enumTypes, MessageInfos: file_analytics_proto_msgTypes, }.Build() File_analytics_proto = out.File