From 305cf0978fcfb7fb876da3f332e017041c683e26 Mon Sep 17 00:00:00 2001 From: Jacob Marble Date: Tue, 25 Apr 2023 16:55:50 -0700 Subject: [PATCH 1/2] feat: Add protos for metrics gRPC plugin Signed-off-by: Jacob Marble --- Makefile | 2 +- plugin/storage/grpc/proto/storage.proto | 52 + proto-gen/storage_v1/storage.pb.go | 6332 +++++++++++++++-------- 3 files changed, 4348 insertions(+), 2038 deletions(-) diff --git a/Makefile b/Makefile index 7eb51691281..e66092c3a4d 100644 --- a/Makefile +++ b/Makefile @@ -520,7 +520,7 @@ proto: init-submodules proto-prepare-otel $(PROTOC) \ $(PROTO_INCLUDES) \ -Iplugin/storage/grpc/proto \ - --gogo_out=plugins=grpc,$(PROTO_GOGO_MAPPINGS):$(PWD)/proto-gen/storage_v1 \ + --gogo_out=plugins=grpc,$(PROTO_GOGO_MAPPINGS),Mopenmetrics.proto=github.com/jaegertracing/jaeger/proto-gen/api_v2/metrics:$(PWD)/proto-gen/storage_v1 \ plugin/storage/grpc/proto/storage.proto $(PROTOC) \ diff --git a/plugin/storage/grpc/proto/storage.proto b/plugin/storage/grpc/proto/storage.proto index 51c804948fb..22545e9e9a0 100644 --- a/plugin/storage/grpc/proto/storage.proto +++ b/plugin/storage/grpc/proto/storage.proto @@ -23,6 +23,7 @@ import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; import "model.proto"; +import "openmetrics.proto"; // Enable gogoprotobuf extensions (https://github.com/gogo/protobuf/blob/master/extensions.md). // Enable custom Marshal method. @@ -174,6 +175,56 @@ service DependenciesReaderPlugin { rpc GetDependencies(GetDependenciesRequest) returns (GetDependenciesResponse); } +service MetricsReaderPlugin { + // metricsstore/Reader + rpc GetLatencies(GetLatenciesRequest) returns (GetLatenciesResponse); + rpc GetCallRates(GetCallRatesRequest) returns (GetCallRatesResponse); + rpc GetErrorRates(GetErrorRatesRequest) returns (GetErrorRatesResponse); + rpc GetMinStepDuration(GetMinStepDurationRequest) returns (GetMinStepDurationResponse); +} + +message MetricsBaseQueryParameters { + repeated string service_names = 1; + bool group_by_operation = 2; + google.protobuf.Timestamp end_time = 3; + google.protobuf.Duration lookback = 4; + google.protobuf.Duration step = 5; + google.protobuf.Duration rate_per = 6; + repeated string span_kinds = 7; +} + +message GetLatenciesRequest { + MetricsBaseQueryParameters base_query_parameters = 1; + float quantile = 2; +} + +message GetLatenciesResponse { + jaeger.api_v2.metrics.MetricFamily metric_family = 1; +} + +message GetCallRatesRequest { + MetricsBaseQueryParameters base_query_parameters = 1; +} + +message GetCallRatesResponse { + jaeger.api_v2.metrics.MetricFamily metric_family = 1; +} + +message GetErrorRatesRequest { + MetricsBaseQueryParameters base_query_parameters = 1; +} + +message GetErrorRatesResponse { + jaeger.api_v2.metrics.MetricFamily metric_family = 1; +} + +message GetMinStepDurationRequest { +} + +message GetMinStepDurationResponse { + google.protobuf.Duration min_step = 1; +} + // empty; extensible in the future message CapabilitiesRequest { @@ -183,6 +234,7 @@ message CapabilitiesResponse { bool archiveSpanReader = 1; bool archiveSpanWriter = 2; bool streamingSpanWriter = 3; + bool metricsReader = 4; } service PluginCapabilities { diff --git a/proto-gen/storage_v1/storage.pb.go b/proto-gen/storage_v1/storage.pb.go index 5564abb7ed4..01c1fe119bc 100644 --- a/proto-gen/storage_v1/storage.pb.go +++ b/proto-gen/storage_v1/storage.pb.go @@ -5,13 +5,15 @@ package storage_v1 import ( context "context" + encoding_binary "encoding/binary" fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + types "github.com/gogo/protobuf/types" github_com_jaegertracing_jaeger_model "github.com/jaegertracing/jaeger/model" model "github.com/jaegertracing/jaeger/model" + metrics "github.com/jaegertracing/jaeger/proto-gen/api_v2/metrics" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -877,25 +879,31 @@ func (m *FindTraceIDsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_FindTraceIDsResponse proto.InternalMessageInfo -// empty; extensible in the future -type CapabilitiesRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CapabilitiesRequest) Reset() { *m = CapabilitiesRequest{} } -func (m *CapabilitiesRequest) String() string { return proto.CompactTextString(m) } -func (*CapabilitiesRequest) ProtoMessage() {} -func (*CapabilitiesRequest) Descriptor() ([]byte, []int) { +type MetricsBaseQueryParameters struct { + ServiceNames []string `protobuf:"bytes,1,rep,name=service_names,json=serviceNames,proto3" json:"service_names,omitempty"` + GroupByOperation bool `protobuf:"varint,2,opt,name=group_by_operation,json=groupByOperation,proto3" json:"group_by_operation,omitempty"` + EndTime *types.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + Lookback *types.Duration `protobuf:"bytes,4,opt,name=lookback,proto3" json:"lookback,omitempty"` + Step *types.Duration `protobuf:"bytes,5,opt,name=step,proto3" json:"step,omitempty"` + RatePer *types.Duration `protobuf:"bytes,6,opt,name=rate_per,json=ratePer,proto3" json:"rate_per,omitempty"` + SpanKinds []string `protobuf:"bytes,7,rep,name=span_kinds,json=spanKinds,proto3" json:"span_kinds,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MetricsBaseQueryParameters) Reset() { *m = MetricsBaseQueryParameters{} } +func (m *MetricsBaseQueryParameters) String() string { return proto.CompactTextString(m) } +func (*MetricsBaseQueryParameters) ProtoMessage() {} +func (*MetricsBaseQueryParameters) Descriptor() ([]byte, []int) { return fileDescriptor_0d2c4ccf1453ffdb, []int{17} } -func (m *CapabilitiesRequest) XXX_Unmarshal(b []byte) error { +func (m *MetricsBaseQueryParameters) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *CapabilitiesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MetricsBaseQueryParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_CapabilitiesRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_MetricsBaseQueryParameters.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -905,39 +913,87 @@ func (m *CapabilitiesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *CapabilitiesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CapabilitiesRequest.Merge(m, src) +func (m *MetricsBaseQueryParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_MetricsBaseQueryParameters.Merge(m, src) } -func (m *CapabilitiesRequest) XXX_Size() int { +func (m *MetricsBaseQueryParameters) XXX_Size() int { return m.Size() } -func (m *CapabilitiesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CapabilitiesRequest.DiscardUnknown(m) +func (m *MetricsBaseQueryParameters) XXX_DiscardUnknown() { + xxx_messageInfo_MetricsBaseQueryParameters.DiscardUnknown(m) } -var xxx_messageInfo_CapabilitiesRequest proto.InternalMessageInfo +var xxx_messageInfo_MetricsBaseQueryParameters proto.InternalMessageInfo -type CapabilitiesResponse struct { - ArchiveSpanReader bool `protobuf:"varint,1,opt,name=archiveSpanReader,proto3" json:"archiveSpanReader,omitempty"` - ArchiveSpanWriter bool `protobuf:"varint,2,opt,name=archiveSpanWriter,proto3" json:"archiveSpanWriter,omitempty"` - StreamingSpanWriter bool `protobuf:"varint,3,opt,name=streamingSpanWriter,proto3" json:"streamingSpanWriter,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (m *MetricsBaseQueryParameters) GetServiceNames() []string { + if m != nil { + return m.ServiceNames + } + return nil } -func (m *CapabilitiesResponse) Reset() { *m = CapabilitiesResponse{} } -func (m *CapabilitiesResponse) String() string { return proto.CompactTextString(m) } -func (*CapabilitiesResponse) ProtoMessage() {} -func (*CapabilitiesResponse) Descriptor() ([]byte, []int) { +func (m *MetricsBaseQueryParameters) GetGroupByOperation() bool { + if m != nil { + return m.GroupByOperation + } + return false +} + +func (m *MetricsBaseQueryParameters) GetEndTime() *types.Timestamp { + if m != nil { + return m.EndTime + } + return nil +} + +func (m *MetricsBaseQueryParameters) GetLookback() *types.Duration { + if m != nil { + return m.Lookback + } + return nil +} + +func (m *MetricsBaseQueryParameters) GetStep() *types.Duration { + if m != nil { + return m.Step + } + return nil +} + +func (m *MetricsBaseQueryParameters) GetRatePer() *types.Duration { + if m != nil { + return m.RatePer + } + return nil +} + +func (m *MetricsBaseQueryParameters) GetSpanKinds() []string { + if m != nil { + return m.SpanKinds + } + return nil +} + +type GetLatenciesRequest struct { + BaseQueryParameters *MetricsBaseQueryParameters `protobuf:"bytes,1,opt,name=base_query_parameters,json=baseQueryParameters,proto3" json:"base_query_parameters,omitempty"` + Quantile float32 `protobuf:"fixed32,2,opt,name=quantile,proto3" json:"quantile,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetLatenciesRequest) Reset() { *m = GetLatenciesRequest{} } +func (m *GetLatenciesRequest) String() string { return proto.CompactTextString(m) } +func (*GetLatenciesRequest) ProtoMessage() {} +func (*GetLatenciesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0d2c4ccf1453ffdb, []int{18} } -func (m *CapabilitiesResponse) XXX_Unmarshal(b []byte) error { +func (m *GetLatenciesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *CapabilitiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *GetLatenciesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_CapabilitiesResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_GetLatenciesRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -947,731 +1003,846 @@ func (m *CapabilitiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *CapabilitiesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CapabilitiesResponse.Merge(m, src) +func (m *GetLatenciesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetLatenciesRequest.Merge(m, src) } -func (m *CapabilitiesResponse) XXX_Size() int { +func (m *GetLatenciesRequest) XXX_Size() int { return m.Size() } -func (m *CapabilitiesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CapabilitiesResponse.DiscardUnknown(m) +func (m *GetLatenciesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetLatenciesRequest.DiscardUnknown(m) } -var xxx_messageInfo_CapabilitiesResponse proto.InternalMessageInfo +var xxx_messageInfo_GetLatenciesRequest proto.InternalMessageInfo -func (m *CapabilitiesResponse) GetArchiveSpanReader() bool { +func (m *GetLatenciesRequest) GetBaseQueryParameters() *MetricsBaseQueryParameters { if m != nil { - return m.ArchiveSpanReader + return m.BaseQueryParameters } - return false + return nil } -func (m *CapabilitiesResponse) GetArchiveSpanWriter() bool { +func (m *GetLatenciesRequest) GetQuantile() float32 { if m != nil { - return m.ArchiveSpanWriter + return m.Quantile } - return false + return 0 } -func (m *CapabilitiesResponse) GetStreamingSpanWriter() bool { - if m != nil { - return m.StreamingSpanWriter - } - return false +type GetLatenciesResponse struct { + MetricFamily *metrics.MetricFamily `protobuf:"bytes,1,opt,name=metric_family,json=metricFamily,proto3" json:"metric_family,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func init() { - proto.RegisterType((*GetDependenciesRequest)(nil), "jaeger.storage.v1.GetDependenciesRequest") - proto.RegisterType((*GetDependenciesResponse)(nil), "jaeger.storage.v1.GetDependenciesResponse") - proto.RegisterType((*WriteSpanRequest)(nil), "jaeger.storage.v1.WriteSpanRequest") - proto.RegisterType((*WriteSpanResponse)(nil), "jaeger.storage.v1.WriteSpanResponse") - proto.RegisterType((*CloseWriterRequest)(nil), "jaeger.storage.v1.CloseWriterRequest") - proto.RegisterType((*CloseWriterResponse)(nil), "jaeger.storage.v1.CloseWriterResponse") - proto.RegisterType((*GetTraceRequest)(nil), "jaeger.storage.v1.GetTraceRequest") - proto.RegisterType((*GetServicesRequest)(nil), "jaeger.storage.v1.GetServicesRequest") - proto.RegisterType((*GetServicesResponse)(nil), "jaeger.storage.v1.GetServicesResponse") - proto.RegisterType((*GetOperationsRequest)(nil), "jaeger.storage.v1.GetOperationsRequest") - proto.RegisterType((*Operation)(nil), "jaeger.storage.v1.Operation") - proto.RegisterType((*GetOperationsResponse)(nil), "jaeger.storage.v1.GetOperationsResponse") - proto.RegisterType((*TraceQueryParameters)(nil), "jaeger.storage.v1.TraceQueryParameters") - proto.RegisterMapType((map[string]string)(nil), "jaeger.storage.v1.TraceQueryParameters.TagsEntry") - proto.RegisterType((*FindTracesRequest)(nil), "jaeger.storage.v1.FindTracesRequest") - proto.RegisterType((*SpansResponseChunk)(nil), "jaeger.storage.v1.SpansResponseChunk") - proto.RegisterType((*FindTraceIDsRequest)(nil), "jaeger.storage.v1.FindTraceIDsRequest") - proto.RegisterType((*FindTraceIDsResponse)(nil), "jaeger.storage.v1.FindTraceIDsResponse") - proto.RegisterType((*CapabilitiesRequest)(nil), "jaeger.storage.v1.CapabilitiesRequest") - proto.RegisterType((*CapabilitiesResponse)(nil), "jaeger.storage.v1.CapabilitiesResponse") +func (m *GetLatenciesResponse) Reset() { *m = GetLatenciesResponse{} } +func (m *GetLatenciesResponse) String() string { return proto.CompactTextString(m) } +func (*GetLatenciesResponse) ProtoMessage() {} +func (*GetLatenciesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0d2c4ccf1453ffdb, []int{19} +} +func (m *GetLatenciesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetLatenciesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetLatenciesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetLatenciesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetLatenciesResponse.Merge(m, src) +} +func (m *GetLatenciesResponse) XXX_Size() int { + return m.Size() +} +func (m *GetLatenciesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetLatenciesResponse.DiscardUnknown(m) } -func init() { proto.RegisterFile("storage.proto", fileDescriptor_0d2c4ccf1453ffdb) } +var xxx_messageInfo_GetLatenciesResponse proto.InternalMessageInfo -var fileDescriptor_0d2c4ccf1453ffdb = []byte{ - // 1117 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0xdc, 0xc4, - 0x1b, 0xfe, 0x39, 0xd9, 0x6d, 0x76, 0xdf, 0xdd, 0xb4, 0xc9, 0xec, 0xf6, 0x57, 0xd7, 0xd0, 0x24, - 0x18, 0x9a, 0x04, 0x04, 0xde, 0x66, 0x39, 0x80, 0xa0, 0x08, 0x9a, 0x3f, 0x8d, 0x02, 0x14, 0x8a, - 0x13, 0xb5, 0x12, 0x85, 0xac, 0x66, 0xe3, 0xc1, 0x19, 0xb2, 0x1e, 0x6f, 0xed, 0xf1, 0x2a, 0x11, - 0xe2, 0xc6, 0x07, 0xe0, 0xc8, 0x89, 0x13, 0x12, 0xdf, 0x83, 0x53, 0x8f, 0x9c, 0x39, 0x04, 0x94, - 0x2b, 0x5f, 0x02, 0x79, 0x66, 0xec, 0xd8, 0x6b, 0x2b, 0x49, 0xa3, 0xdc, 0x3c, 0xef, 0x3c, 0xf3, - 0xbc, 0xff, 0x66, 0x9e, 0xd7, 0x30, 0x1d, 0x72, 0x3f, 0xc0, 0x2e, 0xb1, 0x86, 0x81, 0xcf, 0x7d, - 0x34, 0xfb, 0x3d, 0x26, 0x2e, 0x09, 0xac, 0xc4, 0x3a, 0x5a, 0x31, 0xda, 0xae, 0xef, 0xfa, 0x62, - 0xb7, 0x13, 0x7f, 0x49, 0xa0, 0x31, 0xef, 0xfa, 0xbe, 0x3b, 0x20, 0x1d, 0xb1, 0xea, 0x47, 0xdf, - 0x75, 0x38, 0xf5, 0x48, 0xc8, 0xb1, 0x37, 0x54, 0x80, 0xb9, 0x71, 0x80, 0x13, 0x05, 0x98, 0x53, - 0x9f, 0xa9, 0xfd, 0x86, 0xe7, 0x3b, 0x64, 0x20, 0x17, 0xe6, 0xaf, 0x1a, 0xfc, 0x7f, 0x93, 0xf0, - 0x75, 0x32, 0x24, 0xcc, 0x21, 0x6c, 0x8f, 0x92, 0xd0, 0x26, 0xcf, 0x23, 0x12, 0x72, 0xb4, 0x06, - 0x10, 0x72, 0x1c, 0xf0, 0x5e, 0xec, 0x40, 0xd7, 0x16, 0xb4, 0xe5, 0x46, 0xd7, 0xb0, 0x24, 0xb9, - 0x95, 0x90, 0x5b, 0x3b, 0x89, 0xf7, 0xd5, 0xda, 0x8b, 0xe3, 0xf9, 0xff, 0xfd, 0xfc, 0xf7, 0xbc, - 0x66, 0xd7, 0xc5, 0xb9, 0x78, 0x07, 0x7d, 0x0c, 0x35, 0xc2, 0x1c, 0x49, 0x31, 0xf1, 0x12, 0x14, - 0x53, 0x84, 0x39, 0xb1, 0xdd, 0xec, 0xc3, 0xad, 0x42, 0x7c, 0xe1, 0xd0, 0x67, 0x21, 0x41, 0x9b, - 0xd0, 0x74, 0x32, 0x76, 0x5d, 0x5b, 0x98, 0x5c, 0x6e, 0x74, 0xef, 0x58, 0xaa, 0x92, 0x78, 0x48, - 0x7b, 0xa3, 0xae, 0x95, 0x1e, 0x3d, 0xfa, 0x9c, 0xb2, 0x83, 0xd5, 0x4a, 0xec, 0xc2, 0xce, 0x1d, - 0x34, 0x3f, 0x84, 0x99, 0xa7, 0x01, 0xe5, 0x64, 0x7b, 0x88, 0x59, 0x92, 0xfd, 0x12, 0x54, 0xc2, - 0x21, 0x66, 0x2a, 0xef, 0xd6, 0x18, 0xa9, 0x40, 0x0a, 0x80, 0xd9, 0x82, 0xd9, 0xcc, 0x61, 0x19, - 0x9a, 0xd9, 0x06, 0xb4, 0x36, 0xf0, 0x43, 0x22, 0x76, 0x02, 0xc5, 0x69, 0xde, 0x84, 0x56, 0xce, - 0xaa, 0xc0, 0x0c, 0x6e, 0x6c, 0x12, 0xbe, 0x13, 0xe0, 0x3d, 0x92, 0x78, 0x7f, 0x06, 0x35, 0x1e, - 0xaf, 0x7b, 0xd4, 0x11, 0x11, 0x34, 0x57, 0x3f, 0x89, 0xe3, 0xfe, 0xeb, 0x78, 0xfe, 0x1d, 0x97, - 0xf2, 0xfd, 0xa8, 0x6f, 0xed, 0xf9, 0x5e, 0x47, 0xc6, 0x14, 0x03, 0x29, 0x73, 0xd5, 0xaa, 0x23, - 0xbb, 0x2b, 0xd8, 0xb6, 0xd6, 0x4f, 0x8e, 0xe7, 0xa7, 0xd4, 0xa7, 0x3d, 0x25, 0x18, 0xb7, 0x9c, - 0x38, 0xb8, 0x4d, 0xc2, 0xb7, 0x49, 0x30, 0xa2, 0x7b, 0x69, 0xbb, 0xcd, 0x15, 0x68, 0xe5, 0xac, - 0xaa, 0xc8, 0x06, 0xd4, 0x42, 0x65, 0x13, 0x05, 0xae, 0xdb, 0xe9, 0xda, 0x7c, 0x04, 0xed, 0x4d, - 0xc2, 0xbf, 0x1c, 0x12, 0x79, 0xbf, 0xd2, 0x9b, 0xa3, 0xc3, 0x94, 0xc2, 0x88, 0xe0, 0xeb, 0x76, - 0xb2, 0x44, 0xaf, 0x40, 0x3d, 0x2e, 0x5a, 0xef, 0x80, 0x32, 0x47, 0xdc, 0x87, 0x98, 0x6e, 0x88, - 0xd9, 0x67, 0x94, 0x39, 0xe6, 0x7d, 0xa8, 0xa7, 0x5c, 0x08, 0x41, 0x85, 0x61, 0x2f, 0x21, 0x10, - 0xdf, 0x67, 0x9f, 0xfe, 0x11, 0x6e, 0x8e, 0x05, 0xa3, 0x32, 0x58, 0x84, 0xeb, 0x7e, 0x62, 0xfd, - 0x02, 0x7b, 0x69, 0x1e, 0x63, 0x56, 0x74, 0x1f, 0x20, 0xb5, 0x84, 0xfa, 0x84, 0xb8, 0x4c, 0xaf, - 0x5a, 0x85, 0x67, 0x69, 0xa5, 0x2e, 0xec, 0x0c, 0xde, 0xfc, 0xbd, 0x02, 0x6d, 0x51, 0xe9, 0xaf, - 0x22, 0x12, 0x1c, 0x3d, 0xc6, 0x01, 0xf6, 0x08, 0x27, 0x41, 0x88, 0x5e, 0x83, 0xa6, 0xca, 0xbe, - 0x97, 0x49, 0xa8, 0xa1, 0x6c, 0xb1, 0x6b, 0x74, 0x37, 0x13, 0xa1, 0x04, 0xc9, 0xe4, 0xa6, 0x73, - 0x11, 0xa2, 0x0d, 0xa8, 0x70, 0xec, 0x86, 0xfa, 0xa4, 0x08, 0x6d, 0xa5, 0x24, 0xb4, 0xb2, 0x00, - 0xac, 0x1d, 0xec, 0x86, 0x1b, 0x8c, 0x07, 0x47, 0xb6, 0x38, 0x8e, 0x3e, 0x85, 0xeb, 0xa7, 0xef, - 0xba, 0xe7, 0x51, 0xa6, 0x57, 0x5e, 0xe2, 0x61, 0x36, 0xd3, 0xb7, 0xfd, 0x88, 0xb2, 0x71, 0x2e, - 0x7c, 0xa8, 0x57, 0x2f, 0xc7, 0x85, 0x0f, 0xd1, 0x43, 0x68, 0x26, 0x4a, 0x25, 0xa2, 0xba, 0x26, - 0x98, 0x6e, 0x17, 0x98, 0xd6, 0x15, 0x48, 0x12, 0xfd, 0x12, 0x13, 0x35, 0x92, 0x83, 0x71, 0x4c, - 0x39, 0x1e, 0x7c, 0xa8, 0x4f, 0x5d, 0x86, 0x07, 0x1f, 0xa2, 0x3b, 0x00, 0x2c, 0xf2, 0x7a, 0xe2, - 0xd5, 0x84, 0x7a, 0x6d, 0x41, 0x5b, 0xae, 0xda, 0x75, 0x16, 0x79, 0xa2, 0xc8, 0xa1, 0xf1, 0x1e, - 0xd4, 0xd3, 0xca, 0xa2, 0x19, 0x98, 0x3c, 0x20, 0x47, 0xaa, 0xb7, 0xf1, 0x27, 0x6a, 0x43, 0x75, - 0x84, 0x07, 0x51, 0xd2, 0x4a, 0xb9, 0xf8, 0x60, 0xe2, 0x7d, 0xcd, 0xb4, 0x61, 0xf6, 0x21, 0x65, - 0x8e, 0xa4, 0x49, 0x9e, 0xcc, 0x47, 0x50, 0x7d, 0x1e, 0xf7, 0x4d, 0xe9, 0xcd, 0xd2, 0x05, 0x9b, - 0x6b, 0xcb, 0x53, 0xe6, 0x06, 0xa0, 0x58, 0x7f, 0xd2, 0x4b, 0xbf, 0xb6, 0x1f, 0xb1, 0x03, 0xd4, - 0x81, 0x6a, 0xfc, 0x3c, 0x12, 0x65, 0x2c, 0x13, 0x31, 0xa5, 0x87, 0x12, 0x67, 0xee, 0x40, 0x2b, - 0x0d, 0x6d, 0x6b, 0xfd, 0xaa, 0x82, 0x1b, 0x41, 0x3b, 0xcf, 0xaa, 0x1e, 0xe6, 0x2e, 0xd4, 0x13, - 0x91, 0x93, 0x21, 0x36, 0x57, 0x1f, 0x5c, 0x56, 0xe5, 0x6a, 0x29, 0x7b, 0x4d, 0xc9, 0x5c, 0x28, - 0xe4, 0x16, 0x0f, 0x71, 0x9f, 0x0e, 0x28, 0x3f, 0x9d, 0x6b, 0xe6, 0x6f, 0x1a, 0xb4, 0xf3, 0x76, - 0x15, 0xcf, 0xdb, 0x30, 0x8b, 0x83, 0xbd, 0x7d, 0x3a, 0x52, 0x5a, 0x8e, 0x1d, 0x12, 0x88, 0x94, - 0x6b, 0x76, 0x71, 0x63, 0x0c, 0x2d, 0x25, 0x5d, 0x34, 0x3b, 0x8f, 0x96, 0x1b, 0xe8, 0x1e, 0xb4, - 0x42, 0x1e, 0x10, 0xec, 0x51, 0xe6, 0x66, 0xf0, 0x93, 0x02, 0x5f, 0xb6, 0xd5, 0xfd, 0x43, 0x83, - 0x99, 0xd3, 0xe5, 0xe3, 0x41, 0xe4, 0x52, 0x86, 0x9e, 0x40, 0x3d, 0x1d, 0x36, 0xe8, 0xf5, 0x92, - 0x3e, 0x8c, 0xcf, 0x31, 0xe3, 0x8d, 0xb3, 0x41, 0x2a, 0xf5, 0x27, 0x50, 0x15, 0x93, 0x09, 0xdd, - 0x2d, 0x81, 0x17, 0x27, 0x99, 0xb1, 0x78, 0x1e, 0x4c, 0xf2, 0x76, 0x7f, 0x80, 0xdb, 0xdb, 0xc5, - 0xdc, 0x54, 0x32, 0xbb, 0x70, 0x23, 0x8d, 0x44, 0xa2, 0xae, 0x30, 0xa5, 0x65, 0xad, 0xfb, 0xef, - 0xa4, 0xac, 0xa0, 0x6c, 0x98, 0x72, 0xfa, 0x14, 0x6a, 0xc9, 0xb0, 0x45, 0x66, 0x09, 0xd1, 0xd8, - 0x24, 0x36, 0xca, 0x0a, 0x52, 0x7c, 0x6a, 0xf7, 0x34, 0xf4, 0x0d, 0x34, 0x32, 0xf3, 0xb3, 0xb4, - 0x90, 0xc5, 0xa9, 0x5b, 0x5a, 0xc8, 0xb2, 0x31, 0xdc, 0x87, 0xe9, 0xdc, 0x74, 0x43, 0x4b, 0xe5, - 0x07, 0x0b, 0xc3, 0xd8, 0x58, 0x3e, 0x1f, 0xa8, 0x7c, 0x3c, 0x03, 0x38, 0x15, 0x26, 0x54, 0x56, - 0xe5, 0x82, 0x6e, 0x5d, 0xbc, 0x3c, 0x3d, 0x68, 0x66, 0x45, 0x00, 0x2d, 0x9e, 0x45, 0x7f, 0xaa, - 0x3d, 0xc6, 0xd2, 0xb9, 0x38, 0x75, 0xd5, 0x0e, 0xe1, 0xd6, 0x83, 0xf1, 0x67, 0xa7, 0x7a, 0xfe, - 0xad, 0xfa, 0xbf, 0xcb, 0xec, 0x5f, 0xe1, 0x4d, 0xeb, 0x1e, 0xe5, 0x3c, 0xe7, 0x6e, 0xdb, 0xae, - 0xf8, 0xb5, 0x53, 0xbb, 0x57, 0x7f, 0xe9, 0xba, 0x3f, 0x69, 0xa0, 0xe7, 0xff, 0x8d, 0x33, 0xce, - 0xf7, 0x85, 0xf3, 0xec, 0x36, 0x7a, 0xb3, 0xdc, 0x79, 0xc9, 0xef, 0xbf, 0xf1, 0xd6, 0x45, 0xa0, - 0xaa, 0x02, 0x11, 0x20, 0xe9, 0x33, 0xab, 0xab, 0x71, 0xcb, 0x73, 0xeb, 0x52, 0xd1, 0x28, 0x0a, - 0x74, 0x69, 0xcb, 0xcb, 0x04, 0x7b, 0x55, 0x7f, 0x71, 0x32, 0xa7, 0xfd, 0x79, 0x32, 0xa7, 0xfd, - 0x73, 0x32, 0xa7, 0x7d, 0x0d, 0x0a, 0xde, 0x1b, 0xad, 0xf4, 0xaf, 0x89, 0x29, 0xff, 0xee, 0x7f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x6c, 0xa3, 0xc0, 0x72, 0x65, 0x0d, 0x00, 0x00, +func (m *GetLatenciesResponse) GetMetricFamily() *metrics.MetricFamily { + if m != nil { + return m.MetricFamily + } + return nil } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +type GetCallRatesRequest struct { + BaseQueryParameters *MetricsBaseQueryParameters `protobuf:"bytes,1,opt,name=base_query_parameters,json=baseQueryParameters,proto3" json:"base_query_parameters,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} -// SpanWriterPluginClient is the client API for SpanWriterPlugin service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SpanWriterPluginClient interface { - // spanstore/Writer - WriteSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) - Close(ctx context.Context, in *CloseWriterRequest, opts ...grpc.CallOption) (*CloseWriterResponse, error) +func (m *GetCallRatesRequest) Reset() { *m = GetCallRatesRequest{} } +func (m *GetCallRatesRequest) String() string { return proto.CompactTextString(m) } +func (*GetCallRatesRequest) ProtoMessage() {} +func (*GetCallRatesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0d2c4ccf1453ffdb, []int{20} +} +func (m *GetCallRatesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetCallRatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetCallRatesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetCallRatesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetCallRatesRequest.Merge(m, src) +} +func (m *GetCallRatesRequest) XXX_Size() int { + return m.Size() +} +func (m *GetCallRatesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetCallRatesRequest.DiscardUnknown(m) } -type spanWriterPluginClient struct { - cc *grpc.ClientConn +var xxx_messageInfo_GetCallRatesRequest proto.InternalMessageInfo + +func (m *GetCallRatesRequest) GetBaseQueryParameters() *MetricsBaseQueryParameters { + if m != nil { + return m.BaseQueryParameters + } + return nil } -func NewSpanWriterPluginClient(cc *grpc.ClientConn) SpanWriterPluginClient { - return &spanWriterPluginClient{cc} +type GetCallRatesResponse struct { + MetricFamily *metrics.MetricFamily `protobuf:"bytes,1,opt,name=metric_family,json=metricFamily,proto3" json:"metric_family,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (c *spanWriterPluginClient) WriteSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) { - out := new(WriteSpanResponse) - err := c.cc.Invoke(ctx, "/jaeger.storage.v1.SpanWriterPlugin/WriteSpan", in, out, opts...) - if err != nil { - return nil, err +func (m *GetCallRatesResponse) Reset() { *m = GetCallRatesResponse{} } +func (m *GetCallRatesResponse) String() string { return proto.CompactTextString(m) } +func (*GetCallRatesResponse) ProtoMessage() {} +func (*GetCallRatesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0d2c4ccf1453ffdb, []int{21} +} +func (m *GetCallRatesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetCallRatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetCallRatesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *GetCallRatesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetCallRatesResponse.Merge(m, src) +} +func (m *GetCallRatesResponse) XXX_Size() int { + return m.Size() +} +func (m *GetCallRatesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetCallRatesResponse.DiscardUnknown(m) } -func (c *spanWriterPluginClient) Close(ctx context.Context, in *CloseWriterRequest, opts ...grpc.CallOption) (*CloseWriterResponse, error) { - out := new(CloseWriterResponse) - err := c.cc.Invoke(ctx, "/jaeger.storage.v1.SpanWriterPlugin/Close", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_GetCallRatesResponse proto.InternalMessageInfo + +func (m *GetCallRatesResponse) GetMetricFamily() *metrics.MetricFamily { + if m != nil { + return m.MetricFamily } - return out, nil + return nil } -// SpanWriterPluginServer is the server API for SpanWriterPlugin service. -type SpanWriterPluginServer interface { - // spanstore/Writer - WriteSpan(context.Context, *WriteSpanRequest) (*WriteSpanResponse, error) - Close(context.Context, *CloseWriterRequest) (*CloseWriterResponse, error) +type GetErrorRatesRequest struct { + BaseQueryParameters *MetricsBaseQueryParameters `protobuf:"bytes,1,opt,name=base_query_parameters,json=baseQueryParameters,proto3" json:"base_query_parameters,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -// UnimplementedSpanWriterPluginServer can be embedded to have forward compatible implementations. -type UnimplementedSpanWriterPluginServer struct { +func (m *GetErrorRatesRequest) Reset() { *m = GetErrorRatesRequest{} } +func (m *GetErrorRatesRequest) String() string { return proto.CompactTextString(m) } +func (*GetErrorRatesRequest) ProtoMessage() {} +func (*GetErrorRatesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0d2c4ccf1453ffdb, []int{22} } - -func (*UnimplementedSpanWriterPluginServer) WriteSpan(ctx context.Context, req *WriteSpanRequest) (*WriteSpanResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WriteSpan not implemented") +func (m *GetErrorRatesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedSpanWriterPluginServer) Close(ctx context.Context, req *CloseWriterRequest) (*CloseWriterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Close not implemented") +func (m *GetErrorRatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetErrorRatesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } - -func RegisterSpanWriterPluginServer(s *grpc.Server, srv SpanWriterPluginServer) { - s.RegisterService(&_SpanWriterPlugin_serviceDesc, srv) +func (m *GetErrorRatesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetErrorRatesRequest.Merge(m, src) +} +func (m *GetErrorRatesRequest) XXX_Size() int { + return m.Size() +} +func (m *GetErrorRatesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetErrorRatesRequest.DiscardUnknown(m) } -func _SpanWriterPlugin_WriteSpan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WriteSpanRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SpanWriterPluginServer).WriteSpan(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jaeger.storage.v1.SpanWriterPlugin/WriteSpan", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SpanWriterPluginServer).WriteSpan(ctx, req.(*WriteSpanRequest)) +var xxx_messageInfo_GetErrorRatesRequest proto.InternalMessageInfo + +func (m *GetErrorRatesRequest) GetBaseQueryParameters() *MetricsBaseQueryParameters { + if m != nil { + return m.BaseQueryParameters } - return interceptor(ctx, in, info, handler) + return nil } -func _SpanWriterPlugin_Close_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CloseWriterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SpanWriterPluginServer).Close(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jaeger.storage.v1.SpanWriterPlugin/Close", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SpanWriterPluginServer).Close(ctx, req.(*CloseWriterRequest)) - } - return interceptor(ctx, in, info, handler) +type GetErrorRatesResponse struct { + MetricFamily *metrics.MetricFamily `protobuf:"bytes,1,opt,name=metric_family,json=metricFamily,proto3" json:"metric_family,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -var _SpanWriterPlugin_serviceDesc = grpc.ServiceDesc{ - ServiceName: "jaeger.storage.v1.SpanWriterPlugin", - HandlerType: (*SpanWriterPluginServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "WriteSpan", - Handler: _SpanWriterPlugin_WriteSpan_Handler, - }, - { - MethodName: "Close", - Handler: _SpanWriterPlugin_Close_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "storage.proto", +func (m *GetErrorRatesResponse) Reset() { *m = GetErrorRatesResponse{} } +func (m *GetErrorRatesResponse) String() string { return proto.CompactTextString(m) } +func (*GetErrorRatesResponse) ProtoMessage() {} +func (*GetErrorRatesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0d2c4ccf1453ffdb, []int{23} } - -// StreamingSpanWriterPluginClient is the client API for StreamingSpanWriterPlugin service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type StreamingSpanWriterPluginClient interface { - WriteSpanStream(ctx context.Context, opts ...grpc.CallOption) (StreamingSpanWriterPlugin_WriteSpanStreamClient, error) +func (m *GetErrorRatesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -type streamingSpanWriterPluginClient struct { - cc *grpc.ClientConn +func (m *GetErrorRatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetErrorRatesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } - -func NewStreamingSpanWriterPluginClient(cc *grpc.ClientConn) StreamingSpanWriterPluginClient { - return &streamingSpanWriterPluginClient{cc} +func (m *GetErrorRatesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetErrorRatesResponse.Merge(m, src) +} +func (m *GetErrorRatesResponse) XXX_Size() int { + return m.Size() +} +func (m *GetErrorRatesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetErrorRatesResponse.DiscardUnknown(m) } -func (c *streamingSpanWriterPluginClient) WriteSpanStream(ctx context.Context, opts ...grpc.CallOption) (StreamingSpanWriterPlugin_WriteSpanStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &_StreamingSpanWriterPlugin_serviceDesc.Streams[0], "/jaeger.storage.v1.StreamingSpanWriterPlugin/WriteSpanStream", opts...) - if err != nil { - return nil, err +var xxx_messageInfo_GetErrorRatesResponse proto.InternalMessageInfo + +func (m *GetErrorRatesResponse) GetMetricFamily() *metrics.MetricFamily { + if m != nil { + return m.MetricFamily } - x := &streamingSpanWriterPluginWriteSpanStreamClient{stream} - return x, nil + return nil } -type StreamingSpanWriterPlugin_WriteSpanStreamClient interface { - Send(*WriteSpanRequest) error - CloseAndRecv() (*WriteSpanResponse, error) - grpc.ClientStream +type GetMinStepDurationRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -type streamingSpanWriterPluginWriteSpanStreamClient struct { - grpc.ClientStream +func (m *GetMinStepDurationRequest) Reset() { *m = GetMinStepDurationRequest{} } +func (m *GetMinStepDurationRequest) String() string { return proto.CompactTextString(m) } +func (*GetMinStepDurationRequest) ProtoMessage() {} +func (*GetMinStepDurationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0d2c4ccf1453ffdb, []int{24} } - -func (x *streamingSpanWriterPluginWriteSpanStreamClient) Send(m *WriteSpanRequest) error { - return x.ClientStream.SendMsg(m) +func (m *GetMinStepDurationRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (x *streamingSpanWriterPluginWriteSpanStreamClient) CloseAndRecv() (*WriteSpanResponse, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(WriteSpanResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err +func (m *GetMinStepDurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetMinStepDurationRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return m, nil -} - -// StreamingSpanWriterPluginServer is the server API for StreamingSpanWriterPlugin service. -type StreamingSpanWriterPluginServer interface { - WriteSpanStream(StreamingSpanWriterPlugin_WriteSpanStreamServer) error } - -// UnimplementedStreamingSpanWriterPluginServer can be embedded to have forward compatible implementations. -type UnimplementedStreamingSpanWriterPluginServer struct { +func (m *GetMinStepDurationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetMinStepDurationRequest.Merge(m, src) } - -func (*UnimplementedStreamingSpanWriterPluginServer) WriteSpanStream(srv StreamingSpanWriterPlugin_WriteSpanStreamServer) error { - return status.Errorf(codes.Unimplemented, "method WriteSpanStream not implemented") +func (m *GetMinStepDurationRequest) XXX_Size() int { + return m.Size() } - -func RegisterStreamingSpanWriterPluginServer(s *grpc.Server, srv StreamingSpanWriterPluginServer) { - s.RegisterService(&_StreamingSpanWriterPlugin_serviceDesc, srv) +func (m *GetMinStepDurationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetMinStepDurationRequest.DiscardUnknown(m) } -func _StreamingSpanWriterPlugin_WriteSpanStream_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(StreamingSpanWriterPluginServer).WriteSpanStream(&streamingSpanWriterPluginWriteSpanStreamServer{stream}) -} +var xxx_messageInfo_GetMinStepDurationRequest proto.InternalMessageInfo -type StreamingSpanWriterPlugin_WriteSpanStreamServer interface { - SendAndClose(*WriteSpanResponse) error - Recv() (*WriteSpanRequest, error) - grpc.ServerStream +type GetMinStepDurationResponse struct { + MinStep *types.Duration `protobuf:"bytes,1,opt,name=min_step,json=minStep,proto3" json:"min_step,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -type streamingSpanWriterPluginWriteSpanStreamServer struct { - grpc.ServerStream +func (m *GetMinStepDurationResponse) Reset() { *m = GetMinStepDurationResponse{} } +func (m *GetMinStepDurationResponse) String() string { return proto.CompactTextString(m) } +func (*GetMinStepDurationResponse) ProtoMessage() {} +func (*GetMinStepDurationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0d2c4ccf1453ffdb, []int{25} } - -func (x *streamingSpanWriterPluginWriteSpanStreamServer) SendAndClose(m *WriteSpanResponse) error { - return x.ServerStream.SendMsg(m) +func (m *GetMinStepDurationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (x *streamingSpanWriterPluginWriteSpanStreamServer) Recv() (*WriteSpanRequest, error) { - m := new(WriteSpanRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err +func (m *GetMinStepDurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetMinStepDurationResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return m, nil } - -var _StreamingSpanWriterPlugin_serviceDesc = grpc.ServiceDesc{ - ServiceName: "jaeger.storage.v1.StreamingSpanWriterPlugin", - HandlerType: (*StreamingSpanWriterPluginServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "WriteSpanStream", - Handler: _StreamingSpanWriterPlugin_WriteSpanStream_Handler, - ClientStreams: true, - }, - }, - Metadata: "storage.proto", +func (m *GetMinStepDurationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetMinStepDurationResponse.Merge(m, src) } - -// SpanReaderPluginClient is the client API for SpanReaderPlugin service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SpanReaderPluginClient interface { - // spanstore/Reader - GetTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (SpanReaderPlugin_GetTraceClient, error) - GetServices(ctx context.Context, in *GetServicesRequest, opts ...grpc.CallOption) (*GetServicesResponse, error) - GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*GetOperationsResponse, error) - FindTraces(ctx context.Context, in *FindTracesRequest, opts ...grpc.CallOption) (SpanReaderPlugin_FindTracesClient, error) - FindTraceIDs(ctx context.Context, in *FindTraceIDsRequest, opts ...grpc.CallOption) (*FindTraceIDsResponse, error) +func (m *GetMinStepDurationResponse) XXX_Size() int { + return m.Size() } - -type spanReaderPluginClient struct { - cc *grpc.ClientConn +func (m *GetMinStepDurationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetMinStepDurationResponse.DiscardUnknown(m) } -func NewSpanReaderPluginClient(cc *grpc.ClientConn) SpanReaderPluginClient { - return &spanReaderPluginClient{cc} -} +var xxx_messageInfo_GetMinStepDurationResponse proto.InternalMessageInfo -func (c *spanReaderPluginClient) GetTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (SpanReaderPlugin_GetTraceClient, error) { - stream, err := c.cc.NewStream(ctx, &_SpanReaderPlugin_serviceDesc.Streams[0], "/jaeger.storage.v1.SpanReaderPlugin/GetTrace", opts...) - if err != nil { - return nil, err - } - x := &spanReaderPluginGetTraceClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err +func (m *GetMinStepDurationResponse) GetMinStep() *types.Duration { + if m != nil { + return m.MinStep } - return x, nil + return nil } -type SpanReaderPlugin_GetTraceClient interface { - Recv() (*SpansResponseChunk, error) - grpc.ClientStream +// empty; extensible in the future +type CapabilitiesRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -type spanReaderPluginGetTraceClient struct { - grpc.ClientStream +func (m *CapabilitiesRequest) Reset() { *m = CapabilitiesRequest{} } +func (m *CapabilitiesRequest) String() string { return proto.CompactTextString(m) } +func (*CapabilitiesRequest) ProtoMessage() {} +func (*CapabilitiesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0d2c4ccf1453ffdb, []int{26} } - -func (x *spanReaderPluginGetTraceClient) Recv() (*SpansResponseChunk, error) { - m := new(SpansResponseChunk) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil +func (m *CapabilitiesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func (c *spanReaderPluginClient) GetServices(ctx context.Context, in *GetServicesRequest, opts ...grpc.CallOption) (*GetServicesResponse, error) { - out := new(GetServicesResponse) - err := c.cc.Invoke(ctx, "/jaeger.storage.v1.SpanReaderPlugin/GetServices", in, out, opts...) - if err != nil { - return nil, err +func (m *CapabilitiesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CapabilitiesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil } - -func (c *spanReaderPluginClient) GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*GetOperationsResponse, error) { - out := new(GetOperationsResponse) - err := c.cc.Invoke(ctx, "/jaeger.storage.v1.SpanReaderPlugin/GetOperations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *CapabilitiesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CapabilitiesRequest.Merge(m, src) } - -func (c *spanReaderPluginClient) FindTraces(ctx context.Context, in *FindTracesRequest, opts ...grpc.CallOption) (SpanReaderPlugin_FindTracesClient, error) { - stream, err := c.cc.NewStream(ctx, &_SpanReaderPlugin_serviceDesc.Streams[1], "/jaeger.storage.v1.SpanReaderPlugin/FindTraces", opts...) - if err != nil { - return nil, err - } - x := &spanReaderPluginFindTracesClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil +func (m *CapabilitiesRequest) XXX_Size() int { + return m.Size() } - -type SpanReaderPlugin_FindTracesClient interface { - Recv() (*SpansResponseChunk, error) - grpc.ClientStream +func (m *CapabilitiesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CapabilitiesRequest.DiscardUnknown(m) } -type spanReaderPluginFindTracesClient struct { - grpc.ClientStream -} +var xxx_messageInfo_CapabilitiesRequest proto.InternalMessageInfo -func (x *spanReaderPluginFindTracesClient) Recv() (*SpansResponseChunk, error) { - m := new(SpansResponseChunk) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err +type CapabilitiesResponse struct { + ArchiveSpanReader bool `protobuf:"varint,1,opt,name=archiveSpanReader,proto3" json:"archiveSpanReader,omitempty"` + ArchiveSpanWriter bool `protobuf:"varint,2,opt,name=archiveSpanWriter,proto3" json:"archiveSpanWriter,omitempty"` + StreamingSpanWriter bool `protobuf:"varint,3,opt,name=streamingSpanWriter,proto3" json:"streamingSpanWriter,omitempty"` + MetricsReader bool `protobuf:"varint,4,opt,name=metricsReader,proto3" json:"metricsReader,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CapabilitiesResponse) Reset() { *m = CapabilitiesResponse{} } +func (m *CapabilitiesResponse) String() string { return proto.CompactTextString(m) } +func (*CapabilitiesResponse) ProtoMessage() {} +func (*CapabilitiesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0d2c4ccf1453ffdb, []int{27} +} +func (m *CapabilitiesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CapabilitiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CapabilitiesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return m, nil +} +func (m *CapabilitiesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CapabilitiesResponse.Merge(m, src) +} +func (m *CapabilitiesResponse) XXX_Size() int { + return m.Size() +} +func (m *CapabilitiesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CapabilitiesResponse.DiscardUnknown(m) } -func (c *spanReaderPluginClient) FindTraceIDs(ctx context.Context, in *FindTraceIDsRequest, opts ...grpc.CallOption) (*FindTraceIDsResponse, error) { - out := new(FindTraceIDsResponse) - err := c.cc.Invoke(ctx, "/jaeger.storage.v1.SpanReaderPlugin/FindTraceIDs", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_CapabilitiesResponse proto.InternalMessageInfo + +func (m *CapabilitiesResponse) GetArchiveSpanReader() bool { + if m != nil { + return m.ArchiveSpanReader } - return out, nil + return false } -// SpanReaderPluginServer is the server API for SpanReaderPlugin service. -type SpanReaderPluginServer interface { - // spanstore/Reader - GetTrace(*GetTraceRequest, SpanReaderPlugin_GetTraceServer) error - GetServices(context.Context, *GetServicesRequest) (*GetServicesResponse, error) - GetOperations(context.Context, *GetOperationsRequest) (*GetOperationsResponse, error) - FindTraces(*FindTracesRequest, SpanReaderPlugin_FindTracesServer) error - FindTraceIDs(context.Context, *FindTraceIDsRequest) (*FindTraceIDsResponse, error) +func (m *CapabilitiesResponse) GetArchiveSpanWriter() bool { + if m != nil { + return m.ArchiveSpanWriter + } + return false } -// UnimplementedSpanReaderPluginServer can be embedded to have forward compatible implementations. -type UnimplementedSpanReaderPluginServer struct { +func (m *CapabilitiesResponse) GetStreamingSpanWriter() bool { + if m != nil { + return m.StreamingSpanWriter + } + return false } -func (*UnimplementedSpanReaderPluginServer) GetTrace(req *GetTraceRequest, srv SpanReaderPlugin_GetTraceServer) error { - return status.Errorf(codes.Unimplemented, "method GetTrace not implemented") +func (m *CapabilitiesResponse) GetMetricsReader() bool { + if m != nil { + return m.MetricsReader + } + return false } -func (*UnimplementedSpanReaderPluginServer) GetServices(ctx context.Context, req *GetServicesRequest) (*GetServicesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetServices not implemented") + +func init() { + proto.RegisterType((*GetDependenciesRequest)(nil), "jaeger.storage.v1.GetDependenciesRequest") + proto.RegisterType((*GetDependenciesResponse)(nil), "jaeger.storage.v1.GetDependenciesResponse") + proto.RegisterType((*WriteSpanRequest)(nil), "jaeger.storage.v1.WriteSpanRequest") + proto.RegisterType((*WriteSpanResponse)(nil), "jaeger.storage.v1.WriteSpanResponse") + proto.RegisterType((*CloseWriterRequest)(nil), "jaeger.storage.v1.CloseWriterRequest") + proto.RegisterType((*CloseWriterResponse)(nil), "jaeger.storage.v1.CloseWriterResponse") + proto.RegisterType((*GetTraceRequest)(nil), "jaeger.storage.v1.GetTraceRequest") + proto.RegisterType((*GetServicesRequest)(nil), "jaeger.storage.v1.GetServicesRequest") + proto.RegisterType((*GetServicesResponse)(nil), "jaeger.storage.v1.GetServicesResponse") + proto.RegisterType((*GetOperationsRequest)(nil), "jaeger.storage.v1.GetOperationsRequest") + proto.RegisterType((*Operation)(nil), "jaeger.storage.v1.Operation") + proto.RegisterType((*GetOperationsResponse)(nil), "jaeger.storage.v1.GetOperationsResponse") + proto.RegisterType((*TraceQueryParameters)(nil), "jaeger.storage.v1.TraceQueryParameters") + proto.RegisterMapType((map[string]string)(nil), "jaeger.storage.v1.TraceQueryParameters.TagsEntry") + proto.RegisterType((*FindTracesRequest)(nil), "jaeger.storage.v1.FindTracesRequest") + proto.RegisterType((*SpansResponseChunk)(nil), "jaeger.storage.v1.SpansResponseChunk") + proto.RegisterType((*FindTraceIDsRequest)(nil), "jaeger.storage.v1.FindTraceIDsRequest") + proto.RegisterType((*FindTraceIDsResponse)(nil), "jaeger.storage.v1.FindTraceIDsResponse") + proto.RegisterType((*MetricsBaseQueryParameters)(nil), "jaeger.storage.v1.MetricsBaseQueryParameters") + proto.RegisterType((*GetLatenciesRequest)(nil), "jaeger.storage.v1.GetLatenciesRequest") + proto.RegisterType((*GetLatenciesResponse)(nil), "jaeger.storage.v1.GetLatenciesResponse") + proto.RegisterType((*GetCallRatesRequest)(nil), "jaeger.storage.v1.GetCallRatesRequest") + proto.RegisterType((*GetCallRatesResponse)(nil), "jaeger.storage.v1.GetCallRatesResponse") + proto.RegisterType((*GetErrorRatesRequest)(nil), "jaeger.storage.v1.GetErrorRatesRequest") + proto.RegisterType((*GetErrorRatesResponse)(nil), "jaeger.storage.v1.GetErrorRatesResponse") + proto.RegisterType((*GetMinStepDurationRequest)(nil), "jaeger.storage.v1.GetMinStepDurationRequest") + proto.RegisterType((*GetMinStepDurationResponse)(nil), "jaeger.storage.v1.GetMinStepDurationResponse") + proto.RegisterType((*CapabilitiesRequest)(nil), "jaeger.storage.v1.CapabilitiesRequest") + proto.RegisterType((*CapabilitiesResponse)(nil), "jaeger.storage.v1.CapabilitiesResponse") } -func (*UnimplementedSpanReaderPluginServer) GetOperations(ctx context.Context, req *GetOperationsRequest) (*GetOperationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetOperations not implemented") + +func init() { proto.RegisterFile("storage.proto", fileDescriptor_0d2c4ccf1453ffdb) } + +var fileDescriptor_0d2c4ccf1453ffdb = []byte{ + // 1490 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4b, 0x73, 0xdb, 0x44, + 0x1c, 0x47, 0x89, 0x53, 0xdb, 0xff, 0x38, 0x6d, 0xb2, 0x76, 0xa9, 0xab, 0xd2, 0xa4, 0xa8, 0x8f, + 0x04, 0xa6, 0x71, 0x1a, 0x53, 0x06, 0x06, 0xca, 0x40, 0x9d, 0xa4, 0xa1, 0xd0, 0x40, 0x51, 0x32, + 0xed, 0x0c, 0x85, 0x8a, 0xb5, 0xbd, 0x75, 0x44, 0xac, 0x95, 0x22, 0xad, 0x3d, 0xf1, 0x30, 0xdc, + 0xf8, 0x00, 0x1c, 0x38, 0x70, 0xe2, 0xca, 0x8d, 0x0f, 0xc1, 0xa9, 0xc3, 0x89, 0x33, 0x87, 0x02, + 0xb9, 0xf2, 0x25, 0x18, 0xed, 0xae, 0x64, 0xbd, 0x1c, 0xa7, 0x9d, 0x4c, 0x6f, 0xda, 0xdd, 0xdf, + 0xff, 0xb9, 0xff, 0xd7, 0x0a, 0x66, 0x3c, 0x66, 0xbb, 0xb8, 0x43, 0x6a, 0x8e, 0x6b, 0x33, 0x1b, + 0xcd, 0x7d, 0x8b, 0x49, 0x87, 0xb8, 0xb5, 0x60, 0xb7, 0xbf, 0xaa, 0x56, 0x3a, 0x76, 0xc7, 0xe6, + 0xa7, 0x2b, 0xfe, 0x97, 0x00, 0xaa, 0x0b, 0x1d, 0xdb, 0xee, 0x74, 0xc9, 0x0a, 0x5f, 0x35, 0x7b, + 0x4f, 0x56, 0x98, 0x69, 0x11, 0x8f, 0x61, 0xcb, 0x91, 0x80, 0xf9, 0x24, 0xa0, 0xdd, 0x73, 0x31, + 0x33, 0x6d, 0x2a, 0xcf, 0xa7, 0x2d, 0xbb, 0x4d, 0xba, 0x72, 0x31, 0x67, 0x3b, 0x84, 0x5a, 0x84, + 0xb9, 0x66, 0xcb, 0x13, 0x5b, 0xda, 0x2f, 0x0a, 0xbc, 0xba, 0x49, 0xd8, 0x3a, 0x71, 0x08, 0x6d, + 0x13, 0xda, 0x32, 0x89, 0xa7, 0x93, 0xfd, 0x1e, 0xf1, 0x18, 0x5a, 0x03, 0xf0, 0x18, 0x76, 0x99, + 0xe1, 0xcb, 0xac, 0x2a, 0x97, 0x94, 0xa5, 0xe9, 0xba, 0x5a, 0x13, 0xf2, 0x6a, 0x81, 0xbc, 0xda, + 0x4e, 0xa0, 0x50, 0xa3, 0xf0, 0xf4, 0xd9, 0xc2, 0x2b, 0x3f, 0xfe, 0xbd, 0xa0, 0xe8, 0x45, 0x4e, + 0xe7, 0x9f, 0xa0, 0x0f, 0xa1, 0x40, 0x68, 0x5b, 0xb0, 0x98, 0x78, 0x0e, 0x16, 0x79, 0x42, 0xdb, + 0xfe, 0xbe, 0xd6, 0x84, 0x73, 0x29, 0xfd, 0x3c, 0xc7, 0xa6, 0x1e, 0x41, 0x9b, 0x50, 0x6a, 0x47, + 0xf6, 0xab, 0xca, 0xa5, 0xc9, 0xa5, 0xe9, 0xfa, 0xc5, 0x9a, 0x74, 0x2e, 0x76, 0x4c, 0xa3, 0x5f, + 0xaf, 0x85, 0xa4, 0x83, 0x7b, 0x26, 0xdd, 0x6b, 0xe4, 0x7c, 0x11, 0x7a, 0x8c, 0x50, 0x7b, 0x1f, + 0x66, 0x1f, 0xba, 0x26, 0x23, 0xdb, 0x0e, 0xa6, 0x81, 0xf5, 0x8b, 0x90, 0xf3, 0x1c, 0x4c, 0xa5, + 0xdd, 0xe5, 0x04, 0x53, 0x8e, 0xe4, 0x00, 0xad, 0x0c, 0x73, 0x11, 0x62, 0xa1, 0x9a, 0x56, 0x01, + 0xb4, 0xd6, 0xb5, 0x3d, 0xc2, 0x4f, 0x5c, 0xc9, 0x53, 0x3b, 0x0b, 0xe5, 0xd8, 0xae, 0x04, 0x53, + 0x38, 0xb3, 0x49, 0xd8, 0x8e, 0x8b, 0x5b, 0x24, 0x90, 0xfe, 0x08, 0x0a, 0xcc, 0x5f, 0x1b, 0x66, + 0x9b, 0x6b, 0x50, 0x6a, 0x7c, 0xe4, 0xeb, 0xfd, 0xd7, 0xb3, 0x85, 0xe5, 0x8e, 0xc9, 0x76, 0x7b, + 0xcd, 0x5a, 0xcb, 0xb6, 0x56, 0x84, 0x4e, 0x3e, 0xd0, 0xa4, 0x1d, 0xb9, 0x5a, 0x11, 0x17, 0xce, + 0xb9, 0xdd, 0x5d, 0x3f, 0x7c, 0xb6, 0x90, 0x97, 0x9f, 0x7a, 0x9e, 0x73, 0xbc, 0xdb, 0xf6, 0x95, + 0xdb, 0x24, 0x6c, 0x9b, 0xb8, 0x7d, 0xb3, 0x15, 0x5e, 0xb7, 0xb6, 0x0a, 0xe5, 0xd8, 0xae, 0x74, + 0xb2, 0x0a, 0x05, 0x4f, 0xee, 0x71, 0x07, 0x17, 0xf5, 0x70, 0xad, 0x6d, 0x41, 0x65, 0x93, 0xb0, + 0xcf, 0x1d, 0x22, 0x42, 0x2e, 0x8c, 0x9c, 0x2a, 0xe4, 0x25, 0x86, 0x2b, 0x5f, 0xd4, 0x83, 0x25, + 0xba, 0x00, 0x45, 0xdf, 0x69, 0xc6, 0x9e, 0x49, 0xdb, 0x3c, 0x1e, 0x7c, 0x76, 0x0e, 0xa6, 0x9f, + 0x9a, 0xb4, 0xad, 0xdd, 0x82, 0x62, 0xc8, 0x0b, 0x21, 0xc8, 0x51, 0x6c, 0x05, 0x0c, 0xf8, 0xf7, + 0xd1, 0xd4, 0xdf, 0xc3, 0xd9, 0x84, 0x32, 0xd2, 0x82, 0x6b, 0x70, 0xda, 0x0e, 0x76, 0x3f, 0xc3, + 0x56, 0x68, 0x47, 0x62, 0x17, 0xdd, 0x02, 0x08, 0x77, 0xbc, 0xea, 0x04, 0x0f, 0xa6, 0xd7, 0x6a, + 0xa9, 0x4c, 0xad, 0x85, 0x22, 0xf4, 0x08, 0x5e, 0xfb, 0x35, 0x07, 0x15, 0xee, 0xe9, 0x2f, 0x7a, + 0xc4, 0x1d, 0xdc, 0xc7, 0x2e, 0xb6, 0x08, 0x23, 0xae, 0x87, 0x5e, 0x87, 0x92, 0xb4, 0xde, 0x88, + 0x18, 0x34, 0x2d, 0xf7, 0x7c, 0xd1, 0xe8, 0x6a, 0x44, 0x43, 0x01, 0x12, 0xc6, 0xcd, 0xc4, 0x34, + 0x44, 0x1b, 0x90, 0x63, 0xb8, 0xe3, 0x55, 0x27, 0xb9, 0x6a, 0xab, 0x19, 0xaa, 0x65, 0x29, 0x50, + 0xdb, 0xc1, 0x1d, 0x6f, 0x83, 0x32, 0x77, 0xa0, 0x73, 0x72, 0xf4, 0x09, 0x9c, 0x1e, 0xe6, 0xb5, + 0x61, 0x99, 0xb4, 0x9a, 0x7b, 0x8e, 0xc4, 0x2c, 0x85, 0xb9, 0xbd, 0x65, 0xd2, 0x24, 0x2f, 0x7c, + 0x50, 0x9d, 0x7a, 0x31, 0x5e, 0xf8, 0x00, 0xdd, 0x81, 0x52, 0x50, 0xbc, 0xb8, 0x56, 0xa7, 0x38, + 0xa7, 0xf3, 0x29, 0x4e, 0xeb, 0x12, 0x24, 0x18, 0xfd, 0xec, 0x33, 0x9a, 0x0e, 0x08, 0x7d, 0x9d, + 0x62, 0x7c, 0xf0, 0x41, 0x35, 0xff, 0x22, 0x7c, 0xf0, 0x01, 0xba, 0x08, 0x40, 0x7b, 0x96, 0xc1, + 0xb3, 0xc6, 0xab, 0x16, 0x2e, 0x29, 0x4b, 0x53, 0x7a, 0x91, 0xf6, 0x2c, 0xee, 0x64, 0x4f, 0x7d, + 0x07, 0x8a, 0xa1, 0x67, 0xd1, 0x2c, 0x4c, 0xee, 0x91, 0x81, 0xbc, 0x5b, 0xff, 0x13, 0x55, 0x60, + 0xaa, 0x8f, 0xbb, 0xbd, 0xe0, 0x2a, 0xc5, 0xe2, 0xbd, 0x89, 0x77, 0x15, 0x4d, 0x87, 0xb9, 0x3b, + 0x26, 0x6d, 0x0b, 0x36, 0x41, 0xca, 0x7c, 0x00, 0x53, 0xfb, 0xfe, 0xbd, 0xc9, 0x7a, 0xb3, 0x78, + 0xcc, 0xcb, 0xd5, 0x05, 0x95, 0xb6, 0x01, 0xc8, 0xaf, 0x3f, 0x61, 0xd0, 0xaf, 0xed, 0xf6, 0xe8, + 0x1e, 0x5a, 0x81, 0x29, 0x3f, 0x3d, 0x82, 0xca, 0x98, 0x55, 0xc4, 0x64, 0x3d, 0x14, 0x38, 0x6d, + 0x07, 0xca, 0xa1, 0x6a, 0x77, 0xd7, 0x4f, 0x4a, 0xb9, 0x3e, 0x54, 0xe2, 0x5c, 0x65, 0x62, 0x3e, + 0x86, 0x62, 0x50, 0xe4, 0x84, 0x8a, 0xa5, 0xc6, 0xed, 0x17, 0xad, 0x72, 0x85, 0x90, 0x7b, 0x41, + 0x96, 0x39, 0x4f, 0xfb, 0x77, 0x02, 0xd4, 0x2d, 0xd1, 0xed, 0x1a, 0xd8, 0x4b, 0x25, 0xe6, 0x65, + 0x98, 0x89, 0x26, 0x66, 0x50, 0x16, 0x4a, 0x91, 0xcc, 0xf4, 0xd0, 0x75, 0x40, 0x1d, 0xd7, 0xee, + 0x39, 0x46, 0x73, 0x60, 0x84, 0xd9, 0xc8, 0xef, 0xb4, 0xa0, 0xcf, 0xf2, 0x93, 0xc6, 0x60, 0x58, + 0xb4, 0xde, 0x8e, 0x74, 0xbb, 0xc9, 0x71, 0x89, 0x10, 0xf6, 0x38, 0x9f, 0xac, 0x6b, 0xdb, 0x7b, + 0x4d, 0xdc, 0xda, 0x93, 0xb9, 0x38, 0x3a, 0x5a, 0xf5, 0x10, 0x8a, 0x96, 0x21, 0xe7, 0x31, 0xe2, + 0xc8, 0x94, 0x3b, 0x82, 0x84, 0xc3, 0xd0, 0x4d, 0x28, 0xb8, 0x98, 0x11, 0xc3, 0x21, 0xee, 0xd8, + 0xdc, 0xd2, 0xf3, 0x3e, 0xf4, 0x3e, 0x71, 0xfd, 0x2c, 0x08, 0x6b, 0xae, 0x57, 0xcd, 0x73, 0x17, + 0x15, 0x83, 0xa2, 0xeb, 0x69, 0x3f, 0x29, 0xbc, 0x6d, 0xdc, 0xc3, 0x2c, 0x3e, 0x3c, 0x60, 0x38, + 0xdb, 0xc4, 0x1e, 0x31, 0x78, 0x04, 0x18, 0x4e, 0xe8, 0x75, 0x19, 0x42, 0xcb, 0x19, 0x21, 0x34, + 0xfa, 0xaa, 0xf4, 0x72, 0x33, 0xe3, 0xfe, 0x54, 0x28, 0xec, 0xf7, 0x30, 0x65, 0x66, 0x57, 0x24, + 0xd9, 0x84, 0x1e, 0xae, 0xb5, 0x6f, 0x78, 0x67, 0x8a, 0x68, 0x25, 0x43, 0xee, 0x63, 0x98, 0x11, + 0xf3, 0x8f, 0xf1, 0x04, 0x5b, 0x66, 0x37, 0x88, 0xe8, 0xcb, 0x89, 0xcc, 0x08, 0x66, 0x24, 0xa1, + 0xd2, 0x1d, 0x0e, 0xd5, 0x4b, 0x56, 0x64, 0xa5, 0x1d, 0x70, 0xbb, 0xd7, 0x70, 0xb7, 0xab, 0x63, + 0xf6, 0x32, 0xed, 0x96, 0xb6, 0x45, 0x24, 0x9f, 0xb8, 0x6d, 0x03, 0x2e, 0x61, 0xc3, 0x75, 0x6d, + 0xf7, 0x65, 0x1b, 0x87, 0x79, 0x17, 0x8f, 0x8a, 0x3e, 0x71, 0xeb, 0x2e, 0xc0, 0xf9, 0x4d, 0xc2, + 0xb6, 0x4c, 0xba, 0xcd, 0x88, 0x13, 0x06, 0xbc, 0x9c, 0x82, 0x74, 0x50, 0xb3, 0x0e, 0xa5, 0x12, + 0x37, 0xa1, 0x60, 0x99, 0xd4, 0xe0, 0x59, 0xa7, 0x8c, 0x4d, 0x21, 0x4b, 0x70, 0xe1, 0x63, 0x1f, + 0x76, 0x70, 0xd3, 0xec, 0x9a, 0x6c, 0x98, 0x22, 0xda, 0x1f, 0x0a, 0x54, 0xe2, 0xfb, 0x52, 0xca, + 0x75, 0x98, 0xc3, 0x6e, 0x6b, 0xd7, 0xec, 0xcb, 0x99, 0x12, 0xb7, 0x89, 0xcb, 0xc5, 0x15, 0xf4, + 0xf4, 0x41, 0x02, 0x2d, 0x46, 0x4b, 0x59, 0xa0, 0xd2, 0x07, 0xe8, 0x06, 0x94, 0x3d, 0xe6, 0x12, + 0x6c, 0x99, 0xb4, 0x13, 0xc1, 0x4f, 0x72, 0x7c, 0xd6, 0x11, 0xba, 0x12, 0x38, 0xde, 0x93, 0x9a, + 0xe4, 0x38, 0x36, 0xbe, 0x59, 0xff, 0x5d, 0x81, 0xd9, 0x21, 0xd1, 0xfd, 0x6e, 0xaf, 0x63, 0x52, + 0xf4, 0x00, 0x8a, 0xe1, 0x68, 0x8c, 0x2e, 0x67, 0x44, 0x47, 0x72, 0xea, 0x56, 0xaf, 0x1c, 0x0d, + 0x92, 0x0e, 0x7a, 0x00, 0x53, 0x7c, 0x8e, 0x46, 0x57, 0x33, 0xe0, 0xe9, 0xb9, 0x5b, 0xbd, 0x36, + 0x0e, 0x26, 0xf8, 0xd6, 0xbf, 0x83, 0xf3, 0xdb, 0x69, 0x0f, 0x48, 0x63, 0x1e, 0xc3, 0x99, 0x50, + 0x13, 0x81, 0x3a, 0x41, 0x93, 0x96, 0x94, 0xfa, 0x7f, 0x93, 0xc2, 0x83, 0xc2, 0xa1, 0x52, 0xe8, + 0x43, 0x28, 0x04, 0x4f, 0x03, 0xa4, 0x65, 0x30, 0x4a, 0xbc, 0x1b, 0xd4, 0x2c, 0x87, 0xa4, 0x07, + 0x83, 0x1b, 0x0a, 0xfa, 0x0a, 0xa6, 0x23, 0xd3, 0x7e, 0xa6, 0x23, 0xd3, 0x6f, 0x84, 0x4c, 0x47, + 0x66, 0x3d, 0x1a, 0x9a, 0x30, 0x13, 0x9b, 0xc5, 0xd1, 0x62, 0x36, 0x61, 0xea, 0xe9, 0xa0, 0x2e, + 0x8d, 0x07, 0x4a, 0x19, 0x8f, 0x00, 0x86, 0x63, 0x14, 0xca, 0xf2, 0x72, 0x6a, 0xca, 0x3a, 0xbe, + 0x7b, 0x0c, 0x28, 0x45, 0x47, 0x16, 0x74, 0xed, 0x28, 0xf6, 0xc3, 0x49, 0x49, 0x5d, 0x1c, 0x8b, + 0x93, 0xa1, 0x76, 0x00, 0xe7, 0x6e, 0x27, 0x93, 0x53, 0xde, 0xf9, 0xd7, 0xf2, 0x35, 0x1a, 0x39, + 0x3f, 0xc1, 0x48, 0xab, 0x0f, 0x62, 0x92, 0x63, 0xd1, 0xf6, 0x98, 0x3f, 0x44, 0xe5, 0xe9, 0xc9, + 0x07, 0x5d, 0xfd, 0x07, 0x05, 0xaa, 0xf1, 0x97, 0x7c, 0x44, 0xf8, 0x2e, 0x17, 0x1e, 0x3d, 0x46, + 0x6f, 0x64, 0x0b, 0xcf, 0xf8, 0x59, 0xa1, 0xbe, 0x79, 0x1c, 0xa8, 0xf4, 0xc0, 0x6f, 0x93, 0x50, + 0xde, 0x8a, 0x56, 0x2f, 0xa9, 0x81, 0x01, 0xa5, 0xe8, 0xd0, 0x80, 0x46, 0x44, 0x7b, 0x72, 0xd6, + 0x51, 0x17, 0xc7, 0xe2, 0x64, 0xc8, 0x0a, 0x01, 0x61, 0xe7, 0x1e, 0x25, 0x20, 0x39, 0x54, 0x8c, + 0x12, 0x90, 0x1e, 0x01, 0x44, 0xde, 0x0d, 0xbb, 0xe7, 0xa8, 0xbc, 0x4b, 0xb5, 0xf6, 0x51, 0x79, + 0x97, 0xd1, 0x88, 0xf7, 0xf9, 0xdf, 0x83, 0x44, 0x87, 0x44, 0xd7, 0xb3, 0xe9, 0xb3, 0xbb, 0xac, + 0xba, 0x7c, 0x4c, 0xb4, 0xbc, 0xb0, 0x1e, 0x20, 0x71, 0x45, 0xd1, 0x76, 0xe9, 0x7b, 0x33, 0xb6, + 0xce, 0xac, 0xf2, 0xe9, 0xbe, 0x9b, 0xe9, 0xcd, 0xac, 0x3e, 0xdc, 0xa8, 0x3e, 0x3d, 0x9c, 0x57, + 0xfe, 0x3c, 0x9c, 0x57, 0xfe, 0x39, 0x9c, 0x57, 0xbe, 0x04, 0x09, 0x37, 0xfa, 0xab, 0xcd, 0x53, + 0xbc, 0xdb, 0xbf, 0xf5, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x22, 0x38, 0x88, 0x3b, 0xd7, 0x13, + 0x00, 0x00, } -func (*UnimplementedSpanReaderPluginServer) FindTraces(req *FindTracesRequest, srv SpanReaderPlugin_FindTracesServer) error { - return status.Errorf(codes.Unimplemented, "method FindTraces not implemented") + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// SpanWriterPluginClient is the client API for SpanWriterPlugin service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type SpanWriterPluginClient interface { + // spanstore/Writer + WriteSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) + Close(ctx context.Context, in *CloseWriterRequest, opts ...grpc.CallOption) (*CloseWriterResponse, error) } -func (*UnimplementedSpanReaderPluginServer) FindTraceIDs(ctx context.Context, req *FindTraceIDsRequest) (*FindTraceIDsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FindTraceIDs not implemented") + +type spanWriterPluginClient struct { + cc *grpc.ClientConn } -func RegisterSpanReaderPluginServer(s *grpc.Server, srv SpanReaderPluginServer) { - s.RegisterService(&_SpanReaderPlugin_serviceDesc, srv) +func NewSpanWriterPluginClient(cc *grpc.ClientConn) SpanWriterPluginClient { + return &spanWriterPluginClient{cc} } -func _SpanReaderPlugin_GetTrace_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(GetTraceRequest) - if err := stream.RecvMsg(m); err != nil { - return err +func (c *spanWriterPluginClient) WriteSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) { + out := new(WriteSpanResponse) + err := c.cc.Invoke(ctx, "/jaeger.storage.v1.SpanWriterPlugin/WriteSpan", in, out, opts...) + if err != nil { + return nil, err } - return srv.(SpanReaderPluginServer).GetTrace(m, &spanReaderPluginGetTraceServer{stream}) + return out, nil } -type SpanReaderPlugin_GetTraceServer interface { - Send(*SpansResponseChunk) error - grpc.ServerStream +func (c *spanWriterPluginClient) Close(ctx context.Context, in *CloseWriterRequest, opts ...grpc.CallOption) (*CloseWriterResponse, error) { + out := new(CloseWriterResponse) + err := c.cc.Invoke(ctx, "/jaeger.storage.v1.SpanWriterPlugin/Close", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -type spanReaderPluginGetTraceServer struct { - grpc.ServerStream +// SpanWriterPluginServer is the server API for SpanWriterPlugin service. +type SpanWriterPluginServer interface { + // spanstore/Writer + WriteSpan(context.Context, *WriteSpanRequest) (*WriteSpanResponse, error) + Close(context.Context, *CloseWriterRequest) (*CloseWriterResponse, error) } -func (x *spanReaderPluginGetTraceServer) Send(m *SpansResponseChunk) error { - return x.ServerStream.SendMsg(m) +// UnimplementedSpanWriterPluginServer can be embedded to have forward compatible implementations. +type UnimplementedSpanWriterPluginServer struct { } -func _SpanReaderPlugin_GetServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetServicesRequest) +func (*UnimplementedSpanWriterPluginServer) WriteSpan(ctx context.Context, req *WriteSpanRequest) (*WriteSpanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WriteSpan not implemented") +} +func (*UnimplementedSpanWriterPluginServer) Close(ctx context.Context, req *CloseWriterRequest) (*CloseWriterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Close not implemented") +} + +func RegisterSpanWriterPluginServer(s *grpc.Server, srv SpanWriterPluginServer) { + s.RegisterService(&_SpanWriterPlugin_serviceDesc, srv) +} + +func _SpanWriterPlugin_WriteSpan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WriteSpanRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SpanReaderPluginServer).GetServices(ctx, in) + return srv.(SpanWriterPluginServer).WriteSpan(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/jaeger.storage.v1.SpanReaderPlugin/GetServices", + FullMethod: "/jaeger.storage.v1.SpanWriterPlugin/WriteSpan", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SpanReaderPluginServer).GetServices(ctx, req.(*GetServicesRequest)) + return srv.(SpanWriterPluginServer).WriteSpan(ctx, req.(*WriteSpanRequest)) } return interceptor(ctx, in, info, handler) } -func _SpanReaderPlugin_GetOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetOperationsRequest) +func _SpanWriterPlugin_Close_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CloseWriterRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SpanReaderPluginServer).GetOperations(ctx, in) + return srv.(SpanWriterPluginServer).Close(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/jaeger.storage.v1.SpanReaderPlugin/GetOperations", + FullMethod: "/jaeger.storage.v1.SpanWriterPlugin/Close", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SpanReaderPluginServer).GetOperations(ctx, req.(*GetOperationsRequest)) + return srv.(SpanWriterPluginServer).Close(ctx, req.(*CloseWriterRequest)) } return interceptor(ctx, in, info, handler) } -func _SpanReaderPlugin_FindTraces_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(FindTracesRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(SpanReaderPluginServer).FindTraces(m, &spanReaderPluginFindTracesServer{stream}) +var _SpanWriterPlugin_serviceDesc = grpc.ServiceDesc{ + ServiceName: "jaeger.storage.v1.SpanWriterPlugin", + HandlerType: (*SpanWriterPluginServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "WriteSpan", + Handler: _SpanWriterPlugin_WriteSpan_Handler, + }, + { + MethodName: "Close", + Handler: _SpanWriterPlugin_Close_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "storage.proto", } -type SpanReaderPlugin_FindTracesServer interface { - Send(*SpansResponseChunk) error - grpc.ServerStream +// StreamingSpanWriterPluginClient is the client API for StreamingSpanWriterPlugin service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type StreamingSpanWriterPluginClient interface { + WriteSpanStream(ctx context.Context, opts ...grpc.CallOption) (StreamingSpanWriterPlugin_WriteSpanStreamClient, error) } -type spanReaderPluginFindTracesServer struct { - grpc.ServerStream +type streamingSpanWriterPluginClient struct { + cc *grpc.ClientConn } -func (x *spanReaderPluginFindTracesServer) Send(m *SpansResponseChunk) error { - return x.ServerStream.SendMsg(m) +func NewStreamingSpanWriterPluginClient(cc *grpc.ClientConn) StreamingSpanWriterPluginClient { + return &streamingSpanWriterPluginClient{cc} } -func _SpanReaderPlugin_FindTraceIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FindTraceIDsRequest) - if err := dec(in); err != nil { +func (c *streamingSpanWriterPluginClient) WriteSpanStream(ctx context.Context, opts ...grpc.CallOption) (StreamingSpanWriterPlugin_WriteSpanStreamClient, error) { + stream, err := c.cc.NewStream(ctx, &_StreamingSpanWriterPlugin_serviceDesc.Streams[0], "/jaeger.storage.v1.StreamingSpanWriterPlugin/WriteSpanStream", opts...) + if err != nil { return nil, err } - if interceptor == nil { - return srv.(SpanReaderPluginServer).FindTraceIDs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jaeger.storage.v1.SpanReaderPlugin/FindTraceIDs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SpanReaderPluginServer).FindTraceIDs(ctx, req.(*FindTraceIDsRequest)) - } - return interceptor(ctx, in, info, handler) + x := &streamingSpanWriterPluginWriteSpanStreamClient{stream} + return x, nil } -var _SpanReaderPlugin_serviceDesc = grpc.ServiceDesc{ - ServiceName: "jaeger.storage.v1.SpanReaderPlugin", - HandlerType: (*SpanReaderPluginServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetServices", - Handler: _SpanReaderPlugin_GetServices_Handler, - }, - { - MethodName: "GetOperations", - Handler: _SpanReaderPlugin_GetOperations_Handler, - }, - { - MethodName: "FindTraceIDs", - Handler: _SpanReaderPlugin_FindTraceIDs_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "GetTrace", - Handler: _SpanReaderPlugin_GetTrace_Handler, - ServerStreams: true, - }, - { - StreamName: "FindTraces", - Handler: _SpanReaderPlugin_FindTraces_Handler, - ServerStreams: true, - }, - }, - Metadata: "storage.proto", -} - -// ArchiveSpanWriterPluginClient is the client API for ArchiveSpanWriterPlugin service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ArchiveSpanWriterPluginClient interface { - // spanstore/Writer - WriteArchiveSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) +type StreamingSpanWriterPlugin_WriteSpanStreamClient interface { + Send(*WriteSpanRequest) error + CloseAndRecv() (*WriteSpanResponse, error) + grpc.ClientStream } -type archiveSpanWriterPluginClient struct { - cc *grpc.ClientConn +type streamingSpanWriterPluginWriteSpanStreamClient struct { + grpc.ClientStream } -func NewArchiveSpanWriterPluginClient(cc *grpc.ClientConn) ArchiveSpanWriterPluginClient { - return &archiveSpanWriterPluginClient{cc} +func (x *streamingSpanWriterPluginWriteSpanStreamClient) Send(m *WriteSpanRequest) error { + return x.ClientStream.SendMsg(m) } -func (c *archiveSpanWriterPluginClient) WriteArchiveSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) { - out := new(WriteSpanResponse) - err := c.cc.Invoke(ctx, "/jaeger.storage.v1.ArchiveSpanWriterPlugin/WriteArchiveSpan", in, out, opts...) - if err != nil { +func (x *streamingSpanWriterPluginWriteSpanStreamClient) CloseAndRecv() (*WriteSpanResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { return nil, err } - return out, nil + m := new(WriteSpanResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil } -// ArchiveSpanWriterPluginServer is the server API for ArchiveSpanWriterPlugin service. -type ArchiveSpanWriterPluginServer interface { - // spanstore/Writer - WriteArchiveSpan(context.Context, *WriteSpanRequest) (*WriteSpanResponse, error) +// StreamingSpanWriterPluginServer is the server API for StreamingSpanWriterPlugin service. +type StreamingSpanWriterPluginServer interface { + WriteSpanStream(StreamingSpanWriterPlugin_WriteSpanStreamServer) error } -// UnimplementedArchiveSpanWriterPluginServer can be embedded to have forward compatible implementations. -type UnimplementedArchiveSpanWriterPluginServer struct { +// UnimplementedStreamingSpanWriterPluginServer can be embedded to have forward compatible implementations. +type UnimplementedStreamingSpanWriterPluginServer struct { } -func (*UnimplementedArchiveSpanWriterPluginServer) WriteArchiveSpan(ctx context.Context, req *WriteSpanRequest) (*WriteSpanResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WriteArchiveSpan not implemented") +func (*UnimplementedStreamingSpanWriterPluginServer) WriteSpanStream(srv StreamingSpanWriterPlugin_WriteSpanStreamServer) error { + return status.Errorf(codes.Unimplemented, "method WriteSpanStream not implemented") } -func RegisterArchiveSpanWriterPluginServer(s *grpc.Server, srv ArchiveSpanWriterPluginServer) { - s.RegisterService(&_ArchiveSpanWriterPlugin_serviceDesc, srv) +func RegisterStreamingSpanWriterPluginServer(s *grpc.Server, srv StreamingSpanWriterPluginServer) { + s.RegisterService(&_StreamingSpanWriterPlugin_serviceDesc, srv) } -func _ArchiveSpanWriterPlugin_WriteArchiveSpan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WriteSpanRequest) - if err := dec(in); err != nil { +func _StreamingSpanWriterPlugin_WriteSpanStream_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(StreamingSpanWriterPluginServer).WriteSpanStream(&streamingSpanWriterPluginWriteSpanStreamServer{stream}) +} + +type StreamingSpanWriterPlugin_WriteSpanStreamServer interface { + SendAndClose(*WriteSpanResponse) error + Recv() (*WriteSpanRequest, error) + grpc.ServerStream +} + +type streamingSpanWriterPluginWriteSpanStreamServer struct { + grpc.ServerStream +} + +func (x *streamingSpanWriterPluginWriteSpanStreamServer) SendAndClose(m *WriteSpanResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *streamingSpanWriterPluginWriteSpanStreamServer) Recv() (*WriteSpanRequest, error) { + m := new(WriteSpanRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } - if interceptor == nil { - return srv.(ArchiveSpanWriterPluginServer).WriteArchiveSpan(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/jaeger.storage.v1.ArchiveSpanWriterPlugin/WriteArchiveSpan", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ArchiveSpanWriterPluginServer).WriteArchiveSpan(ctx, req.(*WriteSpanRequest)) - } - return interceptor(ctx, in, info, handler) + return m, nil } -var _ArchiveSpanWriterPlugin_serviceDesc = grpc.ServiceDesc{ - ServiceName: "jaeger.storage.v1.ArchiveSpanWriterPlugin", - HandlerType: (*ArchiveSpanWriterPluginServer)(nil), - Methods: []grpc.MethodDesc{ +var _StreamingSpanWriterPlugin_serviceDesc = grpc.ServiceDesc{ + ServiceName: "jaeger.storage.v1.StreamingSpanWriterPlugin", + HandlerType: (*StreamingSpanWriterPluginServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ { - MethodName: "WriteArchiveSpan", - Handler: _ArchiveSpanWriterPlugin_WriteArchiveSpan_Handler, + StreamName: "WriteSpanStream", + Handler: _StreamingSpanWriterPlugin_WriteSpanStream_Handler, + ClientStreams: true, }, }, - Streams: []grpc.StreamDesc{}, Metadata: "storage.proto", } -// ArchiveSpanReaderPluginClient is the client API for ArchiveSpanReaderPlugin service. +// SpanReaderPluginClient is the client API for SpanReaderPlugin service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ArchiveSpanReaderPluginClient interface { +type SpanReaderPluginClient interface { // spanstore/Reader - GetArchiveTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (ArchiveSpanReaderPlugin_GetArchiveTraceClient, error) + GetTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (SpanReaderPlugin_GetTraceClient, error) + GetServices(ctx context.Context, in *GetServicesRequest, opts ...grpc.CallOption) (*GetServicesResponse, error) + GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*GetOperationsResponse, error) + FindTraces(ctx context.Context, in *FindTracesRequest, opts ...grpc.CallOption) (SpanReaderPlugin_FindTracesClient, error) + FindTraceIDs(ctx context.Context, in *FindTraceIDsRequest, opts ...grpc.CallOption) (*FindTraceIDsResponse, error) } -type archiveSpanReaderPluginClient struct { +type spanReaderPluginClient struct { cc *grpc.ClientConn } -func NewArchiveSpanReaderPluginClient(cc *grpc.ClientConn) ArchiveSpanReaderPluginClient { - return &archiveSpanReaderPluginClient{cc} +func NewSpanReaderPluginClient(cc *grpc.ClientConn) SpanReaderPluginClient { + return &spanReaderPluginClient{cc} } -func (c *archiveSpanReaderPluginClient) GetArchiveTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (ArchiveSpanReaderPlugin_GetArchiveTraceClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArchiveSpanReaderPlugin_serviceDesc.Streams[0], "/jaeger.storage.v1.ArchiveSpanReaderPlugin/GetArchiveTrace", opts...) +func (c *spanReaderPluginClient) GetTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (SpanReaderPlugin_GetTraceClient, error) { + stream, err := c.cc.NewStream(ctx, &_SpanReaderPlugin_serviceDesc.Streams[0], "/jaeger.storage.v1.SpanReaderPlugin/GetTrace", opts...) if err != nil { return nil, err } - x := &archiveSpanReaderPluginGetArchiveTraceClient{stream} + x := &spanReaderPluginGetTraceClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -1681,16 +1852,16 @@ func (c *archiveSpanReaderPluginClient) GetArchiveTrace(ctx context.Context, in return x, nil } -type ArchiveSpanReaderPlugin_GetArchiveTraceClient interface { +type SpanReaderPlugin_GetTraceClient interface { Recv() (*SpansResponseChunk, error) grpc.ClientStream } -type archiveSpanReaderPluginGetArchiveTraceClient struct { +type spanReaderPluginGetTraceClient struct { grpc.ClientStream } -func (x *archiveSpanReaderPluginGetArchiveTraceClient) Recv() (*SpansResponseChunk, error) { +func (x *spanReaderPluginGetTraceClient) Recv() (*SpansResponseChunk, error) { m := new(SpansResponseChunk) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err @@ -1698,739 +1869,731 @@ func (x *archiveSpanReaderPluginGetArchiveTraceClient) Recv() (*SpansResponseChu return m, nil } -// ArchiveSpanReaderPluginServer is the server API for ArchiveSpanReaderPlugin service. -type ArchiveSpanReaderPluginServer interface { - // spanstore/Reader - GetArchiveTrace(*GetTraceRequest, ArchiveSpanReaderPlugin_GetArchiveTraceServer) error +func (c *spanReaderPluginClient) GetServices(ctx context.Context, in *GetServicesRequest, opts ...grpc.CallOption) (*GetServicesResponse, error) { + out := new(GetServicesResponse) + err := c.cc.Invoke(ctx, "/jaeger.storage.v1.SpanReaderPlugin/GetServices", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -// UnimplementedArchiveSpanReaderPluginServer can be embedded to have forward compatible implementations. -type UnimplementedArchiveSpanReaderPluginServer struct { +func (c *spanReaderPluginClient) GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*GetOperationsResponse, error) { + out := new(GetOperationsResponse) + err := c.cc.Invoke(ctx, "/jaeger.storage.v1.SpanReaderPlugin/GetOperations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (*UnimplementedArchiveSpanReaderPluginServer) GetArchiveTrace(req *GetTraceRequest, srv ArchiveSpanReaderPlugin_GetArchiveTraceServer) error { - return status.Errorf(codes.Unimplemented, "method GetArchiveTrace not implemented") +func (c *spanReaderPluginClient) FindTraces(ctx context.Context, in *FindTracesRequest, opts ...grpc.CallOption) (SpanReaderPlugin_FindTracesClient, error) { + stream, err := c.cc.NewStream(ctx, &_SpanReaderPlugin_serviceDesc.Streams[1], "/jaeger.storage.v1.SpanReaderPlugin/FindTraces", opts...) + if err != nil { + return nil, err + } + x := &spanReaderPluginFindTracesClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil } -func RegisterArchiveSpanReaderPluginServer(s *grpc.Server, srv ArchiveSpanReaderPluginServer) { - s.RegisterService(&_ArchiveSpanReaderPlugin_serviceDesc, srv) +type SpanReaderPlugin_FindTracesClient interface { + Recv() (*SpansResponseChunk, error) + grpc.ClientStream } -func _ArchiveSpanReaderPlugin_GetArchiveTrace_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(GetTraceRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ArchiveSpanReaderPluginServer).GetArchiveTrace(m, &archiveSpanReaderPluginGetArchiveTraceServer{stream}) +type spanReaderPluginFindTracesClient struct { + grpc.ClientStream } -type ArchiveSpanReaderPlugin_GetArchiveTraceServer interface { - Send(*SpansResponseChunk) error - grpc.ServerStream +func (x *spanReaderPluginFindTracesClient) Recv() (*SpansResponseChunk, error) { + m := new(SpansResponseChunk) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil } -type archiveSpanReaderPluginGetArchiveTraceServer struct { - grpc.ServerStream +func (c *spanReaderPluginClient) FindTraceIDs(ctx context.Context, in *FindTraceIDsRequest, opts ...grpc.CallOption) (*FindTraceIDsResponse, error) { + out := new(FindTraceIDsResponse) + err := c.cc.Invoke(ctx, "/jaeger.storage.v1.SpanReaderPlugin/FindTraceIDs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (x *archiveSpanReaderPluginGetArchiveTraceServer) Send(m *SpansResponseChunk) error { - return x.ServerStream.SendMsg(m) +// SpanReaderPluginServer is the server API for SpanReaderPlugin service. +type SpanReaderPluginServer interface { + // spanstore/Reader + GetTrace(*GetTraceRequest, SpanReaderPlugin_GetTraceServer) error + GetServices(context.Context, *GetServicesRequest) (*GetServicesResponse, error) + GetOperations(context.Context, *GetOperationsRequest) (*GetOperationsResponse, error) + FindTraces(*FindTracesRequest, SpanReaderPlugin_FindTracesServer) error + FindTraceIDs(context.Context, *FindTraceIDsRequest) (*FindTraceIDsResponse, error) } -var _ArchiveSpanReaderPlugin_serviceDesc = grpc.ServiceDesc{ - ServiceName: "jaeger.storage.v1.ArchiveSpanReaderPlugin", - HandlerType: (*ArchiveSpanReaderPluginServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "GetArchiveTrace", - Handler: _ArchiveSpanReaderPlugin_GetArchiveTrace_Handler, - ServerStreams: true, - }, - }, - Metadata: "storage.proto", +// UnimplementedSpanReaderPluginServer can be embedded to have forward compatible implementations. +type UnimplementedSpanReaderPluginServer struct { } -// DependenciesReaderPluginClient is the client API for DependenciesReaderPlugin service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type DependenciesReaderPluginClient interface { - // dependencystore/Reader - GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) -} +func (*UnimplementedSpanReaderPluginServer) GetTrace(req *GetTraceRequest, srv SpanReaderPlugin_GetTraceServer) error { + return status.Errorf(codes.Unimplemented, "method GetTrace not implemented") +} +func (*UnimplementedSpanReaderPluginServer) GetServices(ctx context.Context, req *GetServicesRequest) (*GetServicesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetServices not implemented") +} +func (*UnimplementedSpanReaderPluginServer) GetOperations(ctx context.Context, req *GetOperationsRequest) (*GetOperationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOperations not implemented") +} +func (*UnimplementedSpanReaderPluginServer) FindTraces(req *FindTracesRequest, srv SpanReaderPlugin_FindTracesServer) error { + return status.Errorf(codes.Unimplemented, "method FindTraces not implemented") +} +func (*UnimplementedSpanReaderPluginServer) FindTraceIDs(ctx context.Context, req *FindTraceIDsRequest) (*FindTraceIDsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindTraceIDs not implemented") +} -type dependenciesReaderPluginClient struct { - cc *grpc.ClientConn +func RegisterSpanReaderPluginServer(s *grpc.Server, srv SpanReaderPluginServer) { + s.RegisterService(&_SpanReaderPlugin_serviceDesc, srv) } -func NewDependenciesReaderPluginClient(cc *grpc.ClientConn) DependenciesReaderPluginClient { - return &dependenciesReaderPluginClient{cc} +func _SpanReaderPlugin_GetTrace_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(GetTraceRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(SpanReaderPluginServer).GetTrace(m, &spanReaderPluginGetTraceServer{stream}) } -func (c *dependenciesReaderPluginClient) GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) { - out := new(GetDependenciesResponse) - err := c.cc.Invoke(ctx, "/jaeger.storage.v1.DependenciesReaderPlugin/GetDependencies", in, out, opts...) - if err != nil { +type SpanReaderPlugin_GetTraceServer interface { + Send(*SpansResponseChunk) error + grpc.ServerStream +} + +type spanReaderPluginGetTraceServer struct { + grpc.ServerStream +} + +func (x *spanReaderPluginGetTraceServer) Send(m *SpansResponseChunk) error { + return x.ServerStream.SendMsg(m) +} + +func _SpanReaderPlugin_GetServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetServicesRequest) + if err := dec(in); err != nil { return nil, err } - return out, nil + if interceptor == nil { + return srv.(SpanReaderPluginServer).GetServices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.storage.v1.SpanReaderPlugin/GetServices", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SpanReaderPluginServer).GetServices(ctx, req.(*GetServicesRequest)) + } + return interceptor(ctx, in, info, handler) } -// DependenciesReaderPluginServer is the server API for DependenciesReaderPlugin service. -type DependenciesReaderPluginServer interface { - // dependencystore/Reader - GetDependencies(context.Context, *GetDependenciesRequest) (*GetDependenciesResponse, error) +func _SpanReaderPlugin_GetOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOperationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SpanReaderPluginServer).GetOperations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.storage.v1.SpanReaderPlugin/GetOperations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SpanReaderPluginServer).GetOperations(ctx, req.(*GetOperationsRequest)) + } + return interceptor(ctx, in, info, handler) } -// UnimplementedDependenciesReaderPluginServer can be embedded to have forward compatible implementations. -type UnimplementedDependenciesReaderPluginServer struct { +func _SpanReaderPlugin_FindTraces_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(FindTracesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(SpanReaderPluginServer).FindTraces(m, &spanReaderPluginFindTracesServer{stream}) } -func (*UnimplementedDependenciesReaderPluginServer) GetDependencies(ctx context.Context, req *GetDependenciesRequest) (*GetDependenciesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDependencies not implemented") +type SpanReaderPlugin_FindTracesServer interface { + Send(*SpansResponseChunk) error + grpc.ServerStream } -func RegisterDependenciesReaderPluginServer(s *grpc.Server, srv DependenciesReaderPluginServer) { - s.RegisterService(&_DependenciesReaderPlugin_serviceDesc, srv) +type spanReaderPluginFindTracesServer struct { + grpc.ServerStream } -func _DependenciesReaderPlugin_GetDependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDependenciesRequest) +func (x *spanReaderPluginFindTracesServer) Send(m *SpansResponseChunk) error { + return x.ServerStream.SendMsg(m) +} + +func _SpanReaderPlugin_FindTraceIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindTraceIDsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DependenciesReaderPluginServer).GetDependencies(ctx, in) + return srv.(SpanReaderPluginServer).FindTraceIDs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/jaeger.storage.v1.DependenciesReaderPlugin/GetDependencies", + FullMethod: "/jaeger.storage.v1.SpanReaderPlugin/FindTraceIDs", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DependenciesReaderPluginServer).GetDependencies(ctx, req.(*GetDependenciesRequest)) + return srv.(SpanReaderPluginServer).FindTraceIDs(ctx, req.(*FindTraceIDsRequest)) } return interceptor(ctx, in, info, handler) } -var _DependenciesReaderPlugin_serviceDesc = grpc.ServiceDesc{ - ServiceName: "jaeger.storage.v1.DependenciesReaderPlugin", - HandlerType: (*DependenciesReaderPluginServer)(nil), +var _SpanReaderPlugin_serviceDesc = grpc.ServiceDesc{ + ServiceName: "jaeger.storage.v1.SpanReaderPlugin", + HandlerType: (*SpanReaderPluginServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "GetDependencies", - Handler: _DependenciesReaderPlugin_GetDependencies_Handler, + MethodName: "GetServices", + Handler: _SpanReaderPlugin_GetServices_Handler, + }, + { + MethodName: "GetOperations", + Handler: _SpanReaderPlugin_GetOperations_Handler, + }, + { + MethodName: "FindTraceIDs", + Handler: _SpanReaderPlugin_FindTraceIDs_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "GetTrace", + Handler: _SpanReaderPlugin_GetTrace_Handler, + ServerStreams: true, + }, + { + StreamName: "FindTraces", + Handler: _SpanReaderPlugin_FindTraces_Handler, + ServerStreams: true, }, }, - Streams: []grpc.StreamDesc{}, Metadata: "storage.proto", } -// PluginCapabilitiesClient is the client API for PluginCapabilities service. +// ArchiveSpanWriterPluginClient is the client API for ArchiveSpanWriterPlugin service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type PluginCapabilitiesClient interface { - Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) +type ArchiveSpanWriterPluginClient interface { + // spanstore/Writer + WriteArchiveSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) } -type pluginCapabilitiesClient struct { +type archiveSpanWriterPluginClient struct { cc *grpc.ClientConn } -func NewPluginCapabilitiesClient(cc *grpc.ClientConn) PluginCapabilitiesClient { - return &pluginCapabilitiesClient{cc} +func NewArchiveSpanWriterPluginClient(cc *grpc.ClientConn) ArchiveSpanWriterPluginClient { + return &archiveSpanWriterPluginClient{cc} } -func (c *pluginCapabilitiesClient) Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) { - out := new(CapabilitiesResponse) - err := c.cc.Invoke(ctx, "/jaeger.storage.v1.PluginCapabilities/Capabilities", in, out, opts...) +func (c *archiveSpanWriterPluginClient) WriteArchiveSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) { + out := new(WriteSpanResponse) + err := c.cc.Invoke(ctx, "/jaeger.storage.v1.ArchiveSpanWriterPlugin/WriteArchiveSpan", in, out, opts...) if err != nil { return nil, err } return out, nil } -// PluginCapabilitiesServer is the server API for PluginCapabilities service. -type PluginCapabilitiesServer interface { - Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesResponse, error) +// ArchiveSpanWriterPluginServer is the server API for ArchiveSpanWriterPlugin service. +type ArchiveSpanWriterPluginServer interface { + // spanstore/Writer + WriteArchiveSpan(context.Context, *WriteSpanRequest) (*WriteSpanResponse, error) } -// UnimplementedPluginCapabilitiesServer can be embedded to have forward compatible implementations. -type UnimplementedPluginCapabilitiesServer struct { +// UnimplementedArchiveSpanWriterPluginServer can be embedded to have forward compatible implementations. +type UnimplementedArchiveSpanWriterPluginServer struct { } -func (*UnimplementedPluginCapabilitiesServer) Capabilities(ctx context.Context, req *CapabilitiesRequest) (*CapabilitiesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Capabilities not implemented") +func (*UnimplementedArchiveSpanWriterPluginServer) WriteArchiveSpan(ctx context.Context, req *WriteSpanRequest) (*WriteSpanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WriteArchiveSpan not implemented") } -func RegisterPluginCapabilitiesServer(s *grpc.Server, srv PluginCapabilitiesServer) { - s.RegisterService(&_PluginCapabilities_serviceDesc, srv) +func RegisterArchiveSpanWriterPluginServer(s *grpc.Server, srv ArchiveSpanWriterPluginServer) { + s.RegisterService(&_ArchiveSpanWriterPlugin_serviceDesc, srv) } -func _PluginCapabilities_Capabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CapabilitiesRequest) +func _ArchiveSpanWriterPlugin_WriteArchiveSpan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WriteSpanRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PluginCapabilitiesServer).Capabilities(ctx, in) + return srv.(ArchiveSpanWriterPluginServer).WriteArchiveSpan(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/jaeger.storage.v1.PluginCapabilities/Capabilities", + FullMethod: "/jaeger.storage.v1.ArchiveSpanWriterPlugin/WriteArchiveSpan", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PluginCapabilitiesServer).Capabilities(ctx, req.(*CapabilitiesRequest)) + return srv.(ArchiveSpanWriterPluginServer).WriteArchiveSpan(ctx, req.(*WriteSpanRequest)) } return interceptor(ctx, in, info, handler) } -var _PluginCapabilities_serviceDesc = grpc.ServiceDesc{ - ServiceName: "jaeger.storage.v1.PluginCapabilities", - HandlerType: (*PluginCapabilitiesServer)(nil), +var _ArchiveSpanWriterPlugin_serviceDesc = grpc.ServiceDesc{ + ServiceName: "jaeger.storage.v1.ArchiveSpanWriterPlugin", + HandlerType: (*ArchiveSpanWriterPluginServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "Capabilities", - Handler: _PluginCapabilities_Capabilities_Handler, + MethodName: "WriteArchiveSpan", + Handler: _ArchiveSpanWriterPlugin_WriteArchiveSpan_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "storage.proto", } -func (m *GetDependenciesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +// ArchiveSpanReaderPluginClient is the client API for ArchiveSpanReaderPlugin service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ArchiveSpanReaderPluginClient interface { + // spanstore/Reader + GetArchiveTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (ArchiveSpanReaderPlugin_GetArchiveTraceClient, error) } -func (m *GetDependenciesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type archiveSpanReaderPluginClient struct { + cc *grpc.ClientConn } -func (m *GetDependenciesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintStorage(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x12 - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintStorage(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil +func NewArchiveSpanReaderPluginClient(cc *grpc.ClientConn) ArchiveSpanReaderPluginClient { + return &archiveSpanReaderPluginClient{cc} } -func (m *GetDependenciesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *archiveSpanReaderPluginClient) GetArchiveTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (ArchiveSpanReaderPlugin_GetArchiveTraceClient, error) { + stream, err := c.cc.NewStream(ctx, &_ArchiveSpanReaderPlugin_serviceDesc.Streams[0], "/jaeger.storage.v1.ArchiveSpanReaderPlugin/GetArchiveTrace", opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *GetDependenciesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetDependenciesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Dependencies) > 0 { - for iNdEx := len(m.Dependencies) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Dependencies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStorage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + x := &archiveSpanReaderPluginGetArchiveTraceClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err } - return len(dAtA) - i, nil -} - -func (m *WriteSpanRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { + if err := x.ClientStream.CloseSend(); err != nil { return nil, err } - return dAtA[:n], nil + return x, nil } -func (m *WriteSpanRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type ArchiveSpanReaderPlugin_GetArchiveTraceClient interface { + Recv() (*SpansResponseChunk, error) + grpc.ClientStream } -func (m *WriteSpanRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Span != nil { - { - size, err := m.Span.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStorage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil +type archiveSpanReaderPluginGetArchiveTraceClient struct { + grpc.ClientStream } -func (m *WriteSpanResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func (x *archiveSpanReaderPluginGetArchiveTraceClient) Recv() (*SpansResponseChunk, error) { + m := new(SpansResponseChunk) + if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } - return dAtA[:n], nil + return m, nil } -func (m *WriteSpanResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// ArchiveSpanReaderPluginServer is the server API for ArchiveSpanReaderPlugin service. +type ArchiveSpanReaderPluginServer interface { + // spanstore/Reader + GetArchiveTrace(*GetTraceRequest, ArchiveSpanReaderPlugin_GetArchiveTraceServer) error } -func (m *WriteSpanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil +// UnimplementedArchiveSpanReaderPluginServer can be embedded to have forward compatible implementations. +type UnimplementedArchiveSpanReaderPluginServer struct { } -func (m *CloseWriterRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (*UnimplementedArchiveSpanReaderPluginServer) GetArchiveTrace(req *GetTraceRequest, srv ArchiveSpanReaderPlugin_GetArchiveTraceServer) error { + return status.Errorf(codes.Unimplemented, "method GetArchiveTrace not implemented") } -func (m *CloseWriterRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func RegisterArchiveSpanReaderPluginServer(s *grpc.Server, srv ArchiveSpanReaderPluginServer) { + s.RegisterService(&_ArchiveSpanReaderPlugin_serviceDesc, srv) } -func (m *CloseWriterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func _ArchiveSpanReaderPlugin_GetArchiveTrace_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(GetTraceRequest) + if err := stream.RecvMsg(m); err != nil { + return err } - return len(dAtA) - i, nil + return srv.(ArchiveSpanReaderPluginServer).GetArchiveTrace(m, &archiveSpanReaderPluginGetArchiveTraceServer{stream}) } -func (m *CloseWriterResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +type ArchiveSpanReaderPlugin_GetArchiveTraceServer interface { + Send(*SpansResponseChunk) error + grpc.ServerStream } -func (m *CloseWriterResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type archiveSpanReaderPluginGetArchiveTraceServer struct { + grpc.ServerStream } -func (m *CloseWriterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil +func (x *archiveSpanReaderPluginGetArchiveTraceServer) Send(m *SpansResponseChunk) error { + return x.ServerStream.SendMsg(m) } -func (m *GetTraceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +var _ArchiveSpanReaderPlugin_serviceDesc = grpc.ServiceDesc{ + ServiceName: "jaeger.storage.v1.ArchiveSpanReaderPlugin", + HandlerType: (*ArchiveSpanReaderPluginServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "GetArchiveTrace", + Handler: _ArchiveSpanReaderPlugin_GetArchiveTrace_Handler, + ServerStreams: true, + }, + }, + Metadata: "storage.proto", } -func (m *GetTraceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// DependenciesReaderPluginClient is the client API for DependenciesReaderPlugin service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type DependenciesReaderPluginClient interface { + // dependencystore/Reader + GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) } -func (m *GetTraceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - { - size := m.TraceID.Size() - i -= size - if _, err := m.TraceID.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStorage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil +type dependenciesReaderPluginClient struct { + cc *grpc.ClientConn } -func (m *GetServicesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func NewDependenciesReaderPluginClient(cc *grpc.ClientConn) DependenciesReaderPluginClient { + return &dependenciesReaderPluginClient{cc} +} + +func (c *dependenciesReaderPluginClient) GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) { + out := new(GetDependenciesResponse) + err := c.cc.Invoke(ctx, "/jaeger.storage.v1.DependenciesReaderPlugin/GetDependencies", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *GetServicesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// DependenciesReaderPluginServer is the server API for DependenciesReaderPlugin service. +type DependenciesReaderPluginServer interface { + // dependencystore/Reader + GetDependencies(context.Context, *GetDependenciesRequest) (*GetDependenciesResponse, error) } -func (m *GetServicesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil +// UnimplementedDependenciesReaderPluginServer can be embedded to have forward compatible implementations. +type UnimplementedDependenciesReaderPluginServer struct { } -func (m *GetServicesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (*UnimplementedDependenciesReaderPluginServer) GetDependencies(ctx context.Context, req *GetDependenciesRequest) (*GetDependenciesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDependencies not implemented") } -func (m *GetServicesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func RegisterDependenciesReaderPluginServer(s *grpc.Server, srv DependenciesReaderPluginServer) { + s.RegisterService(&_DependenciesReaderPlugin_serviceDesc, srv) } -func (m *GetServicesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func _DependenciesReaderPlugin_GetDependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDependenciesRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.Services) > 0 { - for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Services[iNdEx]) - copy(dAtA[i:], m.Services[iNdEx]) - i = encodeVarintStorage(dAtA, i, uint64(len(m.Services[iNdEx]))) - i-- - dAtA[i] = 0xa - } + if interceptor == nil { + return srv.(DependenciesReaderPluginServer).GetDependencies(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.storage.v1.DependenciesReaderPlugin/GetDependencies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DependenciesReaderPluginServer).GetDependencies(ctx, req.(*GetDependenciesRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *GetOperationsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +var _DependenciesReaderPlugin_serviceDesc = grpc.ServiceDesc{ + ServiceName: "jaeger.storage.v1.DependenciesReaderPlugin", + HandlerType: (*DependenciesReaderPluginServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetDependencies", + Handler: _DependenciesReaderPlugin_GetDependencies_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "storage.proto", +} + +// MetricsReaderPluginClient is the client API for MetricsReaderPlugin service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MetricsReaderPluginClient interface { + // metricsstore/Reader + GetLatencies(ctx context.Context, in *GetLatenciesRequest, opts ...grpc.CallOption) (*GetLatenciesResponse, error) + GetCallRates(ctx context.Context, in *GetCallRatesRequest, opts ...grpc.CallOption) (*GetCallRatesResponse, error) + GetErrorRates(ctx context.Context, in *GetErrorRatesRequest, opts ...grpc.CallOption) (*GetErrorRatesResponse, error) + GetMinStepDuration(ctx context.Context, in *GetMinStepDurationRequest, opts ...grpc.CallOption) (*GetMinStepDurationResponse, error) +} + +type metricsReaderPluginClient struct { + cc *grpc.ClientConn +} + +func NewMetricsReaderPluginClient(cc *grpc.ClientConn) MetricsReaderPluginClient { + return &metricsReaderPluginClient{cc} +} + +func (c *metricsReaderPluginClient) GetLatencies(ctx context.Context, in *GetLatenciesRequest, opts ...grpc.CallOption) (*GetLatenciesResponse, error) { + out := new(GetLatenciesResponse) + err := c.cc.Invoke(ctx, "/jaeger.storage.v1.MetricsReaderPlugin/GetLatencies", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *GetOperationsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *metricsReaderPluginClient) GetCallRates(ctx context.Context, in *GetCallRatesRequest, opts ...grpc.CallOption) (*GetCallRatesResponse, error) { + out := new(GetCallRatesResponse) + err := c.cc.Invoke(ctx, "/jaeger.storage.v1.MetricsReaderPlugin/GetCallRates", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *GetOperationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.SpanKind) > 0 { - i -= len(m.SpanKind) - copy(dAtA[i:], m.SpanKind) - i = encodeVarintStorage(dAtA, i, uint64(len(m.SpanKind))) - i-- - dAtA[i] = 0x12 - } - if len(m.Service) > 0 { - i -= len(m.Service) - copy(dAtA[i:], m.Service) - i = encodeVarintStorage(dAtA, i, uint64(len(m.Service))) - i-- - dAtA[i] = 0xa +func (c *metricsReaderPluginClient) GetErrorRates(ctx context.Context, in *GetErrorRatesRequest, opts ...grpc.CallOption) (*GetErrorRatesResponse, error) { + out := new(GetErrorRatesResponse) + err := c.cc.Invoke(ctx, "/jaeger.storage.v1.MetricsReaderPlugin/GetErrorRates", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *Operation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *metricsReaderPluginClient) GetMinStepDuration(ctx context.Context, in *GetMinStepDurationRequest, opts ...grpc.CallOption) (*GetMinStepDurationResponse, error) { + out := new(GetMinStepDurationResponse) + err := c.cc.Invoke(ctx, "/jaeger.storage.v1.MetricsReaderPlugin/GetMinStepDuration", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *Operation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// MetricsReaderPluginServer is the server API for MetricsReaderPlugin service. +type MetricsReaderPluginServer interface { + // metricsstore/Reader + GetLatencies(context.Context, *GetLatenciesRequest) (*GetLatenciesResponse, error) + GetCallRates(context.Context, *GetCallRatesRequest) (*GetCallRatesResponse, error) + GetErrorRates(context.Context, *GetErrorRatesRequest) (*GetErrorRatesResponse, error) + GetMinStepDuration(context.Context, *GetMinStepDurationRequest) (*GetMinStepDurationResponse, error) } -func (m *Operation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +// UnimplementedMetricsReaderPluginServer can be embedded to have forward compatible implementations. +type UnimplementedMetricsReaderPluginServer struct { +} + +func (*UnimplementedMetricsReaderPluginServer) GetLatencies(ctx context.Context, req *GetLatenciesRequest) (*GetLatenciesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLatencies not implemented") +} +func (*UnimplementedMetricsReaderPluginServer) GetCallRates(ctx context.Context, req *GetCallRatesRequest) (*GetCallRatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCallRates not implemented") +} +func (*UnimplementedMetricsReaderPluginServer) GetErrorRates(ctx context.Context, req *GetErrorRatesRequest) (*GetErrorRatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetErrorRates not implemented") +} +func (*UnimplementedMetricsReaderPluginServer) GetMinStepDuration(ctx context.Context, req *GetMinStepDurationRequest) (*GetMinStepDurationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMinStepDuration not implemented") +} + +func RegisterMetricsReaderPluginServer(s *grpc.Server, srv MetricsReaderPluginServer) { + s.RegisterService(&_MetricsReaderPlugin_serviceDesc, srv) +} + +func _MetricsReaderPlugin_GetLatencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLatenciesRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.SpanKind) > 0 { - i -= len(m.SpanKind) - copy(dAtA[i:], m.SpanKind) - i = encodeVarintStorage(dAtA, i, uint64(len(m.SpanKind))) - i-- - dAtA[i] = 0x12 + if interceptor == nil { + return srv.(MetricsReaderPluginServer).GetLatencies(ctx, in) } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintStorage(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.storage.v1.MetricsReaderPlugin/GetLatencies", } - return len(dAtA) - i, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsReaderPluginServer).GetLatencies(ctx, req.(*GetLatenciesRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *GetOperationsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _MetricsReaderPlugin_GetCallRates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCallRatesRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(MetricsReaderPluginServer).GetCallRates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.storage.v1.MetricsReaderPlugin/GetCallRates", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsReaderPluginServer).GetCallRates(ctx, req.(*GetCallRatesRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *GetOperationsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _MetricsReaderPlugin_GetErrorRates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetErrorRatesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsReaderPluginServer).GetErrorRates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.storage.v1.MetricsReaderPlugin/GetErrorRates", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsReaderPluginServer).GetErrorRates(ctx, req.(*GetErrorRatesRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *GetOperationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) +func _MetricsReaderPlugin_GetMinStepDuration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMinStepDurationRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.Operations) > 0 { - for iNdEx := len(m.Operations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Operations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStorage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } + if interceptor == nil { + return srv.(MetricsReaderPluginServer).GetMinStepDuration(ctx, in) } - if len(m.OperationNames) > 0 { - for iNdEx := len(m.OperationNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.OperationNames[iNdEx]) - copy(dAtA[i:], m.OperationNames[iNdEx]) - i = encodeVarintStorage(dAtA, i, uint64(len(m.OperationNames[iNdEx]))) - i-- - dAtA[i] = 0xa - } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.storage.v1.MetricsReaderPlugin/GetMinStepDuration", } - return len(dAtA) - i, nil + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsReaderPluginServer).GetMinStepDuration(ctx, req.(*GetMinStepDurationRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *TraceQueryParameters) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +var _MetricsReaderPlugin_serviceDesc = grpc.ServiceDesc{ + ServiceName: "jaeger.storage.v1.MetricsReaderPlugin", + HandlerType: (*MetricsReaderPluginServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetLatencies", + Handler: _MetricsReaderPlugin_GetLatencies_Handler, + }, + { + MethodName: "GetCallRates", + Handler: _MetricsReaderPlugin_GetCallRates_Handler, + }, + { + MethodName: "GetErrorRates", + Handler: _MetricsReaderPlugin_GetErrorRates_Handler, + }, + { + MethodName: "GetMinStepDuration", + Handler: _MetricsReaderPlugin_GetMinStepDuration_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "storage.proto", +} + +// PluginCapabilitiesClient is the client API for PluginCapabilities service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type PluginCapabilitiesClient interface { + Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) +} + +type pluginCapabilitiesClient struct { + cc *grpc.ClientConn +} + +func NewPluginCapabilitiesClient(cc *grpc.ClientConn) PluginCapabilitiesClient { + return &pluginCapabilitiesClient{cc} +} + +func (c *pluginCapabilitiesClient) Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) { + out := new(CapabilitiesResponse) + err := c.cc.Invoke(ctx, "/jaeger.storage.v1.PluginCapabilities/Capabilities", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *TraceQueryParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// PluginCapabilitiesServer is the server API for PluginCapabilities service. +type PluginCapabilitiesServer interface { + Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesResponse, error) } -func (m *TraceQueryParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.NumTraces != 0 { - i = encodeVarintStorage(dAtA, i, uint64(m.NumTraces)) - i-- - dAtA[i] = 0x40 - } - n4, err4 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.DurationMax, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.DurationMax):]) - if err4 != nil { - return 0, err4 - } - i -= n4 - i = encodeVarintStorage(dAtA, i, uint64(n4)) - i-- - dAtA[i] = 0x3a - n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.DurationMin, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.DurationMin):]) - if err5 != nil { - return 0, err5 - } - i -= n5 - i = encodeVarintStorage(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x32 - n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTimeMax, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimeMax):]) - if err6 != nil { - return 0, err6 - } - i -= n6 - i = encodeVarintStorage(dAtA, i, uint64(n6)) - i-- - dAtA[i] = 0x2a - n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTimeMin, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimeMin):]) - if err7 != nil { - return 0, err7 +// UnimplementedPluginCapabilitiesServer can be embedded to have forward compatible implementations. +type UnimplementedPluginCapabilitiesServer struct { +} + +func (*UnimplementedPluginCapabilitiesServer) Capabilities(ctx context.Context, req *CapabilitiesRequest) (*CapabilitiesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Capabilities not implemented") +} + +func RegisterPluginCapabilitiesServer(s *grpc.Server, srv PluginCapabilitiesServer) { + s.RegisterService(&_PluginCapabilities_serviceDesc, srv) +} + +func _PluginCapabilities_Capabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CapabilitiesRequest) + if err := dec(in); err != nil { + return nil, err } - i -= n7 - i = encodeVarintStorage(dAtA, i, uint64(n7)) - i-- - dAtA[i] = 0x22 - if len(m.Tags) > 0 { - for k := range m.Tags { - v := m.Tags[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintStorage(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintStorage(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintStorage(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a - } + if interceptor == nil { + return srv.(PluginCapabilitiesServer).Capabilities(ctx, in) } - if len(m.OperationName) > 0 { - i -= len(m.OperationName) - copy(dAtA[i:], m.OperationName) - i = encodeVarintStorage(dAtA, i, uint64(len(m.OperationName))) - i-- - dAtA[i] = 0x12 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.storage.v1.PluginCapabilities/Capabilities", } - if len(m.ServiceName) > 0 { - i -= len(m.ServiceName) - copy(dAtA[i:], m.ServiceName) - i = encodeVarintStorage(dAtA, i, uint64(len(m.ServiceName))) - i-- - dAtA[i] = 0xa + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PluginCapabilitiesServer).Capabilities(ctx, req.(*CapabilitiesRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *FindTracesRequest) Marshal() (dAtA []byte, err error) { +var _PluginCapabilities_serviceDesc = grpc.ServiceDesc{ + ServiceName: "jaeger.storage.v1.PluginCapabilities", + HandlerType: (*PluginCapabilitiesServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Capabilities", + Handler: _PluginCapabilities_Capabilities_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "storage.proto", +} + +func (m *GetDependenciesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2440,12 +2603,12 @@ func (m *FindTracesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FindTracesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *GetDependenciesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *FindTracesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GetDependenciesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2454,22 +2617,26 @@ func (m *FindTracesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if m.Query != nil { - { - size, err := m.Query.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStorage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintStorage(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x12 + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + if err2 != nil { + return 0, err2 } + i -= n2 + i = encodeVarintStorage(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *SpansResponseChunk) Marshal() (dAtA []byte, err error) { +func (m *GetDependenciesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2479,12 +2646,12 @@ func (m *SpansResponseChunk) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SpansResponseChunk) MarshalTo(dAtA []byte) (int, error) { +func (m *GetDependenciesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SpansResponseChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GetDependenciesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2493,10 +2660,10 @@ func (m *SpansResponseChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Spans) > 0 { - for iNdEx := len(m.Spans) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Dependencies) > 0 { + for iNdEx := len(m.Dependencies) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Spans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Dependencies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2510,7 +2677,7 @@ func (m *SpansResponseChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *FindTraceIDsRequest) Marshal() (dAtA []byte, err error) { +func (m *WriteSpanRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2520,12 +2687,12 @@ func (m *FindTraceIDsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FindTraceIDsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *WriteSpanRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *FindTraceIDsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *WriteSpanRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2534,9 +2701,9 @@ func (m *FindTraceIDsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if m.Query != nil { + if m.Span != nil { { - size, err := m.Query.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Span.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2549,7 +2716,7 @@ func (m *FindTraceIDsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *FindTraceIDsResponse) Marshal() (dAtA []byte, err error) { +func (m *WriteSpanResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2559,12 +2726,12 @@ func (m *FindTraceIDsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FindTraceIDsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *WriteSpanResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *FindTraceIDsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *WriteSpanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2573,24 +2740,10 @@ func (m *FindTraceIDsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.TraceIDs) > 0 { - for iNdEx := len(m.TraceIDs) - 1; iNdEx >= 0; iNdEx-- { - { - size := m.TraceIDs[iNdEx].Size() - i -= size - if _, err := m.TraceIDs[iNdEx].MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintStorage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } return len(dAtA) - i, nil } -func (m *CapabilitiesRequest) Marshal() (dAtA []byte, err error) { +func (m *CloseWriterRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2600,12 +2753,12 @@ func (m *CapabilitiesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CapabilitiesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *CloseWriterRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *CapabilitiesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *CloseWriterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2617,7 +2770,7 @@ func (m *CapabilitiesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *CapabilitiesResponse) Marshal() (dAtA []byte, err error) { +func (m *CloseWriterResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2627,12 +2780,12 @@ func (m *CapabilitiesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CapabilitiesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *CloseWriterResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *CapabilitiesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *CloseWriterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2641,391 +2794,2416 @@ func (m *CapabilitiesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if m.StreamingSpanWriter { - i-- - if m.StreamingSpanWriter { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.ArchiveSpanWriter { - i-- - if m.ArchiveSpanWriter { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.ArchiveSpanReader { - i-- - if m.ArchiveSpanReader { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } return len(dAtA) - i, nil } -func encodeVarintStorage(dAtA []byte, offset int, v uint64) int { - offset -= sovStorage(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *GetTraceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *GetDependenciesRequest) Size() (n int) { - if m == nil { - return 0 - } + +func (m *GetTraceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTraceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) - n += 1 + l + sovStorage(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime) - n += 1 + l + sovStorage(uint64(l)) if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GetDependenciesResponse) Size() (n int) { - if m == nil { - return 0 + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - var l int - _ = l - if len(m.Dependencies) > 0 { - for _, e := range m.Dependencies { - l = e.Size() - n += 1 + l + sovStorage(uint64(l)) + { + size := m.TraceID.Size() + i -= size + if _, err := m.TraceID.MarshalTo(dAtA[i:]); err != nil { + return 0, err } + i = encodeVarintStorage(dAtA, i, uint64(size)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *WriteSpanRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Span != nil { - l = m.Span.Size() - n += 1 + l + sovStorage(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) +func (m *GetServicesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *WriteSpanResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n +func (m *GetServicesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *CloseWriterRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *GetServicesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return n + return len(dAtA) - i, nil } -func (m *CloseWriterResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) +func (m *GetServicesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *GetTraceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.TraceID.Size() - n += 1 + l + sovStorage(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n +func (m *GetServicesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GetServicesRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *GetServicesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GetServicesResponse) Size() (n int) { - if m == nil { - return 0 + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - var l int - _ = l if len(m.Services) > 0 { - for _, s := range m.Services { - l = len(s) - n += 1 + l + sovStorage(uint64(l)) + for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Services[iNdEx]) + copy(dAtA[i:], m.Services[iNdEx]) + i = encodeVarintStorage(dAtA, i, uint64(len(m.Services[iNdEx]))) + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n + return len(dAtA) - i, nil } -func (m *GetOperationsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *GetOperationsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *GetOperationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetOperationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Service) - if l > 0 { - n += 1 + l + sovStorage(uint64(l)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - l = len(m.SpanKind) - if l > 0 { - n += 1 + l + sovStorage(uint64(l)) + if len(m.SpanKind) > 0 { + i -= len(m.SpanKind) + copy(dAtA[i:], m.SpanKind) + i = encodeVarintStorage(dAtA, i, uint64(len(m.SpanKind))) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if len(m.Service) > 0 { + i -= len(m.Service) + copy(dAtA[i:], m.Service) + i = encodeVarintStorage(dAtA, i, uint64(len(m.Service))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *Operation) Size() (n int) { - if m == nil { - return 0 +func (m *Operation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *Operation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Operation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovStorage(uint64(l)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - l = len(m.SpanKind) - if l > 0 { - n += 1 + l + sovStorage(uint64(l)) + if len(m.SpanKind) > 0 { + i -= len(m.SpanKind) + copy(dAtA[i:], m.SpanKind) + i = encodeVarintStorage(dAtA, i, uint64(len(m.SpanKind))) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintStorage(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *GetOperationsResponse) Size() (n int) { - if m == nil { - return 0 +func (m *GetOperationsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *GetOperationsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetOperationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.OperationNames) > 0 { - for _, s := range m.OperationNames { - l = len(s) - n += 1 + l + sovStorage(uint64(l)) - } + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Operations) > 0 { - for _, e := range m.Operations { - l = e.Size() - n += 1 + l + sovStorage(uint64(l)) + for iNdEx := len(m.Operations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Operations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if len(m.OperationNames) > 0 { + for iNdEx := len(m.OperationNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OperationNames[iNdEx]) + copy(dAtA[i:], m.OperationNames[iNdEx]) + i = encodeVarintStorage(dAtA, i, uint64(len(m.OperationNames[iNdEx]))) + i-- + dAtA[i] = 0xa + } } - return n + return len(dAtA) - i, nil } -func (m *TraceQueryParameters) Size() (n int) { - if m == nil { - return 0 +func (m *TraceQueryParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *TraceQueryParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TraceQueryParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.ServiceName) - if l > 0 { - n += 1 + l + sovStorage(uint64(l)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - l = len(m.OperationName) - if l > 0 { - n += 1 + l + sovStorage(uint64(l)) + if m.NumTraces != 0 { + i = encodeVarintStorage(dAtA, i, uint64(m.NumTraces)) + i-- + dAtA[i] = 0x40 + } + n4, err4 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.DurationMax, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.DurationMax):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintStorage(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x3a + n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.DurationMin, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.DurationMin):]) + if err5 != nil { + return 0, err5 + } + i -= n5 + i = encodeVarintStorage(dAtA, i, uint64(n5)) + i-- + dAtA[i] = 0x32 + n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTimeMax, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimeMax):]) + if err6 != nil { + return 0, err6 + } + i -= n6 + i = encodeVarintStorage(dAtA, i, uint64(n6)) + i-- + dAtA[i] = 0x2a + n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTimeMin, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimeMin):]) + if err7 != nil { + return 0, err7 } + i -= n7 + i = encodeVarintStorage(dAtA, i, uint64(n7)) + i-- + dAtA[i] = 0x22 if len(m.Tags) > 0 { - for k, v := range m.Tags { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovStorage(uint64(len(k))) + 1 + len(v) + sovStorage(uint64(len(v))) - n += mapEntrySize + 1 + sovStorage(uint64(mapEntrySize)) + for k := range m.Tags { + v := m.Tags[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintStorage(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintStorage(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintStorage(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a } } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimeMin) - n += 1 + l + sovStorage(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimeMax) - n += 1 + l + sovStorage(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.DurationMin) - n += 1 + l + sovStorage(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.DurationMax) - n += 1 + l + sovStorage(uint64(l)) - if m.NumTraces != 0 { - n += 1 + sovStorage(uint64(m.NumTraces)) + if len(m.OperationName) > 0 { + i -= len(m.OperationName) + copy(dAtA[i:], m.OperationName) + i = encodeVarintStorage(dAtA, i, uint64(len(m.OperationName))) + i-- + dAtA[i] = 0x12 } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if len(m.ServiceName) > 0 { + i -= len(m.ServiceName) + copy(dAtA[i:], m.ServiceName) + i = encodeVarintStorage(dAtA, i, uint64(len(m.ServiceName))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *FindTracesRequest) Size() (n int) { - if m == nil { - return 0 +func (m *FindTracesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *FindTracesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FindTracesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Query != nil { - l = m.Query.Size() - n += 1 + l + sovStorage(uint64(l)) - } if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return n + if m.Query != nil { + { + size, err := m.Query.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *SpansResponseChunk) Size() (n int) { - if m == nil { - return 0 +func (m *SpansResponseChunk) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *SpansResponseChunk) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpansResponseChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } if len(m.Spans) > 0 { - for _, e := range m.Spans { - l = e.Size() - n += 1 + l + sovStorage(uint64(l)) + for iNdEx := len(m.Spans) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Spans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n + return len(dAtA) - i, nil } -func (m *FindTraceIDsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Query != nil { - l = m.Query.Size() - n += 1 + l + sovStorage(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) +func (m *FindTraceIDsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *FindTraceIDsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *FindTraceIDsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FindTraceIDsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.TraceIDs) > 0 { - for _, e := range m.TraceIDs { - l = e.Size() - n += 1 + l + sovStorage(uint64(l)) + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Query != nil { + { + size, err := m.Query.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FindTraceIDsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *FindTraceIDsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FindTraceIDsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) } - return n + if len(m.TraceIDs) > 0 { + for iNdEx := len(m.TraceIDs) - 1; iNdEx >= 0; iNdEx-- { + { + size := m.TraceIDs[iNdEx].Size() + i -= size + if _, err := m.TraceIDs[iNdEx].MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } -func (m *CapabilitiesRequest) Size() (n int) { - if m == nil { - return 0 +func (m *MetricsBaseQueryParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *MetricsBaseQueryParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MetricsBaseQueryParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.SpanKinds) > 0 { + for iNdEx := len(m.SpanKinds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SpanKinds[iNdEx]) + copy(dAtA[i:], m.SpanKinds[iNdEx]) + i = encodeVarintStorage(dAtA, i, uint64(len(m.SpanKinds[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if m.RatePer != nil { + { + size, err := m.RatePer.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.Step != nil { + { + size, err := m.Step.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.Lookback != nil { + { + size, err := m.Lookback.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.EndTime != nil { + { + size, err := m.EndTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.GroupByOperation { + i-- + if m.GroupByOperation { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.ServiceNames) > 0 { + for iNdEx := len(m.ServiceNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ServiceNames[iNdEx]) + copy(dAtA[i:], m.ServiceNames[iNdEx]) + i = encodeVarintStorage(dAtA, i, uint64(len(m.ServiceNames[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GetLatenciesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetLatenciesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetLatenciesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Quantile != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Quantile)))) + i-- + dAtA[i] = 0x15 + } + if m.BaseQueryParameters != nil { + { + size, err := m.BaseQueryParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetLatenciesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetLatenciesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetLatenciesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.MetricFamily != nil { + { + size, err := m.MetricFamily.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetCallRatesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetCallRatesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetCallRatesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.BaseQueryParameters != nil { + { + size, err := m.BaseQueryParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetCallRatesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetCallRatesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetCallRatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.MetricFamily != nil { + { + size, err := m.MetricFamily.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetErrorRatesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetErrorRatesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetErrorRatesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.BaseQueryParameters != nil { + { + size, err := m.BaseQueryParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetErrorRatesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetErrorRatesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetErrorRatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.MetricFamily != nil { + { + size, err := m.MetricFamily.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetMinStepDurationRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetMinStepDurationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetMinStepDurationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil +} + +func (m *GetMinStepDurationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetMinStepDurationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetMinStepDurationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.MinStep != nil { + { + size, err := m.MinStep.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStorage(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CapabilitiesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CapabilitiesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CapabilitiesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil +} + +func (m *CapabilitiesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CapabilitiesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CapabilitiesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.MetricsReader { + i-- + if m.MetricsReader { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.StreamingSpanWriter { + i-- + if m.StreamingSpanWriter { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.ArchiveSpanWriter { + i-- + if m.ArchiveSpanWriter { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.ArchiveSpanReader { + i-- + if m.ArchiveSpanReader { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintStorage(dAtA []byte, offset int, v uint64) int { + offset -= sovStorage(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GetDependenciesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + n += 1 + l + sovStorage(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EndTime) + n += 1 + l + sovStorage(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetDependenciesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Dependencies) > 0 { + for _, e := range m.Dependencies { + l = e.Size() + n += 1 + l + sovStorage(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *WriteSpanRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Span != nil { + l = m.Span.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *WriteSpanResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CloseWriterRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CloseWriterResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetTraceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TraceID.Size() + n += 1 + l + sovStorage(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetServicesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetServicesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Services) > 0 { + for _, s := range m.Services { + l = len(s) + n += 1 + l + sovStorage(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetOperationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Service) + if l > 0 { + n += 1 + l + sovStorage(uint64(l)) + } + l = len(m.SpanKind) + if l > 0 { + n += 1 + l + sovStorage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Operation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovStorage(uint64(l)) + } + l = len(m.SpanKind) + if l > 0 { + n += 1 + l + sovStorage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetOperationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.OperationNames) > 0 { + for _, s := range m.OperationNames { + l = len(s) + n += 1 + l + sovStorage(uint64(l)) + } + } + if len(m.Operations) > 0 { + for _, e := range m.Operations { + l = e.Size() + n += 1 + l + sovStorage(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TraceQueryParameters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ServiceName) + if l > 0 { + n += 1 + l + sovStorage(uint64(l)) + } + l = len(m.OperationName) + if l > 0 { + n += 1 + l + sovStorage(uint64(l)) + } + if len(m.Tags) > 0 { + for k, v := range m.Tags { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovStorage(uint64(len(k))) + 1 + len(v) + sovStorage(uint64(len(v))) + n += mapEntrySize + 1 + sovStorage(uint64(mapEntrySize)) + } + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimeMin) + n += 1 + l + sovStorage(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTimeMax) + n += 1 + l + sovStorage(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.DurationMin) + n += 1 + l + sovStorage(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.DurationMax) + n += 1 + l + sovStorage(uint64(l)) + if m.NumTraces != 0 { + n += 1 + sovStorage(uint64(m.NumTraces)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FindTracesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Query != nil { + l = m.Query.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SpansResponseChunk) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Spans) > 0 { + for _, e := range m.Spans { + l = e.Size() + n += 1 + l + sovStorage(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FindTraceIDsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Query != nil { + l = m.Query.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FindTraceIDsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TraceIDs) > 0 { + for _, e := range m.TraceIDs { + l = e.Size() + n += 1 + l + sovStorage(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MetricsBaseQueryParameters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ServiceNames) > 0 { + for _, s := range m.ServiceNames { + l = len(s) + n += 1 + l + sovStorage(uint64(l)) + } + } + if m.GroupByOperation { + n += 2 + } + if m.EndTime != nil { + l = m.EndTime.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if m.Lookback != nil { + l = m.Lookback.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if m.Step != nil { + l = m.Step.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if m.RatePer != nil { + l = m.RatePer.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if len(m.SpanKinds) > 0 { + for _, s := range m.SpanKinds { + l = len(s) + n += 1 + l + sovStorage(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetLatenciesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BaseQueryParameters != nil { + l = m.BaseQueryParameters.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if m.Quantile != 0 { + n += 5 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetLatenciesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MetricFamily != nil { + l = m.MetricFamily.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetCallRatesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BaseQueryParameters != nil { + l = m.BaseQueryParameters.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetCallRatesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MetricFamily != nil { + l = m.MetricFamily.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetErrorRatesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BaseQueryParameters != nil { + l = m.BaseQueryParameters.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetErrorRatesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MetricFamily != nil { + l = m.MetricFamily.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetMinStepDurationRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetMinStepDurationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MinStep != nil { + l = m.MinStep.Size() + n += 1 + l + sovStorage(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CapabilitiesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CapabilitiesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ArchiveSpanReader { + n += 2 + } + if m.ArchiveSpanWriter { + n += 2 + } + if m.StreamingSpanWriter { + n += 2 + } + if m.MetricsReader { + n += 2 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovStorage(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozStorage(x uint64) (n int) { + return sovStorage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GetDependenciesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDependenciesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDependenciesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetDependenciesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDependenciesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDependenciesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dependencies", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Dependencies = append(m.Dependencies, model.DependencyLink{}) + if err := m.Dependencies[len(m.Dependencies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WriteSpanRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WriteSpanRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WriteSpanRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Span", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Span == nil { + m.Span = &model.Span{} + } + if err := m.Span.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WriteSpanResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WriteSpanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WriteSpanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CloseWriterRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CloseWriterRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CloseWriterRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CloseWriterResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CloseWriterResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CloseWriterResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTraceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTraceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTraceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TraceID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetServicesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetServicesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetServicesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetServicesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetServicesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetServicesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Services = append(m.Services, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetOperationsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetOperationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetOperationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Service = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanKind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpanKind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Operation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Operation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Operation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanKind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpanKind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } } - return n -} -func (m *CapabilitiesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ArchiveSpanReader { - n += 2 - } - if m.ArchiveSpanWriter { - n += 2 - } - if m.StreamingSpanWriter { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n -} - -func sovStorage(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozStorage(x uint64) (n int) { - return sovStorage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return nil } -func (m *GetDependenciesRequest) Unmarshal(dAtA []byte) error { +func (m *GetOperationsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3048,17 +5226,17 @@ func (m *GetDependenciesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetDependenciesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetOperationsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetDependenciesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetOperationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OperationNames", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStorage @@ -3068,28 +5246,27 @@ func (m *GetDependenciesRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStorage } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStorage } if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.OperationNames = append(m.OperationNames, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3116,7 +5293,8 @@ func (m *GetDependenciesRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EndTime, dAtA[iNdEx:postIndex]); err != nil { + m.Operations = append(m.Operations, &Operation{}) + if err := m.Operations[len(m.Operations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3142,7 +5320,7 @@ func (m *GetDependenciesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetDependenciesResponse) Unmarshal(dAtA []byte) error { +func (m *TraceQueryParameters) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3161,19 +5339,210 @@ func (m *GetDependenciesResponse) Unmarshal(dAtA []byte) error { if b < 0x80 { break } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetDependenciesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetDependenciesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceQueryParameters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceQueryParameters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperationName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Tags == nil { + m.Tags = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthStorage + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthStorage + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthStorage + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthStorage + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Tags[mapkey] = mapvalue + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dependencies", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeMin", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3200,65 +5569,13 @@ func (m *GetDependenciesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Dependencies = append(m.Dependencies, model.DependencyLink{}) - if err := m.Dependencies[len(m.Dependencies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTimeMin, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStorage(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStorage - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WriteSpanRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStorage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WriteSpanRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WriteSpanRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Span", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeMax", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3285,166 +5602,95 @@ func (m *WriteSpanRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Span == nil { - m.Span = &model.Span{} - } - if err := m.Span.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTimeMax, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStorage(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStorage - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WriteSpanResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStorage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DurationMin", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WriteSpanResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WriteSpanResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipStorage(dAtA[iNdEx:]) - if err != nil { - return err + if msglen < 0 { + return ErrInvalidLengthStorage } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + msglen + if postIndex < 0 { return ErrInvalidLengthStorage } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CloseWriterRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStorage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.DurationMin, dAtA[iNdEx:postIndex]); err != nil { + return err } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DurationMax", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CloseWriterRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CloseWriterRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipStorage(dAtA[iNdEx:]) - if err != nil { - return err + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if msglen < 0 { return ErrInvalidLengthStorage } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CloseWriterResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStorage + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorage } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.DurationMax, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumTraces", wireType) + } + m.NumTraces = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumTraces |= int32(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CloseWriterResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CloseWriterResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { default: iNdEx = preIndex skippy, err := skipStorage(dAtA[iNdEx:]) @@ -3467,7 +5713,7 @@ func (m *CloseWriterResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetTraceRequest) Unmarshal(dAtA []byte) error { +func (m *FindTracesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3490,17 +5736,17 @@ func (m *GetTraceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetTraceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: FindTracesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetTraceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FindTracesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStorage @@ -3510,22 +5756,25 @@ func (m *GetTraceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthStorage } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthStorage } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.TraceID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Query == nil { + m.Query = &TraceQueryParameters{} + } + if err := m.Query.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3551,7 +5800,7 @@ func (m *GetTraceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetServicesRequest) Unmarshal(dAtA []byte) error { +func (m *SpansResponseChunk) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3574,12 +5823,46 @@ func (m *GetServicesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetServicesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SpansResponseChunk: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetServicesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpansResponseChunk: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStorage + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Spans = append(m.Spans, model.Span{}) + if err := m.Spans[len(m.Spans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipStorage(dAtA[iNdEx:]) @@ -3602,7 +5885,7 @@ func (m *GetServicesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetServicesResponse) Unmarshal(dAtA []byte) error { +func (m *FindTraceIDsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3625,17 +5908,17 @@ func (m *GetServicesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetServicesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: FindTraceIDsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetServicesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FindTraceIDsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStorage @@ -3645,23 +5928,27 @@ func (m *GetServicesResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthStorage } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthStorage } if postIndex > l { return io.ErrUnexpectedEOF } - m.Services = append(m.Services, string(dAtA[iNdEx:postIndex])) + if m.Query == nil { + m.Query = &TraceQueryParameters{} + } + if err := m.Query.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3685,7 +5972,7 @@ func (m *GetServicesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetOperationsRequest) Unmarshal(dAtA []byte) error { +func (m *FindTraceIDsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3708,17 +5995,17 @@ func (m *GetOperationsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetOperationsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: FindTraceIDsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetOperationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FindTraceIDsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TraceIDs", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStorage @@ -3728,55 +6015,26 @@ func (m *GetOperationsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthStorage } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthStorage } if postIndex > l { return io.ErrUnexpectedEOF } - m.Service = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanKind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStorage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStorage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStorage - } - if postIndex > l { - return io.ErrUnexpectedEOF + var v github_com_jaegertracing_jaeger_model.TraceID + m.TraceIDs = append(m.TraceIDs, v) + if err := m.TraceIDs[len(m.TraceIDs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.SpanKind = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3800,7 +6058,7 @@ func (m *GetOperationsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *Operation) Unmarshal(dAtA []byte) error { +func (m *MetricsBaseQueryParameters) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3823,15 +6081,15 @@ func (m *Operation) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Operation: wiretype end group for non-group") + return fmt.Errorf("proto: MetricsBaseQueryParameters: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Operation: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MetricsBaseQueryParameters: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ServiceNames", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3859,13 +6117,13 @@ func (m *Operation) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.ServiceNames = append(m.ServiceNames, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanKind", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupByOperation", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStorage @@ -3875,80 +6133,17 @@ func (m *Operation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStorage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStorage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpanKind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStorage(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStorage - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetOperationsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStorage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetOperationsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetOperationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.GroupByOperation = bool(v != 0) + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationNames", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStorage @@ -3958,27 +6153,31 @@ func (m *GetOperationsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthStorage } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthStorage } if postIndex > l { return io.ErrUnexpectedEOF } - m.OperationNames = append(m.OperationNames, string(dAtA[iNdEx:postIndex])) + if m.EndTime == nil { + m.EndTime = &types.Timestamp{} + } + if err := m.EndTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Lookback", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4005,67 +6204,18 @@ func (m *GetOperationsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Operations = append(m.Operations, &Operation{}) - if err := m.Operations[len(m.Operations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if m.Lookback == nil { + m.Lookback = &types.Duration{} } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStorage(dAtA[iNdEx:]) - if err != nil { + if err := m.Lookback.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStorage - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TraceQueryParameters) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStorage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TraceQueryParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TraceQueryParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStorage @@ -4075,29 +6225,33 @@ func (m *TraceQueryParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthStorage } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthStorage } if postIndex > l { return io.ErrUnexpectedEOF } - m.ServiceName = string(dAtA[iNdEx:postIndex]) + if m.Step == nil { + m.Step = &types.Duration{} + } + if err := m.Step.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RatePer", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStorage @@ -4107,29 +6261,33 @@ func (m *TraceQueryParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthStorage } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthStorage } if postIndex > l { return io.ErrUnexpectedEOF } - m.OperationName = string(dAtA[iNdEx:postIndex]) + if m.RatePer == nil { + m.RatePer = &types.Duration{} + } + if err := m.RatePer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SpanKinds", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStorage @@ -4139,122 +6297,78 @@ func (m *TraceQueryParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthStorage } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthStorage } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Tags == nil { - m.Tags = make(map[string]string) + m.SpanKinds = append(m.SpanKinds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStorage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStorage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthStorage - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthStorage - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStorage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthStorage - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthStorage - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipStorage(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStorage - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage } - m.Tags[mapkey] = mapvalue - iNdEx = postIndex - case 4: + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetLatenciesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetLatenciesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetLatenciesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeMin", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BaseQueryParameters", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4281,46 +6395,78 @@ func (m *TraceQueryParameters) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTimeMin, dAtA[iNdEx:postIndex]); err != nil { + if m.BaseQueryParameters == nil { + m.BaseQueryParameters = &MetricsBaseQueryParameters{} + } + if err := m.BaseQueryParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeMax", wireType) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Quantile", wireType) } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStorage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF } - if msglen < 0 { - return ErrInvalidLengthStorage + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Quantile = float32(math.Float32frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthStorage } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTimeMax, dAtA[iNdEx:postIndex]); err != nil { - return err + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetLatenciesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage } - iNdEx = postIndex - case 6: + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetLatenciesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetLatenciesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DurationMin", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MetricFamily", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4347,13 +6493,67 @@ func (m *TraceQueryParameters) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.DurationMin, dAtA[iNdEx:postIndex]); err != nil { + if m.MetricFamily == nil { + m.MetricFamily = &metrics.MetricFamily{} + } + if err := m.MetricFamily.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 7: + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetCallRatesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetCallRatesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetCallRatesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DurationMax", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BaseQueryParameters", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4380,29 +6580,13 @@ func (m *TraceQueryParameters) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.DurationMax, dAtA[iNdEx:postIndex]); err != nil { + if m.BaseQueryParameters == nil { + m.BaseQueryParameters = &MetricsBaseQueryParameters{} + } + if err := m.BaseQueryParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumTraces", wireType) - } - m.NumTraces = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStorage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NumTraces |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipStorage(dAtA[iNdEx:]) @@ -4425,7 +6609,7 @@ func (m *TraceQueryParameters) Unmarshal(dAtA []byte) error { } return nil } -func (m *FindTracesRequest) Unmarshal(dAtA []byte) error { +func (m *GetCallRatesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4448,15 +6632,15 @@ func (m *FindTracesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FindTracesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetCallRatesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FindTracesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetCallRatesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MetricFamily", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4483,10 +6667,10 @@ func (m *FindTracesRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Query == nil { - m.Query = &TraceQueryParameters{} + if m.MetricFamily == nil { + m.MetricFamily = &metrics.MetricFamily{} } - if err := m.Query.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.MetricFamily.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4512,7 +6696,7 @@ func (m *FindTracesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *SpansResponseChunk) Unmarshal(dAtA []byte) error { +func (m *GetErrorRatesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4535,15 +6719,15 @@ func (m *SpansResponseChunk) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SpansResponseChunk: wiretype end group for non-group") + return fmt.Errorf("proto: GetErrorRatesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SpansResponseChunk: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetErrorRatesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BaseQueryParameters", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4570,8 +6754,10 @@ func (m *SpansResponseChunk) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Spans = append(m.Spans, model.Span{}) - if err := m.Spans[len(m.Spans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.BaseQueryParameters == nil { + m.BaseQueryParameters = &MetricsBaseQueryParameters{} + } + if err := m.BaseQueryParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4597,7 +6783,7 @@ func (m *SpansResponseChunk) Unmarshal(dAtA []byte) error { } return nil } -func (m *FindTraceIDsRequest) Unmarshal(dAtA []byte) error { +func (m *GetErrorRatesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4620,15 +6806,15 @@ func (m *FindTraceIDsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FindTraceIDsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetErrorRatesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FindTraceIDsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetErrorRatesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MetricFamily", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4655,10 +6841,10 @@ func (m *FindTraceIDsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Query == nil { - m.Query = &TraceQueryParameters{} + if m.MetricFamily == nil { + m.MetricFamily = &metrics.MetricFamily{} } - if err := m.Query.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.MetricFamily.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4684,7 +6870,7 @@ func (m *FindTraceIDsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *FindTraceIDsResponse) Unmarshal(dAtA []byte) error { +func (m *GetMinStepDurationRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4707,17 +6893,68 @@ func (m *FindTraceIDsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FindTraceIDsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetMinStepDurationRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FindTraceIDsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetMinStepDurationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetMinStepDurationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetMinStepDurationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetMinStepDurationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceIDs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MinStep", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStorage @@ -4727,24 +6964,25 @@ func (m *FindTraceIDsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthStorage } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthStorage } if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_jaegertracing_jaeger_model.TraceID - m.TraceIDs = append(m.TraceIDs, v) - if err := m.TraceIDs[len(m.TraceIDs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.MinStep == nil { + m.MinStep = &types.Duration{} + } + if err := m.MinStep.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4910,6 +7148,26 @@ func (m *CapabilitiesResponse) Unmarshal(dAtA []byte) error { } } m.StreamingSpanWriter = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MetricsReader", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.MetricsReader = bool(v != 0) default: iNdEx = preIndex skippy, err := skipStorage(dAtA[iNdEx:]) From 61b0f86390bb5a58b753cf063bd939f1f7496f0f Mon Sep 17 00:00:00 2001 From: Jacob Marble Date: Wed, 26 Apr 2023 19:31:44 -0700 Subject: [PATCH 2/2] feat: Implement gRPC metrics plugin Signed-off-by: Jacob Marble --- cmd/query/main.go | 8 +- plugin/metrics/factory.go | 8 +- plugin/metrics/grpc/factory.go | 99 +++++++++++ plugin/metrics/grpc/factory_test.go | 17 ++ plugin/metrics/grpc/options.go | 69 +++++++ plugin/metrics/grpc/options_test.go | 17 ++ plugin/storage/grpc/config/config.go | 1 + plugin/storage/grpc/grpc.go | 1 + plugin/storage/grpc/shared/grpc_client.go | 9 + plugin/storage/grpc/shared/grpc_handler.go | 113 ++++++++++++ .../storage/grpc/shared/grpc_handler_test.go | 168 +++++++++++++++++- plugin/storage/grpc/shared/interface.go | 7 + plugin/storage/grpc/shared/metrics.go | 106 +++++++++++ plugin/storage/grpc/shared/metrics_test.go | 17 ++ plugin/storage/grpc/shared/plugin.go | 3 +- storage/factory.go | 3 + 16 files changed, 637 insertions(+), 9 deletions(-) create mode 100644 plugin/metrics/grpc/factory.go create mode 100644 plugin/metrics/grpc/factory_test.go create mode 100644 plugin/metrics/grpc/options.go create mode 100644 plugin/metrics/grpc/options_test.go create mode 100644 plugin/storage/grpc/shared/metrics.go create mode 100644 plugin/storage/grpc/shared/metrics_test.go diff --git a/cmd/query/main.go b/cmd/query/main.go index af6b6116378..a84a70554e5 100644 --- a/cmd/query/main.go +++ b/cmd/query/main.go @@ -55,8 +55,7 @@ func main() { log.Fatalf("Cannot initialize storage factory: %v", err) } - fc := metricsPlugin.FactoryConfigFromEnv() - metricsReaderFactory, err := metricsPlugin.NewFactory(fc) + metricsReaderFactory, err := metricsPlugin.NewFactory(metricsPlugin.FactoryConfigFromEnv()) if err != nil { log.Fatalf("Cannot initialize metrics factory: %v", err) } @@ -179,12 +178,13 @@ func createMetricsQueryService( logger *zap.Logger, metricsReaderMetricsFactory metrics.Factory, ) (querysvc.MetricsQueryService, error) { + // Ensure default parameter values are loaded correctly. + metricsReaderFactory.InitFromViper(v, logger) + if err := metricsReaderFactory.Initialize(logger); err != nil { return nil, fmt.Errorf("failed to init metrics reader factory: %w", err) } - // Ensure default parameter values are loaded correctly. - metricsReaderFactory.InitFromViper(v, logger) reader, err := metricsReaderFactory.CreateMetricsReader() if err != nil { return nil, fmt.Errorf("failed to create metrics reader: %w", err) diff --git a/plugin/metrics/factory.go b/plugin/metrics/factory.go index a9f8e23fc59..a31316f05b6 100644 --- a/plugin/metrics/factory.go +++ b/plugin/metrics/factory.go @@ -23,6 +23,7 @@ import ( "github.com/jaegertracing/jaeger/plugin" "github.com/jaegertracing/jaeger/plugin/metrics/disabled" + "github.com/jaegertracing/jaeger/plugin/metrics/grpc" "github.com/jaegertracing/jaeger/plugin/metrics/prometheus" "github.com/jaegertracing/jaeger/storage" "github.com/jaegertracing/jaeger/storage/metricsstore" @@ -33,6 +34,7 @@ const ( disabledStorageType = "" prometheusStorageType = "prometheus" + grpcStorageType = "grpc-plugin" ) // AllStorageTypes defines all available storage backends. @@ -67,6 +69,8 @@ func (f *Factory) getFactoryOfType(factoryType string) (storage.MetricsFactory, switch factoryType { case prometheusStorageType: return prometheus.NewFactory(), nil + case grpcStorageType: + return grpc.NewFactory(), nil case disabledStorageType: return disabled.NewFactory(), nil } @@ -76,7 +80,9 @@ func (f *Factory) getFactoryOfType(factoryType string) (storage.MetricsFactory, // Initialize implements storage.MetricsFactory. func (f *Factory) Initialize(logger *zap.Logger) error { for _, factory := range f.factories { - factory.Initialize(logger) + if err := factory.Initialize(logger); err != nil { + return err + } } return nil } diff --git a/plugin/metrics/grpc/factory.go b/plugin/metrics/grpc/factory.go new file mode 100644 index 00000000000..64fbfcf5e68 --- /dev/null +++ b/plugin/metrics/grpc/factory.go @@ -0,0 +1,99 @@ +// Copyright (c) 2023 The Jaeger Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package grpc + +import ( + "flag" + "fmt" + "io" + + "github.com/spf13/viper" + "go.uber.org/zap" + + "github.com/jaegertracing/jaeger/plugin" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/config" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" + "github.com/jaegertracing/jaeger/storage" + "github.com/jaegertracing/jaeger/storage/metricsstore" +) + +var ( + _ plugin.Configurable = (*Factory)(nil) + _ io.Closer = (*Factory)(nil) +) + +// Factory implements storage.MetricsFactory +type Factory struct { + options Options + logger *zap.Logger + + builder config.PluginBuilder + + metricsReader shared.MetricsReaderPlugin + capabilities shared.PluginCapabilities +} + +// NewFactory creates a new Factory +func NewFactory() *Factory { + return &Factory{} +} + +// AddFlags implements plugin.Configurable +func (f *Factory) AddFlags(flagSet *flag.FlagSet) { + f.options.AddFlags(flagSet) +} + +// InitFromViper implements plugin.Configurable +func (f *Factory) InitFromViper(v *viper.Viper, logger *zap.Logger) { + if err := f.options.InitFromViper(v); err != nil { + logger.Fatal("unable to initialize gRPC metrics factory", zap.Error(err)) + } + f.builder = &f.options.Configuration +} + +// Initialize implements storage.MetricsFactory +func (f *Factory) Initialize(logger *zap.Logger) error { + f.logger = logger + + services, err := f.builder.Build(logger) + if err != nil { + return fmt.Errorf("grpc-plugin builder failed to create a store: %w", err) + } + + f.metricsReader = services.MetricsReader + f.capabilities = services.Capabilities + logger.Info("External plugin storage configuration", zap.Any("configuration", f.options.Configuration)) + return nil +} + +// CreateMetricsReader implements storage.MetricsFactory +func (f *Factory) CreateMetricsReader() (metricsstore.Reader, error) { + if f.capabilities == nil { + return nil, storage.ErrMetricsStorageNotSupported + } + capabilities, err := f.capabilities.Capabilities() + if err != nil { + return nil, err + } + if capabilities == nil || !capabilities.MetricsReader { + return nil, storage.ErrMetricsStorageNotSupported + } + return f.metricsReader.MetricsReader(), nil +} + +// Close closes the resources held by the factory +func (f *Factory) Close() error { + return f.builder.Close() +} diff --git a/plugin/metrics/grpc/factory_test.go b/plugin/metrics/grpc/factory_test.go new file mode 100644 index 00000000000..91ae2337d28 --- /dev/null +++ b/plugin/metrics/grpc/factory_test.go @@ -0,0 +1,17 @@ +// Copyright (c) 2023 The Jaeger Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package grpc + +// TODO write tests diff --git a/plugin/metrics/grpc/options.go b/plugin/metrics/grpc/options.go new file mode 100644 index 00000000000..f1370e0d81d --- /dev/null +++ b/plugin/metrics/grpc/options.go @@ -0,0 +1,69 @@ +// Copyright (c) 2023 The Jaeger Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package grpc + +import ( + "flag" + "fmt" + "time" + + "github.com/spf13/viper" + + "github.com/jaegertracing/jaeger/pkg/config/tlscfg" + "github.com/jaegertracing/jaeger/pkg/tenancy" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/config" +) + +const ( + remotePrefix = "grpc-metrics" + remoteServer = remotePrefix + ".server" + remoteConnectionTimeout = remotePrefix + ".connection-timeout" + defaultConnectionTimeout = time.Duration(5 * time.Second) +) + +type Options struct { + Configuration config.Configuration `mapstructure:",squash"` +} + +func NewOptions() *Options { + return &Options{} +} + +func tlsFlagsConfig() tlscfg.ClientFlagsConfig { + return tlscfg.ClientFlagsConfig{ + Prefix: remotePrefix, + } +} + +// AddFlags adds flags for Options +func (opt *Options) AddFlags(flagSet *flag.FlagSet) { + tlsFlagsConfig().AddFlags(flagSet) + + flagSet.String(remoteServer, "", "The remote metrics gRPC server address as host:port") + flagSet.Duration(remoteConnectionTimeout, defaultConnectionTimeout, "The remote metrics gRPC server connection timeout") +} + +// InitFromViper initializes Options with properties from viper +func (opt *Options) InitFromViper(v *viper.Viper) error { + opt.Configuration.RemoteServerAddr = v.GetString(remoteServer) + var err error + opt.Configuration.RemoteTLS, err = tlsFlagsConfig().InitFromViper(v) + if err != nil { + return fmt.Errorf("failed to parse gRPC storage TLS options: %w", err) + } + opt.Configuration.RemoteConnectTimeout = v.GetDuration(remoteConnectionTimeout) + opt.Configuration.TenancyOpts = tenancy.InitFromViper(v) + return nil +} diff --git a/plugin/metrics/grpc/options_test.go b/plugin/metrics/grpc/options_test.go new file mode 100644 index 00000000000..91ae2337d28 --- /dev/null +++ b/plugin/metrics/grpc/options_test.go @@ -0,0 +1,17 @@ +// Copyright (c) 2023 The Jaeger Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package grpc + +// TODO write tests diff --git a/plugin/storage/grpc/config/config.go b/plugin/storage/grpc/config/config.go index c5cc8154a4f..47698dda700 100644 --- a/plugin/storage/grpc/config/config.go +++ b/plugin/storage/grpc/config/config.go @@ -118,6 +118,7 @@ func (c *Configuration) buildRemote(logger *zap.Logger) (*ClientPluginServices, Store: grpcClient, ArchiveStore: grpcClient, StreamingSpanWriter: grpcClient, + MetricsReader: grpcClient, }, Capabilities: grpcClient, }, nil diff --git a/plugin/storage/grpc/grpc.go b/plugin/storage/grpc/grpc.go index 09ffffcd399..fdcecee9687 100644 --- a/plugin/storage/grpc/grpc.go +++ b/plugin/storage/grpc/grpc.go @@ -38,6 +38,7 @@ func ServeWithGRPCServer(services *shared.PluginServices, grpcServer func([]grpc Impl: services.Store, ArchiveImpl: services.ArchiveStore, StreamImpl: services.StreamingSpanWriter, + MetricsImpl: services.MetricsReader, }, }, }, diff --git a/plugin/storage/grpc/shared/grpc_client.go b/plugin/storage/grpc/shared/grpc_client.go index 4d230cec9af..44d45c5e1d9 100644 --- a/plugin/storage/grpc/shared/grpc_client.go +++ b/plugin/storage/grpc/shared/grpc_client.go @@ -29,6 +29,7 @@ import ( "github.com/jaegertracing/jaeger/pkg/bearertoken" "github.com/jaegertracing/jaeger/proto-gen/storage_v1" "github.com/jaegertracing/jaeger/storage/dependencystore" + "github.com/jaegertracing/jaeger/storage/metricsstore" "github.com/jaegertracing/jaeger/storage/spanstore" ) @@ -38,6 +39,7 @@ const BearerTokenKey = "bearer.token" var ( _ StoragePlugin = (*grpcClient)(nil) _ ArchiveStoragePlugin = (*grpcClient)(nil) + _ MetricsReaderPlugin = (*grpcClient)(nil) _ PluginCapabilities = (*grpcClient)(nil) // upgradeContext composites several steps of upgrading context @@ -53,6 +55,7 @@ type grpcClient struct { capabilitiesClient storage_v1.PluginCapabilitiesClient depsReaderClient storage_v1.DependenciesReaderPluginClient streamWriterClient storage_v1.StreamingSpanWriterPluginClient + metricsReaderClient storage_v1.MetricsReaderPluginClient } func NewGRPCClient(c *grpc.ClientConn) *grpcClient { @@ -64,6 +67,7 @@ func NewGRPCClient(c *grpc.ClientConn) *grpcClient { capabilitiesClient: storage_v1.NewPluginCapabilitiesClient(c), depsReaderClient: storage_v1.NewDependenciesReaderPluginClient(c), streamWriterClient: storage_v1.NewStreamingSpanWriterPluginClient(c), + metricsReaderClient: storage_v1.NewMetricsReaderPluginClient(c), } } @@ -124,6 +128,10 @@ func (c *grpcClient) ArchiveSpanWriter() spanstore.Writer { return &archiveWriter{client: c.archiveWriterClient} } +func (c *grpcClient) MetricsReader() metricsstore.Reader { + return &metricsReader{client: c.metricsReaderClient} +} + // GetTrace takes a traceID and returns a Trace associated with that traceID func (c *grpcClient) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) { stream, err := c.readerClient.GetTrace(upgradeContext(ctx), &storage_v1.GetTraceRequest{ @@ -286,6 +294,7 @@ func (c *grpcClient) Capabilities() (*Capabilities, error) { ArchiveSpanReader: capabilities.ArchiveSpanReader, ArchiveSpanWriter: capabilities.ArchiveSpanWriter, StreamingSpanWriter: capabilities.StreamingSpanWriter, + MetricsReader: capabilities.MetricsReader, }, nil } diff --git a/plugin/storage/grpc/shared/grpc_handler.go b/plugin/storage/grpc/shared/grpc_handler.go index 32c1434d2ef..081e671594c 100644 --- a/plugin/storage/grpc/shared/grpc_handler.go +++ b/plugin/storage/grpc/shared/grpc_handler.go @@ -18,7 +18,9 @@ import ( "context" "fmt" "io" + "time" + "github.com/gogo/protobuf/types" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -26,6 +28,7 @@ import ( "github.com/jaegertracing/jaeger/model" "github.com/jaegertracing/jaeger/proto-gen/storage_v1" "github.com/jaegertracing/jaeger/storage/dependencystore" + "github.com/jaegertracing/jaeger/storage/metricsstore" "github.com/jaegertracing/jaeger/storage/spanstore" ) @@ -49,6 +52,8 @@ type GRPCHandlerStorageImpl struct { ArchiveSpanWriter func() spanstore.Writer StreamingSpanWriter func() spanstore.Writer + + MetricsReader func() metricsstore.Reader } // NewGRPCHandler creates a handler given individual storage implementations. @@ -61,6 +66,7 @@ func NewGRPCHandlerWithPlugins( mainImpl StoragePlugin, archiveImpl ArchiveStoragePlugin, streamImpl StreamingSpanWriterPlugin, + metricsImpl MetricsReaderPlugin, ) *GRPCHandler { impl := &GRPCHandlerStorageImpl{ SpanReader: mainImpl.SpanReader, @@ -70,6 +76,8 @@ func NewGRPCHandlerWithPlugins( ArchiveSpanReader: func() spanstore.Reader { return nil }, ArchiveSpanWriter: func() spanstore.Writer { return nil }, StreamingSpanWriter: func() spanstore.Writer { return nil }, + + MetricsReader: func() metricsstore.Reader { return nil }, } if archiveImpl != nil { impl.ArchiveSpanReader = archiveImpl.ArchiveSpanReader @@ -78,6 +86,9 @@ func NewGRPCHandlerWithPlugins( if streamImpl != nil { impl.StreamingSpanWriter = streamImpl.StreamingSpanWriter } + if metricsImpl != nil { + impl.MetricsReader = metricsImpl.MetricsReader + } return NewGRPCHandler(impl) } @@ -90,6 +101,7 @@ func (s *GRPCHandler) Register(ss *grpc.Server) error { storage_v1.RegisterPluginCapabilitiesServer(ss, s) storage_v1.RegisterDependenciesReaderPluginServer(ss, s) storage_v1.RegisterStreamingSpanWriterPluginServer(ss, s) + storage_v1.RegisterMetricsReaderPluginServer(ss, s) return nil } @@ -266,6 +278,7 @@ func (s *GRPCHandler) Capabilities(ctx context.Context, request *storage_v1.Capa ArchiveSpanReader: s.impl.ArchiveSpanReader() != nil, ArchiveSpanWriter: s.impl.ArchiveSpanWriter() != nil, StreamingSpanWriter: s.impl.StreamingSpanWriter() != nil, + MetricsReader: s.impl.MetricsReader() != nil, }, nil } @@ -301,3 +314,103 @@ func (s *GRPCHandler) WriteArchiveSpan(ctx context.Context, r *storage_v1.WriteS } return &storage_v1.WriteSpanResponse{}, nil } + +func (s *GRPCHandler) GetLatencies(ctx context.Context, request *storage_v1.GetLatenciesRequest) (*storage_v1.GetLatenciesResponse, error) { + reader := s.impl.MetricsReader() + if reader == nil { + return nil, status.Error(codes.Unimplemented, "not implemented") + } + params := &metricsstore.LatenciesQueryParameters{ + BaseQueryParameters: baseQueryParametersFromProto(request.BaseQueryParameters), + Quantile: float64(request.Quantile), + } + + mf, err := reader.GetLatencies(ctx, params) + if err != nil { + return nil, err + } + return &storage_v1.GetLatenciesResponse{ + MetricFamily: mf, + }, nil +} + +func (s *GRPCHandler) GetCallRates(ctx context.Context, request *storage_v1.GetCallRatesRequest) (*storage_v1.GetCallRatesResponse, error) { + reader := s.impl.MetricsReader() + if reader == nil { + return nil, status.Error(codes.Unimplemented, "not implemented") + } + params := &metricsstore.CallRateQueryParameters{ + BaseQueryParameters: baseQueryParametersFromProto(request.BaseQueryParameters), + } + + mf, err := reader.GetCallRates(ctx, params) + if err != nil { + return nil, err + } + return &storage_v1.GetCallRatesResponse{ + MetricFamily: mf, + }, nil +} + +func (s *GRPCHandler) GetErrorRates(ctx context.Context, request *storage_v1.GetErrorRatesRequest) (*storage_v1.GetErrorRatesResponse, error) { + reader := s.impl.MetricsReader() + if reader == nil { + return nil, status.Error(codes.Unimplemented, "not implemented") + } + params := &metricsstore.ErrorRateQueryParameters{ + BaseQueryParameters: baseQueryParametersFromProto(request.BaseQueryParameters), + } + + mf, err := reader.GetErrorRates(ctx, params) + if err != nil { + return nil, err + } + return &storage_v1.GetErrorRatesResponse{ + MetricFamily: mf, + }, nil +} + +func (s *GRPCHandler) GetMinStepDuration(ctx context.Context, _ *storage_v1.GetMinStepDurationRequest) (*storage_v1.GetMinStepDurationResponse, error) { + reader := s.impl.MetricsReader() + if reader == nil { + return nil, status.Error(codes.Unimplemented, "not implemented") + } + + minStep, err := reader.GetMinStepDuration(ctx, &metricsstore.MinStepDurationQueryParameters{}) + if err != nil { + return nil, err + } + return &storage_v1.GetMinStepDurationResponse{ + MinStep: &types.Duration{ + Seconds: int64(minStep / time.Second), + Nanos: int32(minStep % time.Second), + }, + }, nil +} + +func baseQueryParametersFromProto(proto *storage_v1.MetricsBaseQueryParameters) metricsstore.BaseQueryParameters { + pogo := metricsstore.BaseQueryParameters{ + ServiceNames: proto.ServiceNames, + GroupByOperation: proto.GroupByOperation, + SpanKinds: proto.SpanKinds, + } + + if proto.EndTime != nil { + endTime := time.Unix(proto.EndTime.Seconds, int64(proto.EndTime.Nanos)).UTC() + pogo.EndTime = &endTime + } + if proto.Lookback != nil { + lookback := time.Duration(proto.Lookback.Seconds)*time.Second + time.Duration(proto.Lookback.Nanos)*time.Nanosecond + pogo.Lookback = &lookback + } + if proto.Step != nil { + step := time.Duration(proto.Step.Seconds)*time.Second + time.Duration(proto.Step.Nanos)*time.Nanosecond + pogo.Step = &step + } + if proto.RatePer != nil { + ratePer := time.Duration(proto.RatePer.Seconds)*time.Second + time.Duration(proto.RatePer.Nanos)*time.Nanosecond + pogo.RatePer = &ratePer + } + + return pogo +} diff --git a/plugin/storage/grpc/shared/grpc_handler_test.go b/plugin/storage/grpc/shared/grpc_handler_test.go index 0ca6629f038..52325216c89 100644 --- a/plugin/storage/grpc/shared/grpc_handler_test.go +++ b/plugin/storage/grpc/shared/grpc_handler_test.go @@ -21,16 +21,20 @@ import ( "testing" "time" + "github.com/gogo/protobuf/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/proto-gen/api_v2/metrics" "github.com/jaegertracing/jaeger/proto-gen/storage_v1" grpcMocks "github.com/jaegertracing/jaeger/proto-gen/storage_v1/mocks" "github.com/jaegertracing/jaeger/storage/dependencystore" dependencyStoreMocks "github.com/jaegertracing/jaeger/storage/dependencystore/mocks" + "github.com/jaegertracing/jaeger/storage/metricsstore" + metricStoreMocks "github.com/jaegertracing/jaeger/storage/metricsstore/mocks" "github.com/jaegertracing/jaeger/storage/spanstore" spanStoreMocks "github.com/jaegertracing/jaeger/storage/spanstore/mocks" ) @@ -42,6 +46,7 @@ type mockStoragePlugin struct { archiveWriter *spanStoreMocks.Writer depsReader *dependencyStoreMocks.Reader streamWriter *spanStoreMocks.Writer + metricReader *metricStoreMocks.Reader } func (plugin *mockStoragePlugin) ArchiveSpanReader() spanstore.Reader { @@ -68,6 +73,10 @@ func (plugin *mockStoragePlugin) StreamingSpanWriter() spanstore.Writer { return plugin.streamWriter } +func (plugin *mockStoragePlugin) MetricsReader() metricsstore.Reader { + return plugin.metricReader +} + type grpcServerTest struct { server *GRPCHandler impl *mockStoragePlugin @@ -80,6 +89,7 @@ func withGRPCServer(fn func(r *grpcServerTest)) { archiveWriter := new(spanStoreMocks.Writer) depReader := new(dependencyStoreMocks.Reader) streamWriter := new(spanStoreMocks.Writer) + metricsReader := new(metricStoreMocks.Reader) impl := &mockStoragePlugin{ spanReader: spanReader, @@ -88,10 +98,11 @@ func withGRPCServer(fn func(r *grpcServerTest)) { archiveWriter: archiveWriter, depsReader: depReader, streamWriter: streamWriter, + metricReader: metricsReader, } r := &grpcServerTest{ - server: NewGRPCHandlerWithPlugins(impl, impl, impl), + server: NewGRPCHandlerWithPlugins(impl, impl, impl, impl), impl: impl, } fn(r) @@ -404,11 +415,144 @@ func TestGRPCServerWriteArchiveSpan_Error(t *testing.T) { }) } +func TestGRPCServerMetricsReader(t *testing.T) { + serviceNames := []string{"my_service_name"} + groupByOperation := true + endTime := time.Date(2023, time.May, 3, 11, 33, 30, 0, time.UTC) + lookback := time.Hour + step := time.Minute + ratePer := 10 * time.Minute + spanKinds := []string{"SPAN_KIND_SERVER"} + quantile := 0.5 + minStep := time.Second + + mf := &metrics.MetricFamily{ + Name: "service_operation_call_rate", + Type: metrics.MetricType_GAUGE, + Help: "calls/sec, grouped by service & operation", + Metrics: []*metrics.Metric{ + { + Labels: []*metrics.Label{{Name: "service_name", Value: "my_service_name"}, {Name: "operation_name", Value: "my_operation_name"}}, + MetricPoints: []*metrics.MetricPoint{{ + Value: &metrics.MetricPoint_GaugeValue{GaugeValue: &metrics.GaugeValue{Value: &metrics.GaugeValue_DoubleValue{DoubleValue: 42}}}, + Timestamp: &types.Timestamp{Seconds: 1683147612}, + }}, + }, + }, + } + + t.Run("GetLatencies", func(t *testing.T) { + withGRPCServer(func(r *grpcServerTest) { + r.impl.metricReader.On("GetLatencies", mock.Anything, &metricsstore.LatenciesQueryParameters{ + BaseQueryParameters: metricsstore.BaseQueryParameters{ + ServiceNames: serviceNames, + GroupByOperation: groupByOperation, + EndTime: &endTime, + Lookback: &lookback, + Step: &step, + RatePer: &ratePer, + SpanKinds: spanKinds, + }, + Quantile: quantile, + }). + Return(mf, nil) + + s, err := r.server.GetLatencies(context.Background(), &storage_v1.GetLatenciesRequest{ + BaseQueryParameters: &storage_v1.MetricsBaseQueryParameters{ + ServiceNames: serviceNames, + GroupByOperation: groupByOperation, + EndTime: &types.Timestamp{Seconds: endTime.Unix(), Nanos: int32(endTime.Nanosecond())}, + Lookback: &types.Duration{Seconds: int64(lookback.Seconds())}, + Step: &types.Duration{Seconds: int64(step.Seconds())}, + RatePer: &types.Duration{Seconds: int64(ratePer.Seconds())}, + SpanKinds: spanKinds, + }, + Quantile: float32(quantile), + }) + assert.NoError(t, err) + assert.Equal(t, &storage_v1.GetLatenciesResponse{MetricFamily: mf}, s) + }) + }) + + t.Run("GetCallRates", func(t *testing.T) { + withGRPCServer(func(r *grpcServerTest) { + r.impl.metricReader.On("GetCallRates", mock.Anything, &metricsstore.CallRateQueryParameters{ + BaseQueryParameters: metricsstore.BaseQueryParameters{ + ServiceNames: serviceNames, + GroupByOperation: groupByOperation, + EndTime: &endTime, + Lookback: &lookback, + Step: &step, + RatePer: &ratePer, + SpanKinds: spanKinds, + }, + }). + Return(mf, nil) + + s, err := r.server.GetCallRates(context.Background(), &storage_v1.GetCallRatesRequest{ + BaseQueryParameters: &storage_v1.MetricsBaseQueryParameters{ + ServiceNames: serviceNames, + GroupByOperation: groupByOperation, + EndTime: &types.Timestamp{Seconds: endTime.Unix(), Nanos: int32(endTime.Nanosecond())}, + Lookback: &types.Duration{Seconds: int64(lookback.Seconds())}, + Step: &types.Duration{Seconds: int64(step.Seconds())}, + RatePer: &types.Duration{Seconds: int64(ratePer.Seconds())}, + SpanKinds: spanKinds, + }, + }) + assert.NoError(t, err) + assert.Equal(t, &storage_v1.GetCallRatesResponse{MetricFamily: mf}, s) + }) + }) + + t.Run("GetErrorRates", func(t *testing.T) { + withGRPCServer(func(r *grpcServerTest) { + r.impl.metricReader.On("GetErrorRates", mock.Anything, &metricsstore.ErrorRateQueryParameters{ + BaseQueryParameters: metricsstore.BaseQueryParameters{ + ServiceNames: serviceNames, + GroupByOperation: groupByOperation, + EndTime: &endTime, + Lookback: &lookback, + Step: &step, + RatePer: &ratePer, + SpanKinds: spanKinds, + }, + }). + Return(mf, nil) + + s, err := r.server.GetErrorRates(context.Background(), &storage_v1.GetErrorRatesRequest{ + BaseQueryParameters: &storage_v1.MetricsBaseQueryParameters{ + ServiceNames: serviceNames, + GroupByOperation: groupByOperation, + EndTime: &types.Timestamp{Seconds: endTime.Unix(), Nanos: int32(endTime.Nanosecond())}, + Lookback: &types.Duration{Seconds: int64(lookback.Seconds())}, + Step: &types.Duration{Seconds: int64(step.Seconds())}, + RatePer: &types.Duration{Seconds: int64(ratePer.Seconds())}, + SpanKinds: spanKinds, + }, + }) + assert.NoError(t, err) + assert.Equal(t, &storage_v1.GetErrorRatesResponse{MetricFamily: mf}, s) + }) + }) + + t.Run("GetMinStepDuration", func(t *testing.T) { + withGRPCServer(func(r *grpcServerTest) { + r.impl.metricReader.On("GetMinStepDuration", mock.Anything, &metricsstore.MinStepDurationQueryParameters{}). + Return(minStep, nil) + + s, err := r.server.GetMinStepDuration(context.Background(), &storage_v1.GetMinStepDurationRequest{}) + assert.NoError(t, err) + assert.Equal(t, &storage_v1.GetMinStepDurationResponse{MinStep: &types.Duration{Seconds: int64(minStep.Seconds())}}, s) + }) + }) +} + func TestGRPCServerCapabilities(t *testing.T) { withGRPCServer(func(r *grpcServerTest) { capabilities, err := r.server.Capabilities(context.Background(), &storage_v1.CapabilitiesRequest{}) assert.NoError(t, err) - assert.Equal(t, &storage_v1.CapabilitiesResponse{ArchiveSpanReader: true, ArchiveSpanWriter: true, StreamingSpanWriter: true}, capabilities) + assert.Equal(t, &storage_v1.CapabilitiesResponse{ArchiveSpanReader: true, ArchiveSpanWriter: true, StreamingSpanWriter: true, MetricsReader: true}, capabilities) }) } @@ -423,6 +567,7 @@ func TestGRPCServerCapabilities_NoArchive(t *testing.T) { ArchiveSpanReader: false, ArchiveSpanWriter: false, StreamingSpanWriter: true, + MetricsReader: true, } assert.Equal(t, expected, capabilities) }) @@ -437,6 +582,22 @@ func TestGRPCServerCapabilities_NoStreamWriter(t *testing.T) { expected := &storage_v1.CapabilitiesResponse{ ArchiveSpanReader: true, ArchiveSpanWriter: true, + MetricsReader: true, + } + assert.Equal(t, expected, capabilities) + }) +} + +func TestGRPCServerCapabilities_NoMetricsReader(t *testing.T) { + withGRPCServer(func(r *grpcServerTest) { + r.server.impl.MetricsReader = func() metricsstore.Reader { return nil } + + capabilities, err := r.server.Capabilities(context.Background(), &storage_v1.CapabilitiesRequest{}) + assert.NoError(t, err) + expected := &storage_v1.CapabilitiesResponse{ + ArchiveSpanReader: true, + ArchiveSpanWriter: true, + StreamingSpanWriter: true, } assert.Equal(t, expected, capabilities) }) @@ -453,8 +614,9 @@ func TestNewGRPCHandlerWithPlugins_Nils(t *testing.T) { depsReader: depReader, } - handler := NewGRPCHandlerWithPlugins(impl, nil, nil) + handler := NewGRPCHandlerWithPlugins(impl, nil, nil, nil) assert.Nil(t, handler.impl.ArchiveSpanReader()) assert.Nil(t, handler.impl.ArchiveSpanWriter()) assert.Nil(t, handler.impl.StreamingSpanWriter()) + assert.Nil(t, handler.impl.MetricsReader()) } diff --git a/plugin/storage/grpc/shared/interface.go b/plugin/storage/grpc/shared/interface.go index c6345a29b82..e036de60de3 100644 --- a/plugin/storage/grpc/shared/interface.go +++ b/plugin/storage/grpc/shared/interface.go @@ -18,6 +18,7 @@ import ( "github.com/hashicorp/go-plugin" "github.com/jaegertracing/jaeger/storage/dependencystore" + "github.com/jaegertracing/jaeger/storage/metricsstore" "github.com/jaegertracing/jaeger/storage/spanstore" ) @@ -53,6 +54,10 @@ type StreamingSpanWriterPlugin interface { StreamingSpanWriter() spanstore.Writer } +type MetricsReaderPlugin interface { + MetricsReader() metricsstore.Reader +} + // PluginCapabilities allow expose plugin its capabilities. type PluginCapabilities interface { Capabilities() (*Capabilities, error) @@ -63,6 +68,7 @@ type Capabilities struct { ArchiveSpanReader bool ArchiveSpanWriter bool StreamingSpanWriter bool + MetricsReader bool } // PluginServices defines services plugin can expose @@ -70,4 +76,5 @@ type PluginServices struct { Store StoragePlugin ArchiveStore ArchiveStoragePlugin StreamingSpanWriter StreamingSpanWriterPlugin + MetricsReader MetricsReaderPlugin } diff --git a/plugin/storage/grpc/shared/metrics.go b/plugin/storage/grpc/shared/metrics.go new file mode 100644 index 00000000000..a9e3e87c3b9 --- /dev/null +++ b/plugin/storage/grpc/shared/metrics.go @@ -0,0 +1,106 @@ +// Copyright (c) 2023 The Jaeger Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package shared + +import ( + "context" + "time" + + "github.com/gogo/protobuf/types" + + "github.com/jaegertracing/jaeger/proto-gen/api_v2/metrics" + "github.com/jaegertracing/jaeger/proto-gen/storage_v1" + "github.com/jaegertracing/jaeger/storage/metricsstore" +) + +var _ metricsstore.Reader = (*metricsReader)(nil) + +type metricsReader struct { + client storage_v1.MetricsReaderPluginClient +} + +func (m *metricsReader) GetLatencies(ctx context.Context, params *metricsstore.LatenciesQueryParameters) (*metrics.MetricFamily, error) { + request := &storage_v1.GetLatenciesRequest{ + BaseQueryParameters: baseQueryParametersFromPogo(params.BaseQueryParameters), + Quantile: float32(params.Quantile), + } + + response, err := m.client.GetLatencies(upgradeContext(ctx), request) + if err != nil { + return nil, err + } + return response.MetricFamily, nil +} + +func (m *metricsReader) GetCallRates(ctx context.Context, params *metricsstore.CallRateQueryParameters) (*metrics.MetricFamily, error) { + request := &storage_v1.GetCallRatesRequest{ + BaseQueryParameters: baseQueryParametersFromPogo(params.BaseQueryParameters), + } + + response, err := m.client.GetCallRates(upgradeContext(ctx), request) + if err != nil { + return nil, err + } + return response.MetricFamily, nil +} + +func (m *metricsReader) GetErrorRates(ctx context.Context, params *metricsstore.ErrorRateQueryParameters) (*metrics.MetricFamily, error) { + request := &storage_v1.GetErrorRatesRequest{ + BaseQueryParameters: baseQueryParametersFromPogo(params.BaseQueryParameters), + } + + response, err := m.client.GetErrorRates(upgradeContext(ctx), request) + if err != nil { + return nil, err + } + return response.MetricFamily, nil +} + +func (m *metricsReader) GetMinStepDuration(ctx context.Context, params *metricsstore.MinStepDurationQueryParameters) (time.Duration, error) { + response, err := m.client.GetMinStepDuration(upgradeContext(ctx), &storage_v1.GetMinStepDurationRequest{}) + if err != nil { + return 0, err + } + + minStep := time.Second + if response.MinStep != nil { + minStep = time.Duration(response.MinStep.Seconds)*time.Second + time.Duration(response.MinStep.Nanos) + } + + return minStep, nil +} + +func baseQueryParametersFromPogo(pogo metricsstore.BaseQueryParameters) *storage_v1.MetricsBaseQueryParameters { + proto := &storage_v1.MetricsBaseQueryParameters{ + ServiceNames: pogo.ServiceNames, + GroupByOperation: pogo.GroupByOperation, + SpanKinds: pogo.SpanKinds, + } + + if pogo.EndTime != nil { + proto.EndTime = &types.Timestamp{Seconds: pogo.EndTime.Unix(), Nanos: int32(pogo.EndTime.Nanosecond())} + } + if pogo.Lookback != nil { + proto.Lookback = &types.Duration{Seconds: int64(*pogo.Lookback / time.Second), Nanos: int32(*pogo.Lookback % time.Second)} + } + if pogo.Step != nil { + proto.Step = &types.Duration{Seconds: int64(*pogo.Step / time.Second), Nanos: int32(*pogo.Step % time.Second)} + } + if pogo.RatePer != nil { + proto.RatePer = &types.Duration{Seconds: int64(*pogo.RatePer / time.Second), Nanos: int32(*pogo.RatePer % time.Second)} + } + + return proto +} diff --git a/plugin/storage/grpc/shared/metrics_test.go b/plugin/storage/grpc/shared/metrics_test.go new file mode 100644 index 00000000000..a8192305a52 --- /dev/null +++ b/plugin/storage/grpc/shared/metrics_test.go @@ -0,0 +1,17 @@ +// Copyright (c) 2023 The Jaeger Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package shared + +// TODO write tests diff --git a/plugin/storage/grpc/shared/plugin.go b/plugin/storage/grpc/shared/plugin.go index b4a3fabf93e..323ac5b2d09 100644 --- a/plugin/storage/grpc/shared/plugin.go +++ b/plugin/storage/grpc/shared/plugin.go @@ -34,11 +34,12 @@ type StorageGRPCPlugin struct { Impl StoragePlugin ArchiveImpl ArchiveStoragePlugin StreamImpl StreamingSpanWriterPlugin + MetricsImpl MetricsReaderPlugin } // RegisterHandlers registers the plugin with the server func (p *StorageGRPCPlugin) RegisterHandlers(s *grpc.Server) error { - handler := NewGRPCHandlerWithPlugins(p.Impl, p.ArchiveImpl, p.StreamImpl) + handler := NewGRPCHandlerWithPlugins(p.Impl, p.ArchiveImpl, p.StreamImpl, p.MetricsImpl) return handler.Register(s) } diff --git a/storage/factory.go b/storage/factory.go index f6d3394840b..11aa52977f2 100644 --- a/storage/factory.go +++ b/storage/factory.go @@ -75,6 +75,9 @@ type ArchiveFactory interface { CreateArchiveSpanWriter() (spanstore.Writer, error) } +// ErrMetricsStorageNotSupported can be returned by the MetricsFactory when the metrics storage is not supported by the backend. +var ErrMetricsStorageNotSupported = errors.New("metrics storage not supported") + // MetricsFactory defines an interface for a factory that can create implementations of different metrics storage components. // Implementations are also encouraged to implement plugin.Configurable interface. //