From 9e168f823a9a15c506fca3540e932e3a59ce1bab Mon Sep 17 00:00:00 2001 From: Olivier Boucher Date: Sat, 24 Nov 2018 14:38:45 -0500 Subject: [PATCH 01/11] Add New Storage Plugin Framework Still a work in progress. Related to issue #422. Leverages Hashicorp's go-plugin. New set of protos for the use of plugin maintainers. Missing tests. Still need to create a plugin binary for the memory backend. Signed-off-by: Olivier Boucher --- .editorconfig | 4 + pkg/external/config/config.go | 20 + plugin/storage/external/factory.go | 75 + plugin/storage/external/options.go | 38 + plugin/storage/external/plugin.go | 91 ++ plugin/storage/external/proto/model.pb.go | 547 ++++++++ plugin/storage/external/proto/model.proto | 90 ++ plugin/storage/external/proto/storage.pb.go | 1387 +++++++++++++++++++ plugin/storage/external/proto/storage.proto | 176 +++ plugin/storage/external/shared/grpc.go | 274 ++++ plugin/storage/external/shared/interface.go | 64 + plugin/storage/external/shared/mapping.go | 420 ++++++ plugin/storage/factory.go | 6 + 13 files changed, 3192 insertions(+) create mode 100644 .editorconfig create mode 100644 pkg/external/config/config.go create mode 100644 plugin/storage/external/factory.go create mode 100644 plugin/storage/external/options.go create mode 100644 plugin/storage/external/plugin.go create mode 100644 plugin/storage/external/proto/model.pb.go create mode 100644 plugin/storage/external/proto/model.proto create mode 100644 plugin/storage/external/proto/storage.pb.go create mode 100644 plugin/storage/external/proto/storage.proto create mode 100644 plugin/storage/external/shared/grpc.go create mode 100644 plugin/storage/external/shared/interface.go create mode 100644 plugin/storage/external/shared/mapping.go diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..2c594af82c0 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +# Override for Makefile +[{Makefile, makefile, GNUmakefile}] +indent_style = tab +indent_size = 4 \ No newline at end of file diff --git a/pkg/external/config/config.go b/pkg/external/config/config.go new file mode 100644 index 00000000000..99333b14c28 --- /dev/null +++ b/pkg/external/config/config.go @@ -0,0 +1,20 @@ +// Copyright (c) 2018 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 config + +// Configuration describes the options to customize the storage behavior +type Configuration struct { + PluginBinary string `yaml:"plugin-binary"` +} diff --git a/plugin/storage/external/factory.go b/plugin/storage/external/factory.go new file mode 100644 index 00000000000..c820df1e549 --- /dev/null +++ b/plugin/storage/external/factory.go @@ -0,0 +1,75 @@ +// Copyright (c) 2018 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 external + +import ( + "flag" + + "github.com/spf13/viper" + "github.com/uber/jaeger-lib/metrics" + "go.uber.org/zap" + + "github.com/jaegertracing/jaeger/storage/dependencystore" + "github.com/jaegertracing/jaeger/storage/spanstore" +) + +type Factory struct { + options Options + metricsFactory metrics.Factory + logger *zap.Logger + store *Store +} + +// 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) { + f.options.InitFromViper(v) +} + +// Initialize implements storage.Factory +func (f *Factory) Initialize(metricsFactory metrics.Factory, logger *zap.Logger) error { + f.metricsFactory, f.logger = metricsFactory, logger + store, err := WithConfiguration(f.options.Configuration) + if err != nil { + return err + } + f.store = store + logger.Info("External plugin storage configuration", zap.Any("configuration", f.store.config)) + return nil +} + +// CreateSpanReader implements storage.Factory +func (f *Factory) CreateSpanReader() (spanstore.Reader, error) { + return f.store, nil +} + +// CreateSpanWriter implements storage.Factory +func (f *Factory) CreateSpanWriter() (spanstore.Writer, error) { + return f.store, nil +} + +// CreateDependencyReader implements storage.Factory +func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error) { + return f.store, nil +} diff --git a/plugin/storage/external/options.go b/plugin/storage/external/options.go new file mode 100644 index 00000000000..5756ed3722d --- /dev/null +++ b/plugin/storage/external/options.go @@ -0,0 +1,38 @@ +// Copyright (c) 2018 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 external + +import ( + "flag" + + "github.com/spf13/viper" + + "github.com/jaegertracing/jaeger/pkg/external/config" +) + +const pluginBinary = "external.plugin-binary" + +type Options struct { + Configuration config.Configuration +} + +func (opt *Options) AddFlags(flagSet *flag.FlagSet) { + flagSet.String(pluginBinary, opt.Configuration.PluginBinary, "The location of the plugin binary") + +} + +func (opt *Options) InitFromViper(v *viper.Viper) { + opt.Configuration.PluginBinary = v.GetString(pluginBinary) +} diff --git a/plugin/storage/external/plugin.go b/plugin/storage/external/plugin.go new file mode 100644 index 00000000000..713091ce6f0 --- /dev/null +++ b/plugin/storage/external/plugin.go @@ -0,0 +1,91 @@ +// Copyright (c) 2018 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 external + +import ( + "context" + "fmt" + "os/exec" + "time" + + "github.com/hashicorp/go-plugin" + + "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/pkg/external/config" + "github.com/jaegertracing/jaeger/plugin/storage/external/shared" + "github.com/jaegertracing/jaeger/storage/spanstore" +) + +type Store struct { + config config.Configuration + + plugin shared.StoragePlugin +} + +// WithConfiguration creates a new plugin given the provided configuration +func WithConfiguration(configuration config.Configuration) (*Store, error) { + client := plugin.NewClient(&plugin.ClientConfig{ + HandshakeConfig: shared.Handshake, + VersionedPlugins: map[int]plugin.PluginSet{ + 18: shared.PluginMap, + }, + Cmd: exec.Command("sh", "-c", configuration.PluginBinary), + AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC}, + }) + + rpcClient, err := client.Client() + if err != nil { + return nil, fmt.Errorf("error attempting to connect to plugin rpc client: %s", err) + } + + raw, err := rpcClient.Dispense(shared.StoragePluginIdentifier) + if err != nil { + return nil, fmt.Errorf("unable to retrieve storage plugin instance: %s", err) + } + + storagePlugin, ok := raw.(shared.StoragePlugin) + if !ok { + return nil, fmt.Errorf("unexpected type for plugin \"%s\"", shared.StoragePluginIdentifier) + } + + return &Store{ + config: configuration, + plugin: storagePlugin, + }, nil +} + +func (s *Store) WriteSpan(span *model.Span) error { + return s.plugin.WriteSpan(span) +} + +func (s *Store) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) { + return s.plugin.GetTrace(ctx, traceID) +} + +func (s *Store) GetServices(ctx context.Context) ([]string, error) { + return s.plugin.GetServices(ctx) +} + +func (s *Store) GetOperations(ctx context.Context, service string) ([]string, error) { + return s.plugin.GetOperations(ctx, service) +} + +func (s *Store) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error) { + return s.plugin.FindTraces(ctx, query) +} + +func (s *Store) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { + return s.plugin.GetDependencies(endTs, lookback) +} diff --git a/plugin/storage/external/proto/model.pb.go b/plugin/storage/external/proto/model.pb.go new file mode 100644 index 00000000000..40d4d6a3490 --- /dev/null +++ b/plugin/storage/external/proto/model.pb.go @@ -0,0 +1,547 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: model.proto + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type SpanRefType int32 + +const ( + SpanRefType_SpanRefType_CHILD_OF SpanRefType = 0 + SpanRefType_SpanRefType_FOLLOWS_FROM SpanRefType = 1 +) + +var SpanRefType_name = map[int32]string{ + 0: "SpanRefType_CHILD_OF", + 1: "SpanRefType_FOLLOWS_FROM", +} +var SpanRefType_value = map[string]int32{ + "SpanRefType_CHILD_OF": 0, + "SpanRefType_FOLLOWS_FROM": 1, +} + +func (x SpanRefType) String() string { + return proto1.EnumName(SpanRefType_name, int32(x)) +} +func (SpanRefType) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } + +type ValueType int32 + +const ( + ValueType_ValueType_STRING ValueType = 0 + ValueType_ValueType_BOOL ValueType = 1 + ValueType_ValueType_INT64 ValueType = 2 + ValueType_ValueType_FLOAT64 ValueType = 3 + ValueType_ValueType_BINARY ValueType = 4 +) + +var ValueType_name = map[int32]string{ + 0: "ValueType_STRING", + 1: "ValueType_BOOL", + 2: "ValueType_INT64", + 3: "ValueType_FLOAT64", + 4: "ValueType_BINARY", +} +var ValueType_value = map[string]int32{ + "ValueType_STRING": 0, + "ValueType_BOOL": 1, + "ValueType_INT64": 2, + "ValueType_FLOAT64": 3, + "ValueType_BINARY": 4, +} + +func (x ValueType) String() string { + return proto1.EnumName(ValueType_name, int32(x)) +} +func (ValueType) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } + +type DependencyLink struct { + Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"` + Child string `protobuf:"bytes,2,opt,name=child" json:"child,omitempty"` + CallCount uint64 `protobuf:"varint,3,opt,name=call_count,json=callCount" json:"call_count,omitempty"` +} + +func (m *DependencyLink) Reset() { *m = DependencyLink{} } +func (m *DependencyLink) String() string { return proto1.CompactTextString(m) } +func (*DependencyLink) ProtoMessage() {} +func (*DependencyLink) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } + +func (m *DependencyLink) GetParent() string { + if m != nil { + return m.Parent + } + return "" +} + +func (m *DependencyLink) GetChild() string { + if m != nil { + return m.Child + } + return "" +} + +func (m *DependencyLink) GetCallCount() uint64 { + if m != nil { + return m.CallCount + } + return 0 +} + +type TraceId struct { + Low uint64 `protobuf:"varint,1,opt,name=low" json:"low,omitempty"` + High uint64 `protobuf:"varint,2,opt,name=high" json:"high,omitempty"` +} + +func (m *TraceId) Reset() { *m = TraceId{} } +func (m *TraceId) String() string { return proto1.CompactTextString(m) } +func (*TraceId) ProtoMessage() {} +func (*TraceId) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } + +func (m *TraceId) GetLow() uint64 { + if m != nil { + return m.Low + } + return 0 +} + +func (m *TraceId) GetHigh() uint64 { + if m != nil { + return m.High + } + return 0 +} + +type SpanRef struct { + TraceId *TraceId `protobuf:"bytes,1,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"` + SpanId uint64 `protobuf:"varint,2,opt,name=span_id,json=spanId" json:"span_id,omitempty"` + RefType SpanRefType `protobuf:"varint,3,opt,name=ref_type,json=refType,enum=proto.SpanRefType" json:"ref_type,omitempty"` +} + +func (m *SpanRef) Reset() { *m = SpanRef{} } +func (m *SpanRef) String() string { return proto1.CompactTextString(m) } +func (*SpanRef) ProtoMessage() {} +func (*SpanRef) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} } + +func (m *SpanRef) GetTraceId() *TraceId { + if m != nil { + return m.TraceId + } + return nil +} + +func (m *SpanRef) GetSpanId() uint64 { + if m != nil { + return m.SpanId + } + return 0 +} + +func (m *SpanRef) GetRefType() SpanRefType { + if m != nil { + return m.RefType + } + return SpanRefType_SpanRefType_CHILD_OF +} + +type KeyValue struct { + Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` + ValueType ValueType `protobuf:"varint,2,opt,name=value_type,json=valueType,enum=proto.ValueType" json:"value_type,omitempty"` + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` + BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue" json:"bool_value,omitempty"` + Int64Value int64 `protobuf:"varint,5,opt,name=int64_value,json=int64Value" json:"int64_value,omitempty"` + Float64Value float64 `protobuf:"fixed64,6,opt,name=float64_value,json=float64Value" json:"float64_value,omitempty"` + BinaryValue []byte `protobuf:"bytes,7,opt,name=binary_value,json=binaryValue,proto3" json:"binary_value,omitempty"` +} + +func (m *KeyValue) Reset() { *m = KeyValue{} } +func (m *KeyValue) String() string { return proto1.CompactTextString(m) } +func (*KeyValue) ProtoMessage() {} +func (*KeyValue) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} } + +func (m *KeyValue) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *KeyValue) GetValueType() ValueType { + if m != nil { + return m.ValueType + } + return ValueType_ValueType_STRING +} + +func (m *KeyValue) GetStringValue() string { + if m != nil { + return m.StringValue + } + return "" +} + +func (m *KeyValue) GetBoolValue() bool { + if m != nil { + return m.BoolValue + } + return false +} + +func (m *KeyValue) GetInt64Value() int64 { + if m != nil { + return m.Int64Value + } + return 0 +} + +func (m *KeyValue) GetFloat64Value() float64 { + if m != nil { + return m.Float64Value + } + return 0 +} + +func (m *KeyValue) GetBinaryValue() []byte { + if m != nil { + return m.BinaryValue + } + return nil +} + +type Log struct { + Timestamp *Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"` + Fields []*KeyValue `protobuf:"bytes,2,rep,name=fields" json:"fields,omitempty"` +} + +func (m *Log) Reset() { *m = Log{} } +func (m *Log) String() string { return proto1.CompactTextString(m) } +func (*Log) ProtoMessage() {} +func (*Log) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} } + +func (m *Log) GetTimestamp() *Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *Log) GetFields() []*KeyValue { + if m != nil { + return m.Fields + } + return nil +} + +type Process struct { + ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName" json:"service_name,omitempty"` + Tags []*KeyValue `protobuf:"bytes,2,rep,name=tags" json:"tags,omitempty"` +} + +func (m *Process) Reset() { *m = Process{} } +func (m *Process) String() string { return proto1.CompactTextString(m) } +func (*Process) ProtoMessage() {} +func (*Process) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} } + +func (m *Process) GetServiceName() string { + if m != nil { + return m.ServiceName + } + return "" +} + +func (m *Process) GetTags() []*KeyValue { + if m != nil { + return m.Tags + } + return nil +} + +type TraceProcessMapping struct { + ProcessId string `protobuf:"bytes,1,opt,name=process_id,json=processId" json:"process_id,omitempty"` + Process *Process `protobuf:"bytes,2,opt,name=process" json:"process,omitempty"` +} + +func (m *TraceProcessMapping) Reset() { *m = TraceProcessMapping{} } +func (m *TraceProcessMapping) String() string { return proto1.CompactTextString(m) } +func (*TraceProcessMapping) ProtoMessage() {} +func (*TraceProcessMapping) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} } + +func (m *TraceProcessMapping) GetProcessId() string { + if m != nil { + return m.ProcessId + } + return "" +} + +func (m *TraceProcessMapping) GetProcess() *Process { + if m != nil { + return m.Process + } + return nil +} + +type Span struct { + TraceId *TraceId `protobuf:"bytes,1,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"` + SpanId uint64 `protobuf:"varint,2,opt,name=span_id,json=spanId" json:"span_id,omitempty"` + OperationName string `protobuf:"bytes,3,opt,name=operation_name,json=operationName" json:"operation_name,omitempty"` + References []*SpanRef `protobuf:"bytes,4,rep,name=references" json:"references,omitempty"` + Flags uint32 `protobuf:"varint,5,opt,name=flags" json:"flags,omitempty"` + StartTime *Timestamp `protobuf:"bytes,6,opt,name=start_time,json=startTime" json:"start_time,omitempty"` + Duration *Duration `protobuf:"bytes,7,opt,name=duration" json:"duration,omitempty"` + Tags []*KeyValue `protobuf:"bytes,8,rep,name=tags" json:"tags,omitempty"` + Logs []*Log `protobuf:"bytes,9,rep,name=logs" json:"logs,omitempty"` + Process *Process `protobuf:"bytes,10,opt,name=process" json:"process,omitempty"` + ProcessId string `protobuf:"bytes,11,opt,name=process_id,json=processId" json:"process_id,omitempty"` + Warnings []string `protobuf:"bytes,12,rep,name=warnings" json:"warnings,omitempty"` +} + +func (m *Span) Reset() { *m = Span{} } +func (m *Span) String() string { return proto1.CompactTextString(m) } +func (*Span) ProtoMessage() {} +func (*Span) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} } + +func (m *Span) GetTraceId() *TraceId { + if m != nil { + return m.TraceId + } + return nil +} + +func (m *Span) GetSpanId() uint64 { + if m != nil { + return m.SpanId + } + return 0 +} + +func (m *Span) GetOperationName() string { + if m != nil { + return m.OperationName + } + return "" +} + +func (m *Span) GetReferences() []*SpanRef { + if m != nil { + return m.References + } + return nil +} + +func (m *Span) GetFlags() uint32 { + if m != nil { + return m.Flags + } + return 0 +} + +func (m *Span) GetStartTime() *Timestamp { + if m != nil { + return m.StartTime + } + return nil +} + +func (m *Span) GetDuration() *Duration { + if m != nil { + return m.Duration + } + return nil +} + +func (m *Span) GetTags() []*KeyValue { + if m != nil { + return m.Tags + } + return nil +} + +func (m *Span) GetLogs() []*Log { + if m != nil { + return m.Logs + } + return nil +} + +func (m *Span) GetProcess() *Process { + if m != nil { + return m.Process + } + return nil +} + +func (m *Span) GetProcessId() string { + if m != nil { + return m.ProcessId + } + return "" +} + +func (m *Span) GetWarnings() []string { + if m != nil { + return m.Warnings + } + return nil +} + +type Trace struct { + Spans []*Span `protobuf:"bytes,1,rep,name=spans" json:"spans,omitempty"` + ProcessMap []*TraceProcessMapping `protobuf:"bytes,2,rep,name=process_map,json=processMap" json:"process_map,omitempty"` + Warnings []string `protobuf:"bytes,3,rep,name=warnings" json:"warnings,omitempty"` +} + +func (m *Trace) Reset() { *m = Trace{} } +func (m *Trace) String() string { return proto1.CompactTextString(m) } +func (*Trace) ProtoMessage() {} +func (*Trace) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} } + +func (m *Trace) GetSpans() []*Span { + if m != nil { + return m.Spans + } + return nil +} + +func (m *Trace) GetProcessMap() []*TraceProcessMapping { + if m != nil { + return m.ProcessMap + } + return nil +} + +func (m *Trace) GetWarnings() []string { + if m != nil { + return m.Warnings + } + return nil +} + +// NOTE(olivierboucher): would rather use google's wrappers but given the current context its easier +type Timestamp struct { + Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` + Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` +} + +func (m *Timestamp) Reset() { *m = Timestamp{} } +func (m *Timestamp) String() string { return proto1.CompactTextString(m) } +func (*Timestamp) ProtoMessage() {} +func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{9} } + +func (m *Timestamp) GetSeconds() int64 { + if m != nil { + return m.Seconds + } + return 0 +} + +func (m *Timestamp) GetNanos() int32 { + if m != nil { + return m.Nanos + } + return 0 +} + +// NOTE(olivierboucher): would rather use google's wrappers but given the current context its easier +type Duration struct { + Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` + Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` +} + +func (m *Duration) Reset() { *m = Duration{} } +func (m *Duration) String() string { return proto1.CompactTextString(m) } +func (*Duration) ProtoMessage() {} +func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{10} } + +func (m *Duration) GetSeconds() int64 { + if m != nil { + return m.Seconds + } + return 0 +} + +func (m *Duration) GetNanos() int32 { + if m != nil { + return m.Nanos + } + return 0 +} + +func init() { + proto1.RegisterType((*DependencyLink)(nil), "proto.DependencyLink") + proto1.RegisterType((*TraceId)(nil), "proto.TraceId") + proto1.RegisterType((*SpanRef)(nil), "proto.SpanRef") + proto1.RegisterType((*KeyValue)(nil), "proto.KeyValue") + proto1.RegisterType((*Log)(nil), "proto.Log") + proto1.RegisterType((*Process)(nil), "proto.Process") + proto1.RegisterType((*TraceProcessMapping)(nil), "proto.TraceProcessMapping") + proto1.RegisterType((*Span)(nil), "proto.Span") + proto1.RegisterType((*Trace)(nil), "proto.Trace") + proto1.RegisterType((*Timestamp)(nil), "proto.Timestamp") + proto1.RegisterType((*Duration)(nil), "proto.Duration") + proto1.RegisterEnum("proto.SpanRefType", SpanRefType_name, SpanRefType_value) + proto1.RegisterEnum("proto.ValueType", ValueType_name, ValueType_value) +} + +func init() { proto1.RegisterFile("model.proto", fileDescriptor1) } + +var fileDescriptor1 = []byte{ + // 814 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x5d, 0x6f, 0xdc, 0x44, + 0x14, 0xad, 0x63, 0xef, 0xda, 0xbe, 0xde, 0x6c, 0xcd, 0x34, 0x80, 0x55, 0x51, 0x70, 0x8c, 0x10, + 0xa6, 0x88, 0x54, 0x0a, 0x55, 0x1f, 0xe8, 0x53, 0xdb, 0xb0, 0xb0, 0xc2, 0xd9, 0x85, 0xc9, 0x0a, + 0xc4, 0x03, 0xb5, 0x26, 0xf6, 0xac, 0x63, 0xd5, 0x3b, 0x63, 0xd9, 0x4e, 0xa2, 0x95, 0x78, 0xe3, + 0x87, 0xf1, 0xb7, 0x78, 0x44, 0xf3, 0xe1, 0xfd, 0x88, 0x20, 0x12, 0x12, 0x4f, 0x99, 0x7b, 0xee, + 0x99, 0xe3, 0x3b, 0xf7, 0x9c, 0x2c, 0x78, 0x2b, 0x9e, 0xd3, 0xea, 0xa4, 0x6e, 0x78, 0xc7, 0xd1, + 0x40, 0xfe, 0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71, 0xb1, 0xab, 0x91, 0x69, 0x8e, 0x62, 0xb0, 0x75, 0x21, 0x1d, 0xdc, 0xa6, 0x4a, 0xcb, + 0xe0, 0xbe, 0x1d, 0xfd, 0x69, 0x82, 0x25, 0x62, 0xf2, 0xbf, 0x24, 0xf1, 0x33, 0x18, 0xf3, 0x9a, + 0x36, 0xa4, 0x2b, 0x39, 0x53, 0xcf, 0x56, 0x61, 0x38, 0xdc, 0xa0, 0xf2, 0xe1, 0x27, 0x00, 0x0d, + 0x5d, 0xd2, 0x86, 0xb2, 0x8c, 0xb6, 0x81, 0x25, 0x9f, 0x3f, 0xde, 0x8f, 0x2c, 0xde, 0x61, 0x88, + 0xff, 0xca, 0x65, 0x25, 0x36, 0x25, 0x92, 0x71, 0x88, 0x55, 0x21, 0x82, 0xda, 0x76, 0xa4, 0xe9, + 0x52, 0x61, 0x94, 0x4c, 0xc4, 0x3f, 0xda, 0x28, 0x39, 0xa2, 0x46, 0x5f, 0x82, 0x93, 0x5f, 0xab, + 0x31, 0x64, 0x38, 0xb6, 0x3b, 0x3f, 0xd3, 0x30, 0xde, 0x10, 0x36, 0xe6, 0x38, 0xf7, 0x98, 0x83, + 0x3e, 0x06, 0xab, 0xe2, 0x45, 0x1b, 0xb8, 0x92, 0x04, 0x9a, 0x94, 0xf0, 0x02, 0x4b, 0x7c, 0xd7, + 0x06, 0xb8, 0xd7, 0x86, 0x3b, 0x7e, 0x7a, 0x77, 0xfd, 0x7c, 0x0c, 0xce, 0x2d, 0x69, 0x58, 0xc9, + 0x8a, 0x36, 0x18, 0x85, 0x66, 0xec, 0xe2, 0x4d, 0x1d, 0xfd, 0x61, 0xc0, 0x40, 0x5a, 0x84, 0x8e, + 0x61, 0x20, 0x8c, 0x68, 0x03, 0x43, 0xce, 0xe3, 0xed, 0xae, 0x54, 0x75, 0xd0, 0x4b, 0xf0, 0xfa, + 0xef, 0xac, 0x48, 0xad, 0xa3, 0xf7, 0x78, 0xd7, 0xe8, 0xfd, 0xa0, 0xe1, 0x7e, 0xac, 0x73, 0x52, + 0xef, 0x4d, 0x61, 0xde, 0x99, 0xe2, 0x25, 0xb8, 0x9b, 0xa5, 0xa3, 0x00, 0xec, 0x96, 0x66, 0x9c, + 0xe5, 0xad, 0x8c, 0x92, 0x89, 0xfb, 0x52, 0x58, 0xc9, 0x08, 0xe3, 0x2a, 0x96, 0x03, 0xac, 0x8a, + 0xe8, 0x1b, 0x70, 0x7a, 0x0b, 0xfe, 0xeb, 0xdd, 0xa7, 0xdf, 0x82, 0xb7, 0xf3, 0x33, 0x87, 0x02, + 0x38, 0xda, 0x29, 0xd3, 0x37, 0xdf, 0x4f, 0x93, 0xb3, 0x74, 0x3e, 0xf1, 0x1f, 0xa0, 0x8f, 0x20, + 0xd8, 0xed, 0x4c, 0xe6, 0x49, 0x32, 0xff, 0xe5, 0x22, 0x9d, 0xe0, 0xf9, 0xb9, 0x6f, 0x3c, 0xbd, + 0x05, 0x77, 0xf3, 0xeb, 0x86, 0x8e, 0xc0, 0xdf, 0x14, 0xe9, 0xc5, 0x02, 0x4f, 0x67, 0xdf, 0xf9, + 0x0f, 0x10, 0x82, 0xf1, 0x16, 0x7d, 0x3d, 0x9f, 0x27, 0xbe, 0x81, 0x1e, 0xc1, 0xc3, 0x2d, 0x36, + 0x9d, 0x2d, 0x5e, 0x3c, 0xf7, 0x0f, 0xd0, 0xfb, 0xf0, 0xde, 0x16, 0x9c, 0x24, 0xf3, 0x57, 0x02, + 0x36, 0xf7, 0x55, 0x5f, 0x4f, 0x67, 0xaf, 0xf0, 0xaf, 0xbe, 0x75, 0x39, 0x94, 0xbb, 0xff, 0xfa, + 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x21, 0xa8, 0x9a, 0x4f, 0xb9, 0x06, 0x00, 0x00, +} diff --git a/plugin/storage/external/proto/model.proto b/plugin/storage/external/proto/model.proto new file mode 100644 index 00000000000..0ddc5990adb --- /dev/null +++ b/plugin/storage/external/proto/model.proto @@ -0,0 +1,90 @@ +syntax = "proto3"; +package proto; + +message DependencyLink { + string parent = 1; + string child = 2; + uint64 call_count = 3; +} + +message TraceId { + uint64 low = 1; + uint64 high = 2; +} + +message SpanRef { + TraceId trace_id = 1; + uint64 span_id = 2; + SpanRefType ref_type = 3; +} + +message KeyValue { + string key = 1; + ValueType value_type = 2; + string string_value = 3; + bool bool_value = 4; + int64 int64_value = 5; + double float64_value = 6; + bytes binary_value = 7; +} + +message Log { + Timestamp timestamp = 1; + repeated KeyValue fields = 2; +} + +message Process { + string service_name = 1; + repeated KeyValue tags = 2; +} + +message TraceProcessMapping { + string process_id = 1; + Process process = 2; +} + +message Span { + TraceId trace_id = 1; + uint64 span_id = 2; + string operation_name = 3; + repeated SpanRef references = 4; + uint32 flags = 5; + Timestamp start_time = 6; + Duration duration = 7; + repeated KeyValue tags = 8; + repeated Log logs = 9; + Process process = 10; + string process_id = 11; + repeated string warnings = 12; +} + +message Trace { + repeated Span spans = 1; + repeated TraceProcessMapping process_map = 2; + repeated string warnings = 3; +} + +//NOTE(olivierboucher): would rather use google's wrappers but given the current context its easier +message Timestamp { + int64 seconds = 1; + int32 nanos = 2; +} + +//NOTE(olivierboucher): would rather use google's wrappers but given the current context its easier +message Duration { + int64 seconds = 1; + int32 nanos = 2; +} + +enum SpanRefType { + SpanRefType_CHILD_OF = 0; + SpanRefType_FOLLOWS_FROM = 1; +} + +enum ValueType { + ValueType_STRING = 0; + ValueType_BOOL = 1; + ValueType_INT64 = 2; + ValueType_FLOAT64 = 3; + ValueType_BINARY = 4; +} \ No newline at end of file diff --git a/plugin/storage/external/proto/storage.pb.go b/plugin/storage/external/proto/storage.pb.go new file mode 100644 index 00000000000..972d7bb6fa8 --- /dev/null +++ b/plugin/storage/external/proto/storage.pb.go @@ -0,0 +1,1387 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. + +// Copyright (c) 2018 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. + +// source: storage.proto + +/* +Package proto is a generated protocol buffer package. + +It is generated from these files: + storage.proto + model.proto + +It has these top-level messages: + GetDependenciesRequest + GetDependenciesSuccess + GetDependenciesResponse + WriteSpanRequest + WriteSpanResponse + GetTraceRequest + GetTraceSuccess + GetTraceResponse + GetServicesRequest + GetServicesSuccess + GetServicesResponse + GetOperationsRequest + GetOperationsSuccess + GetOperationsResponse + FindTracesRequest + FindTracesSuccess + FindTracesResponse + EmptyResponse + StoragePluginError + DependencyLink + TraceId + SpanRef + KeyValue + Log + Process + TraceProcessMapping + Span + Trace + Timestamp + Duration +*/ +package proto + +import proto1 "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto1.ProtoPackageIsVersion2 // please upgrade the proto package + +type GetDependenciesRequest struct { + EndTimestamp *Timestamp `protobuf:"bytes,1,opt,name=end_timestamp,json=endTimestamp" json:"end_timestamp,omitempty"` + Lookback *Duration `protobuf:"bytes,2,opt,name=lookback" json:"lookback,omitempty"` +} + +func (m *GetDependenciesRequest) Reset() { *m = GetDependenciesRequest{} } +func (m *GetDependenciesRequest) String() string { return proto1.CompactTextString(m) } +func (*GetDependenciesRequest) ProtoMessage() {} +func (*GetDependenciesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *GetDependenciesRequest) GetEndTimestamp() *Timestamp { + if m != nil { + return m.EndTimestamp + } + return nil +} + +func (m *GetDependenciesRequest) GetLookback() *Duration { + if m != nil { + return m.Lookback + } + return nil +} + +type GetDependenciesSuccess struct { + Dependencies []*DependencyLink `protobuf:"bytes,1,rep,name=dependencies" json:"dependencies,omitempty"` +} + +func (m *GetDependenciesSuccess) Reset() { *m = GetDependenciesSuccess{} } +func (m *GetDependenciesSuccess) String() string { return proto1.CompactTextString(m) } +func (*GetDependenciesSuccess) ProtoMessage() {} +func (*GetDependenciesSuccess) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *GetDependenciesSuccess) GetDependencies() []*DependencyLink { + if m != nil { + return m.Dependencies + } + return nil +} + +type GetDependenciesResponse struct { + // Types that are valid to be assigned to Response: + // *GetDependenciesResponse_Success + // *GetDependenciesResponse_Error + Response isGetDependenciesResponse_Response `protobuf_oneof:"response"` +} + +func (m *GetDependenciesResponse) Reset() { *m = GetDependenciesResponse{} } +func (m *GetDependenciesResponse) String() string { return proto1.CompactTextString(m) } +func (*GetDependenciesResponse) ProtoMessage() {} +func (*GetDependenciesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +type isGetDependenciesResponse_Response interface { + isGetDependenciesResponse_Response() +} + +type GetDependenciesResponse_Success struct { + Success *GetDependenciesSuccess `protobuf:"bytes,1,opt,name=success,oneof"` +} +type GetDependenciesResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*GetDependenciesResponse_Success) isGetDependenciesResponse_Response() {} +func (*GetDependenciesResponse_Error) isGetDependenciesResponse_Response() {} + +func (m *GetDependenciesResponse) GetResponse() isGetDependenciesResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *GetDependenciesResponse) GetSuccess() *GetDependenciesSuccess { + if x, ok := m.GetResponse().(*GetDependenciesResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *GetDependenciesResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*GetDependenciesResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*GetDependenciesResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _GetDependenciesResponse_OneofMarshaler, _GetDependenciesResponse_OneofUnmarshaler, _GetDependenciesResponse_OneofSizer, []interface{}{ + (*GetDependenciesResponse_Success)(nil), + (*GetDependenciesResponse_Error)(nil), + } +} + +func _GetDependenciesResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*GetDependenciesResponse) + // response + switch x := m.Response.(type) { + case *GetDependenciesResponse_Success: + b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *GetDependenciesResponse_Error: + b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("GetDependenciesResponse.Response has unexpected type %T", x) + } + return nil +} + +func _GetDependenciesResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*GetDependenciesResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(GetDependenciesSuccess) + err := b.DecodeMessage(msg) + m.Response = &GetDependenciesResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &GetDependenciesResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _GetDependenciesResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*GetDependenciesResponse) + // response + switch x := m.Response.(type) { + case *GetDependenciesResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *GetDependenciesResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type WriteSpanRequest struct { + Span *Span `protobuf:"bytes,1,opt,name=span" json:"span,omitempty"` +} + +func (m *WriteSpanRequest) Reset() { *m = WriteSpanRequest{} } +func (m *WriteSpanRequest) String() string { return proto1.CompactTextString(m) } +func (*WriteSpanRequest) ProtoMessage() {} +func (*WriteSpanRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *WriteSpanRequest) GetSpan() *Span { + if m != nil { + return m.Span + } + return nil +} + +type WriteSpanResponse struct { + // Types that are valid to be assigned to Response: + // *WriteSpanResponse_Success + // *WriteSpanResponse_Error + Response isWriteSpanResponse_Response `protobuf_oneof:"response"` +} + +func (m *WriteSpanResponse) Reset() { *m = WriteSpanResponse{} } +func (m *WriteSpanResponse) String() string { return proto1.CompactTextString(m) } +func (*WriteSpanResponse) ProtoMessage() {} +func (*WriteSpanResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +type isWriteSpanResponse_Response interface { + isWriteSpanResponse_Response() +} + +type WriteSpanResponse_Success struct { + Success *EmptyResponse `protobuf:"bytes,1,opt,name=success,oneof"` +} +type WriteSpanResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*WriteSpanResponse_Success) isWriteSpanResponse_Response() {} +func (*WriteSpanResponse_Error) isWriteSpanResponse_Response() {} + +func (m *WriteSpanResponse) GetResponse() isWriteSpanResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *WriteSpanResponse) GetSuccess() *EmptyResponse { + if x, ok := m.GetResponse().(*WriteSpanResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *WriteSpanResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*WriteSpanResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*WriteSpanResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _WriteSpanResponse_OneofMarshaler, _WriteSpanResponse_OneofUnmarshaler, _WriteSpanResponse_OneofSizer, []interface{}{ + (*WriteSpanResponse_Success)(nil), + (*WriteSpanResponse_Error)(nil), + } +} + +func _WriteSpanResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*WriteSpanResponse) + // response + switch x := m.Response.(type) { + case *WriteSpanResponse_Success: + b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *WriteSpanResponse_Error: + b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("WriteSpanResponse.Response has unexpected type %T", x) + } + return nil +} + +func _WriteSpanResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*WriteSpanResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(EmptyResponse) + err := b.DecodeMessage(msg) + m.Response = &WriteSpanResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &WriteSpanResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _WriteSpanResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*WriteSpanResponse) + // response + switch x := m.Response.(type) { + case *WriteSpanResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *WriteSpanResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type GetTraceRequest struct { + TraceId *TraceId `protobuf:"bytes,1,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"` +} + +func (m *GetTraceRequest) Reset() { *m = GetTraceRequest{} } +func (m *GetTraceRequest) String() string { return proto1.CompactTextString(m) } +func (*GetTraceRequest) ProtoMessage() {} +func (*GetTraceRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +func (m *GetTraceRequest) GetTraceId() *TraceId { + if m != nil { + return m.TraceId + } + return nil +} + +type GetTraceSuccess struct { + Trace *Trace `protobuf:"bytes,1,opt,name=trace" json:"trace,omitempty"` +} + +func (m *GetTraceSuccess) Reset() { *m = GetTraceSuccess{} } +func (m *GetTraceSuccess) String() string { return proto1.CompactTextString(m) } +func (*GetTraceSuccess) ProtoMessage() {} +func (*GetTraceSuccess) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *GetTraceSuccess) GetTrace() *Trace { + if m != nil { + return m.Trace + } + return nil +} + +type GetTraceResponse struct { + // Types that are valid to be assigned to Response: + // *GetTraceResponse_Success + // *GetTraceResponse_Error + Response isGetTraceResponse_Response `protobuf_oneof:"response"` +} + +func (m *GetTraceResponse) Reset() { *m = GetTraceResponse{} } +func (m *GetTraceResponse) String() string { return proto1.CompactTextString(m) } +func (*GetTraceResponse) ProtoMessage() {} +func (*GetTraceResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +type isGetTraceResponse_Response interface { + isGetTraceResponse_Response() +} + +type GetTraceResponse_Success struct { + Success *GetTraceSuccess `protobuf:"bytes,1,opt,name=success,oneof"` +} +type GetTraceResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*GetTraceResponse_Success) isGetTraceResponse_Response() {} +func (*GetTraceResponse_Error) isGetTraceResponse_Response() {} + +func (m *GetTraceResponse) GetResponse() isGetTraceResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *GetTraceResponse) GetSuccess() *GetTraceSuccess { + if x, ok := m.GetResponse().(*GetTraceResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *GetTraceResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*GetTraceResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*GetTraceResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _GetTraceResponse_OneofMarshaler, _GetTraceResponse_OneofUnmarshaler, _GetTraceResponse_OneofSizer, []interface{}{ + (*GetTraceResponse_Success)(nil), + (*GetTraceResponse_Error)(nil), + } +} + +func _GetTraceResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*GetTraceResponse) + // response + switch x := m.Response.(type) { + case *GetTraceResponse_Success: + b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *GetTraceResponse_Error: + b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("GetTraceResponse.Response has unexpected type %T", x) + } + return nil +} + +func _GetTraceResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*GetTraceResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(GetTraceSuccess) + err := b.DecodeMessage(msg) + m.Response = &GetTraceResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &GetTraceResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _GetTraceResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*GetTraceResponse) + // response + switch x := m.Response.(type) { + case *GetTraceResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *GetTraceResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type GetServicesRequest struct { +} + +func (m *GetServicesRequest) Reset() { *m = GetServicesRequest{} } +func (m *GetServicesRequest) String() string { return proto1.CompactTextString(m) } +func (*GetServicesRequest) ProtoMessage() {} +func (*GetServicesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + +type GetServicesSuccess struct { + Services []string `protobuf:"bytes,1,rep,name=services" json:"services,omitempty"` +} + +func (m *GetServicesSuccess) Reset() { *m = GetServicesSuccess{} } +func (m *GetServicesSuccess) String() string { return proto1.CompactTextString(m) } +func (*GetServicesSuccess) ProtoMessage() {} +func (*GetServicesSuccess) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } + +func (m *GetServicesSuccess) GetServices() []string { + if m != nil { + return m.Services + } + return nil +} + +type GetServicesResponse struct { + // Types that are valid to be assigned to Response: + // *GetServicesResponse_Success + // *GetServicesResponse_Error + Response isGetServicesResponse_Response `protobuf_oneof:"response"` +} + +func (m *GetServicesResponse) Reset() { *m = GetServicesResponse{} } +func (m *GetServicesResponse) String() string { return proto1.CompactTextString(m) } +func (*GetServicesResponse) ProtoMessage() {} +func (*GetServicesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } + +type isGetServicesResponse_Response interface { + isGetServicesResponse_Response() +} + +type GetServicesResponse_Success struct { + Success *GetServicesSuccess `protobuf:"bytes,1,opt,name=success,oneof"` +} +type GetServicesResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*GetServicesResponse_Success) isGetServicesResponse_Response() {} +func (*GetServicesResponse_Error) isGetServicesResponse_Response() {} + +func (m *GetServicesResponse) GetResponse() isGetServicesResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *GetServicesResponse) GetSuccess() *GetServicesSuccess { + if x, ok := m.GetResponse().(*GetServicesResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *GetServicesResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*GetServicesResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*GetServicesResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _GetServicesResponse_OneofMarshaler, _GetServicesResponse_OneofUnmarshaler, _GetServicesResponse_OneofSizer, []interface{}{ + (*GetServicesResponse_Success)(nil), + (*GetServicesResponse_Error)(nil), + } +} + +func _GetServicesResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*GetServicesResponse) + // response + switch x := m.Response.(type) { + case *GetServicesResponse_Success: + b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *GetServicesResponse_Error: + b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("GetServicesResponse.Response has unexpected type %T", x) + } + return nil +} + +func _GetServicesResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*GetServicesResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(GetServicesSuccess) + err := b.DecodeMessage(msg) + m.Response = &GetServicesResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &GetServicesResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _GetServicesResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*GetServicesResponse) + // response + switch x := m.Response.(type) { + case *GetServicesResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *GetServicesResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type GetOperationsRequest struct { + Service string `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"` +} + +func (m *GetOperationsRequest) Reset() { *m = GetOperationsRequest{} } +func (m *GetOperationsRequest) String() string { return proto1.CompactTextString(m) } +func (*GetOperationsRequest) ProtoMessage() {} +func (*GetOperationsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } + +func (m *GetOperationsRequest) GetService() string { + if m != nil { + return m.Service + } + return "" +} + +type GetOperationsSuccess struct { + Operations []string `protobuf:"bytes,1,rep,name=operations" json:"operations,omitempty"` +} + +func (m *GetOperationsSuccess) Reset() { *m = GetOperationsSuccess{} } +func (m *GetOperationsSuccess) String() string { return proto1.CompactTextString(m) } +func (*GetOperationsSuccess) ProtoMessage() {} +func (*GetOperationsSuccess) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } + +func (m *GetOperationsSuccess) GetOperations() []string { + if m != nil { + return m.Operations + } + return nil +} + +type GetOperationsResponse struct { + // Types that are valid to be assigned to Response: + // *GetOperationsResponse_Success + // *GetOperationsResponse_Error + Response isGetOperationsResponse_Response `protobuf_oneof:"response"` +} + +func (m *GetOperationsResponse) Reset() { *m = GetOperationsResponse{} } +func (m *GetOperationsResponse) String() string { return proto1.CompactTextString(m) } +func (*GetOperationsResponse) ProtoMessage() {} +func (*GetOperationsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } + +type isGetOperationsResponse_Response interface { + isGetOperationsResponse_Response() +} + +type GetOperationsResponse_Success struct { + Success *GetOperationsSuccess `protobuf:"bytes,1,opt,name=success,oneof"` +} +type GetOperationsResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*GetOperationsResponse_Success) isGetOperationsResponse_Response() {} +func (*GetOperationsResponse_Error) isGetOperationsResponse_Response() {} + +func (m *GetOperationsResponse) GetResponse() isGetOperationsResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *GetOperationsResponse) GetSuccess() *GetOperationsSuccess { + if x, ok := m.GetResponse().(*GetOperationsResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *GetOperationsResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*GetOperationsResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*GetOperationsResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _GetOperationsResponse_OneofMarshaler, _GetOperationsResponse_OneofUnmarshaler, _GetOperationsResponse_OneofSizer, []interface{}{ + (*GetOperationsResponse_Success)(nil), + (*GetOperationsResponse_Error)(nil), + } +} + +func _GetOperationsResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*GetOperationsResponse) + // response + switch x := m.Response.(type) { + case *GetOperationsResponse_Success: + b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *GetOperationsResponse_Error: + b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("GetOperationsResponse.Response has unexpected type %T", x) + } + return nil +} + +func _GetOperationsResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*GetOperationsResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(GetOperationsSuccess) + err := b.DecodeMessage(msg) + m.Response = &GetOperationsResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &GetOperationsResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _GetOperationsResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*GetOperationsResponse) + // response + switch x := m.Response.(type) { + case *GetOperationsResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *GetOperationsResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type FindTracesRequest struct { + ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName" json:"service_name,omitempty"` + OperationName string `protobuf:"bytes,2,opt,name=operation_name,json=operationName" json:"operation_name,omitempty"` + Tags map[string]string `protobuf:"bytes,3,rep,name=tags" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StartTimeMin *Timestamp `protobuf:"bytes,4,opt,name=start_time_min,json=startTimeMin" json:"start_time_min,omitempty"` + StartTimeMax *Timestamp `protobuf:"bytes,5,opt,name=start_time_max,json=startTimeMax" json:"start_time_max,omitempty"` + DurationMin *Duration `protobuf:"bytes,6,opt,name=duration_min,json=durationMin" json:"duration_min,omitempty"` + DurationMax *Duration `protobuf:"bytes,7,opt,name=duration_max,json=durationMax" json:"duration_max,omitempty"` + NumTraces int32 `protobuf:"varint,8,opt,name=num_traces,json=numTraces" json:"num_traces,omitempty"` +} + +func (m *FindTracesRequest) Reset() { *m = FindTracesRequest{} } +func (m *FindTracesRequest) String() string { return proto1.CompactTextString(m) } +func (*FindTracesRequest) ProtoMessage() {} +func (*FindTracesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } + +func (m *FindTracesRequest) GetServiceName() string { + if m != nil { + return m.ServiceName + } + return "" +} + +func (m *FindTracesRequest) GetOperationName() string { + if m != nil { + return m.OperationName + } + return "" +} + +func (m *FindTracesRequest) GetTags() map[string]string { + if m != nil { + return m.Tags + } + return nil +} + +func (m *FindTracesRequest) GetStartTimeMin() *Timestamp { + if m != nil { + return m.StartTimeMin + } + return nil +} + +func (m *FindTracesRequest) GetStartTimeMax() *Timestamp { + if m != nil { + return m.StartTimeMax + } + return nil +} + +func (m *FindTracesRequest) GetDurationMin() *Duration { + if m != nil { + return m.DurationMin + } + return nil +} + +func (m *FindTracesRequest) GetDurationMax() *Duration { + if m != nil { + return m.DurationMax + } + return nil +} + +func (m *FindTracesRequest) GetNumTraces() int32 { + if m != nil { + return m.NumTraces + } + return 0 +} + +type FindTracesSuccess struct { + Traces []*Trace `protobuf:"bytes,1,rep,name=traces" json:"traces,omitempty"` +} + +func (m *FindTracesSuccess) Reset() { *m = FindTracesSuccess{} } +func (m *FindTracesSuccess) String() string { return proto1.CompactTextString(m) } +func (*FindTracesSuccess) ProtoMessage() {} +func (*FindTracesSuccess) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } + +func (m *FindTracesSuccess) GetTraces() []*Trace { + if m != nil { + return m.Traces + } + return nil +} + +type FindTracesResponse struct { + // Types that are valid to be assigned to Response: + // *FindTracesResponse_Success + // *FindTracesResponse_Error + Response isFindTracesResponse_Response `protobuf_oneof:"response"` +} + +func (m *FindTracesResponse) Reset() { *m = FindTracesResponse{} } +func (m *FindTracesResponse) String() string { return proto1.CompactTextString(m) } +func (*FindTracesResponse) ProtoMessage() {} +func (*FindTracesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } + +type isFindTracesResponse_Response interface { + isFindTracesResponse_Response() +} + +type FindTracesResponse_Success struct { + Success *FindTracesSuccess `protobuf:"bytes,1,opt,name=success,oneof"` +} +type FindTracesResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*FindTracesResponse_Success) isFindTracesResponse_Response() {} +func (*FindTracesResponse_Error) isFindTracesResponse_Response() {} + +func (m *FindTracesResponse) GetResponse() isFindTracesResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *FindTracesResponse) GetSuccess() *FindTracesSuccess { + if x, ok := m.GetResponse().(*FindTracesResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *FindTracesResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*FindTracesResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*FindTracesResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _FindTracesResponse_OneofMarshaler, _FindTracesResponse_OneofUnmarshaler, _FindTracesResponse_OneofSizer, []interface{}{ + (*FindTracesResponse_Success)(nil), + (*FindTracesResponse_Error)(nil), + } +} + +func _FindTracesResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*FindTracesResponse) + // response + switch x := m.Response.(type) { + case *FindTracesResponse_Success: + b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *FindTracesResponse_Error: + b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("FindTracesResponse.Response has unexpected type %T", x) + } + return nil +} + +func _FindTracesResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*FindTracesResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(FindTracesSuccess) + err := b.DecodeMessage(msg) + m.Response = &FindTracesResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &FindTracesResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _FindTracesResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*FindTracesResponse) + // response + switch x := m.Response.(type) { + case *FindTracesResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *FindTracesResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type EmptyResponse struct { +} + +func (m *EmptyResponse) Reset() { *m = EmptyResponse{} } +func (m *EmptyResponse) String() string { return proto1.CompactTextString(m) } +func (*EmptyResponse) ProtoMessage() {} +func (*EmptyResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } + +type StoragePluginError struct { + Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"` +} + +func (m *StoragePluginError) Reset() { *m = StoragePluginError{} } +func (m *StoragePluginError) String() string { return proto1.CompactTextString(m) } +func (*StoragePluginError) ProtoMessage() {} +func (*StoragePluginError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } + +func (m *StoragePluginError) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func init() { + proto1.RegisterType((*GetDependenciesRequest)(nil), "proto.GetDependenciesRequest") + proto1.RegisterType((*GetDependenciesSuccess)(nil), "proto.GetDependenciesSuccess") + proto1.RegisterType((*GetDependenciesResponse)(nil), "proto.GetDependenciesResponse") + proto1.RegisterType((*WriteSpanRequest)(nil), "proto.WriteSpanRequest") + proto1.RegisterType((*WriteSpanResponse)(nil), "proto.WriteSpanResponse") + proto1.RegisterType((*GetTraceRequest)(nil), "proto.GetTraceRequest") + proto1.RegisterType((*GetTraceSuccess)(nil), "proto.GetTraceSuccess") + proto1.RegisterType((*GetTraceResponse)(nil), "proto.GetTraceResponse") + proto1.RegisterType((*GetServicesRequest)(nil), "proto.GetServicesRequest") + proto1.RegisterType((*GetServicesSuccess)(nil), "proto.GetServicesSuccess") + proto1.RegisterType((*GetServicesResponse)(nil), "proto.GetServicesResponse") + proto1.RegisterType((*GetOperationsRequest)(nil), "proto.GetOperationsRequest") + proto1.RegisterType((*GetOperationsSuccess)(nil), "proto.GetOperationsSuccess") + proto1.RegisterType((*GetOperationsResponse)(nil), "proto.GetOperationsResponse") + proto1.RegisterType((*FindTracesRequest)(nil), "proto.FindTracesRequest") + proto1.RegisterType((*FindTracesSuccess)(nil), "proto.FindTracesSuccess") + proto1.RegisterType((*FindTracesResponse)(nil), "proto.FindTracesResponse") + proto1.RegisterType((*EmptyResponse)(nil), "proto.EmptyResponse") + proto1.RegisterType((*StoragePluginError)(nil), "proto.StoragePluginError") +} + +// 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 + +// Client API for StoragePlugin service + +type StoragePluginClient interface { + // dependencystore/Writer + // rpc WriteDependencies(WriteDependenciesRequest) returns (WriteDependenciesResponse); + // dependencystore/Reader + GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) + // spanstore/Writer + WriteSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) + // spanstore/Reader + GetTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (*GetTraceResponse, 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) (*FindTracesResponse, error) +} + +type storagePluginClient struct { + cc *grpc.ClientConn +} + +func NewStoragePluginClient(cc *grpc.ClientConn) StoragePluginClient { + return &storagePluginClient{cc} +} + +func (c *storagePluginClient) GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) { + out := new(GetDependenciesResponse) + err := grpc.Invoke(ctx, "/proto.StoragePlugin/GetDependencies", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginClient) WriteSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) { + out := new(WriteSpanResponse) + err := grpc.Invoke(ctx, "/proto.StoragePlugin/WriteSpan", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginClient) GetTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (*GetTraceResponse, error) { + out := new(GetTraceResponse) + err := grpc.Invoke(ctx, "/proto.StoragePlugin/GetTrace", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginClient) GetServices(ctx context.Context, in *GetServicesRequest, opts ...grpc.CallOption) (*GetServicesResponse, error) { + out := new(GetServicesResponse) + err := grpc.Invoke(ctx, "/proto.StoragePlugin/GetServices", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginClient) GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*GetOperationsResponse, error) { + out := new(GetOperationsResponse) + err := grpc.Invoke(ctx, "/proto.StoragePlugin/GetOperations", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginClient) FindTraces(ctx context.Context, in *FindTracesRequest, opts ...grpc.CallOption) (*FindTracesResponse, error) { + out := new(FindTracesResponse) + err := grpc.Invoke(ctx, "/proto.StoragePlugin/FindTraces", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for StoragePlugin service + +type StoragePluginServer interface { + // dependencystore/Writer + // rpc WriteDependencies(WriteDependenciesRequest) returns (WriteDependenciesResponse); + // dependencystore/Reader + GetDependencies(context.Context, *GetDependenciesRequest) (*GetDependenciesResponse, error) + // spanstore/Writer + WriteSpan(context.Context, *WriteSpanRequest) (*WriteSpanResponse, error) + // spanstore/Reader + GetTrace(context.Context, *GetTraceRequest) (*GetTraceResponse, error) + GetServices(context.Context, *GetServicesRequest) (*GetServicesResponse, error) + GetOperations(context.Context, *GetOperationsRequest) (*GetOperationsResponse, error) + FindTraces(context.Context, *FindTracesRequest) (*FindTracesResponse, error) +} + +func RegisterStoragePluginServer(s *grpc.Server, srv StoragePluginServer) { + s.RegisterService(&_StoragePlugin_serviceDesc, srv) +} + +func _StoragePlugin_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 interceptor == nil { + return srv.(StoragePluginServer).GetDependencies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.StoragePlugin/GetDependencies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).GetDependencies(ctx, req.(*GetDependenciesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePlugin_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.(StoragePluginServer).WriteSpan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.StoragePlugin/WriteSpan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).WriteSpan(ctx, req.(*WriteSpanRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePlugin_GetTrace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTraceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoragePluginServer).GetTrace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.StoragePlugin/GetTrace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).GetTrace(ctx, req.(*GetTraceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePlugin_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 + } + if interceptor == nil { + return srv.(StoragePluginServer).GetServices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.StoragePlugin/GetServices", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).GetServices(ctx, req.(*GetServicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePlugin_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.(StoragePluginServer).GetOperations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.StoragePlugin/GetOperations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).GetOperations(ctx, req.(*GetOperationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePlugin_FindTraces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindTracesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoragePluginServer).FindTraces(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.StoragePlugin/FindTraces", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).FindTraces(ctx, req.(*FindTracesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _StoragePlugin_serviceDesc = grpc.ServiceDesc{ + ServiceName: "proto.StoragePlugin", + HandlerType: (*StoragePluginServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetDependencies", + Handler: _StoragePlugin_GetDependencies_Handler, + }, + { + MethodName: "WriteSpan", + Handler: _StoragePlugin_WriteSpan_Handler, + }, + { + MethodName: "GetTrace", + Handler: _StoragePlugin_GetTrace_Handler, + }, + { + MethodName: "GetServices", + Handler: _StoragePlugin_GetServices_Handler, + }, + { + MethodName: "GetOperations", + Handler: _StoragePlugin_GetOperations_Handler, + }, + { + MethodName: "FindTraces", + Handler: _StoragePlugin_FindTraces_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "storage.proto", +} + +func init() { proto1.RegisterFile("storage.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 819 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x5f, 0x6f, 0xe3, 0x44, + 0x10, 0x3f, 0x37, 0x4d, 0x93, 0x4c, 0x92, 0x36, 0xb7, 0xe4, 0xae, 0x6e, 0xe0, 0x8e, 0xb2, 0x02, + 0xa9, 0x08, 0x29, 0x2a, 0x39, 0xda, 0xa3, 0x80, 0x90, 0x40, 0x2d, 0x39, 0x10, 0x7f, 0x2a, 0xa7, + 0x12, 0x8f, 0xd1, 0x36, 0x5e, 0x45, 0x56, 0xe2, 0xb5, 0xf1, 0x6e, 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f5, 0x0d, 0xc0, 0x7a, 0x24, 0x88, 0xbd, 0xed, 0x8a, 0xf7, 0x4e, 0x36, 0x78, 0x92, 0x14, + 0xf7, 0x07, 0xda, 0xf3, 0xea, 0x6d, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x61, 0x40, 0xda, 0xa5, + 0x09, 0x00, 0x00, +} diff --git a/plugin/storage/external/proto/storage.proto b/plugin/storage/external/proto/storage.proto new file mode 100644 index 00000000000..8970334ece6 --- /dev/null +++ b/plugin/storage/external/proto/storage.proto @@ -0,0 +1,176 @@ +syntax = "proto3"; +package proto; + +import "model.proto"; + +//message WriteDependenciesRequest { +// +//} +// +//message WriteDependenciesResponse { +// +//} + +message GetDependenciesRequest { + Timestamp end_timestamp = 1; + Duration lookback = 2; +} + +message GetDependenciesSuccess { + repeated DependencyLink dependencies = 1; +} + +message GetDependenciesResponse { + oneof response { + GetDependenciesSuccess success = 1; + StoragePluginError error = 2; + } +} + +//message InsertThroughputRequest { +// +//} +// +//message InsertThroughputResponse { +// +//} +// +//message InsertProbabilitiesAndQPSRequest { +// +//} +// +//message InsertProbabilitiesAndQPSResponse { +// +//} +// +//message GetThroughputRequest { +// +//} +// +//message GetThroughputResponse { +// +//} +// +//message GetProbabilitiesAndQPSRequest { +// +//} +// +//message GetProbabilitiesAndQPSResponse { +// +//} +// +//message GetLatestProbabilitiesRequest { +// +//} +// +//message GetLatestProbabilitiesResponse { +// +//} + +message WriteSpanRequest { + Span span = 1; +} + +message WriteSpanResponse { + oneof response { + EmptyResponse success = 1; + StoragePluginError error = 2; + } +} + +message GetTraceRequest { + TraceId trace_id = 1; +} + +message GetTraceSuccess { + Trace trace = 1; +} + +message GetTraceResponse { + oneof response { + GetTraceSuccess success = 1; + StoragePluginError error = 2; + } +} + +message GetServicesRequest {} + +message GetServicesSuccess { + repeated string services = 1; +} + +message GetServicesResponse { + oneof response { + GetServicesSuccess success = 1; + StoragePluginError error = 2; + } +} + +message GetOperationsRequest { + string service = 1; +} + +message GetOperationsSuccess { + repeated string operations = 1; +} + +message GetOperationsResponse { + oneof response { + GetOperationsSuccess success = 1; + StoragePluginError error = 2; + } +} + +message FindTracesRequest { + string service_name = 1; + string operation_name = 2; + map tags = 3; + Timestamp start_time_min = 4; + Timestamp start_time_max = 5; + Duration duration_min = 6; + Duration duration_max = 7; + int32 num_traces = 8; +} + +message FindTracesSuccess { + repeated Trace traces = 1; +} + +message FindTracesResponse { + oneof response { + FindTracesSuccess success = 1; + StoragePluginError error = 2; + } +} + +message EmptyResponse { + +} + +message StoragePluginError { + string message = 1; +} + +service StoragePlugin { + // dependencystore/Writer +// rpc WriteDependencies(WriteDependenciesRequest) returns (WriteDependenciesResponse); + // dependencystore/Reader + rpc GetDependencies(GetDependenciesRequest) returns (GetDependenciesResponse); + + // TODO(olivierboucher): make theses available once the POC goes through + // samplingstore/Store +// rpc InsertThroughput(InsertThroughputRequest) returns (InsertThroughputResponse); +// rpc InsertProbabilitiesAndQPS(InsertProbabilitiesAndQPSRequest) returns (InsertProbabilitiesAndQPSResponse); +// rpc GetThroughput(GetThroughputRequest) returns (GetThroughputResponse); +// rpc GetProbabilitiesAndQPS(GetProbabilitiesAndQPSRequest) returns (GetProbabilitiesAndQPSResponse); +// rpc GetLatestProbabilities(GetLatestProbabilitiesRequest) returns (GetLatestProbabilitiesResponse); + + // spanstore/Writer + rpc WriteSpan(WriteSpanRequest) returns (WriteSpanResponse); + + // spanstore/Reader + rpc GetTrace(GetTraceRequest) returns (GetTraceResponse); + rpc GetServices(GetServicesRequest) returns (GetServicesResponse); + rpc GetOperations(GetOperationsRequest) returns (GetOperationsResponse); + rpc FindTraces(FindTracesRequest) returns (FindTracesResponse); +} \ No newline at end of file diff --git a/plugin/storage/external/shared/grpc.go b/plugin/storage/external/shared/grpc.go new file mode 100644 index 00000000000..29dd5d48964 --- /dev/null +++ b/plugin/storage/external/shared/grpc.go @@ -0,0 +1,274 @@ +// Copyright (c) 2018 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" + "fmt" + "time" + + "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/plugin/storage/external/proto" + "github.com/jaegertracing/jaeger/storage/spanstore" +) + +type GRPCClient struct { + client proto.StoragePluginClient +} + +func (c *GRPCClient) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) { + resp, err := c.client.GetTrace(ctx, &proto.GetTraceRequest{ + TraceId: TraceIDToProto(&traceID), + }) + if err != nil { + return nil, fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.GetTraceResponse_Success: + return TraceFromProto(t.Success.Trace), nil + case *proto.GetTraceResponse_Error: + return nil, fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + +func (c *GRPCClient) GetServices(ctx context.Context) ([]string, error) { + resp, err := c.client.GetServices(ctx, &proto.GetServicesRequest{}) + if err != nil { + return nil, fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.GetServicesResponse_Success: + return t.Success.Services, nil + case *proto.GetServicesResponse_Error: + return nil, fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + +func (c *GRPCClient) GetOperations(ctx context.Context, service string) ([]string, error) { + resp, err := c.client.GetOperations(ctx, &proto.GetOperationsRequest{ + Service: service, + }) + if err != nil { + return nil, fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.GetOperationsResponse_Success: + return t.Success.Operations, nil + case *proto.GetOperationsResponse_Error: + return nil, fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + +func (c *GRPCClient) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error) { + resp, err := c.client.FindTraces(context.Background(), &proto.FindTracesRequest{ + ServiceName: query.ServiceName, + OperationName: query.OperationName, + Tags: query.Tags, + StartTimeMin: TimeToProto(query.StartTimeMin), + StartTimeMax: TimeToProto(query.StartTimeMax), + DurationMin: DurationToProto(query.DurationMin), + DurationMax: DurationToProto(query.DurationMax), + NumTraces: int32(query.NumTraces), + }) + if err != nil { + return nil, fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.FindTracesResponse_Success: + return TraceSliceFromProto(t.Success.Traces), nil + case *proto.FindTracesResponse_Error: + return nil, fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + +func (c *GRPCClient) WriteSpan(span *model.Span) error { + resp, err := c.client.WriteSpan(context.Background(), &proto.WriteSpanRequest{ + Span: SpanToProto(span), + }) + if err != nil { + return fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.WriteSpanResponse_Success: + return nil + case *proto.WriteSpanResponse_Error: + return fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + +func (c *GRPCClient) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { + resp, err := c.client.GetDependencies(context.Background(), &proto.GetDependenciesRequest{ + EndTimestamp: TimeToProto(endTs), + Lookback: DurationToProto(lookback), + }) + if err != nil { + return nil, fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.GetDependenciesResponse_Success: + return DependencyLinkSliceFromProto(t.Success.Dependencies), nil + case *proto.GetDependenciesResponse_Error: + return nil, fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + +type GRPCServer struct { + Impl StoragePlugin +} + +func (s *GRPCServer) GetDependencies(ctx context.Context, r *proto.GetDependenciesRequest) (*proto.GetDependenciesResponse, error) { + deps, err := s.Impl.GetDependencies(TimeFromProto(r.EndTimestamp), DurationFromProto(r.Lookback)) + if err != nil { + return &proto.GetDependenciesResponse{ + Response: &proto.GetDependenciesResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.GetDependenciesResponse{ + Response: &proto.GetDependenciesResponse_Success{ + Success: &proto.GetDependenciesSuccess{ + Dependencies: DependencyLinkSliceToProto(deps), + }, + }, + }, nil +} + +func (s *GRPCServer) WriteSpan(ctx context.Context, r *proto.WriteSpanRequest) (*proto.WriteSpanResponse, error) { + err := s.Impl.WriteSpan(SpanFromProto(r.Span)) + if err != nil { + return &proto.WriteSpanResponse{ + Response: &proto.WriteSpanResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.WriteSpanResponse{ + Response: &proto.WriteSpanResponse_Success{ + Success: &proto.EmptyResponse{}, + }, + }, nil +} + +func (s *GRPCServer) GetTrace(ctx context.Context, r *proto.GetTraceRequest) (*proto.GetTraceResponse, error) { + trace, err := s.Impl.GetTrace(ctx, TraceIDFromProto(r.TraceId)) + if err != nil { + return &proto.GetTraceResponse{ + Response: &proto.GetTraceResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.GetTraceResponse{ + Response: &proto.GetTraceResponse_Success{ + Success: &proto.GetTraceSuccess{ + Trace: TraceToProto(trace), + }, + }, + }, nil +} + +func (s *GRPCServer) GetServices(ctx context.Context, r *proto.GetServicesRequest) (*proto.GetServicesResponse, error) { + services, err := s.Impl.GetServices(ctx) + if err != nil { + return &proto.GetServicesResponse{ + Response: &proto.GetServicesResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.GetServicesResponse{ + Response: &proto.GetServicesResponse_Success{ + Success: &proto.GetServicesSuccess{ + Services: services, + }, + }, + }, nil +} + +func (s *GRPCServer) GetOperations(ctx context.Context, r *proto.GetOperationsRequest) (*proto.GetOperationsResponse, error) { + operations, err := s.Impl.GetOperations(ctx, r.Service) + if err != nil { + return &proto.GetOperationsResponse{ + Response: &proto.GetOperationsResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.GetOperationsResponse{ + Response: &proto.GetOperationsResponse_Success{ + Success: &proto.GetOperationsSuccess{ + Operations: operations, + }, + }, + }, nil +} + +func (s *GRPCServer) FindTraces(ctx context.Context, r *proto.FindTracesRequest) (*proto.FindTracesResponse, error) { + traces, err := s.Impl.FindTraces(ctx, &spanstore.TraceQueryParameters{ + ServiceName: r.ServiceName, + OperationName: r.OperationName, + Tags: r.Tags, + StartTimeMin: TimeFromProto(r.StartTimeMin), + StartTimeMax: TimeFromProto(r.StartTimeMax), + DurationMin: DurationFromProto(r.DurationMin), + DurationMax: DurationFromProto(r.DurationMax), + NumTraces: int(r.NumTraces), + }) + if err != nil { + return &proto.FindTracesResponse{ + Response: &proto.FindTracesResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.FindTracesResponse{ + Response: &proto.FindTracesResponse_Success{ + Success: &proto.FindTracesSuccess{ + Traces: TraceSliceToProto(traces), + }, + }, + }, nil +} diff --git a/plugin/storage/external/shared/interface.go b/plugin/storage/external/shared/interface.go new file mode 100644 index 00000000000..b42e52619f9 --- /dev/null +++ b/plugin/storage/external/shared/interface.go @@ -0,0 +1,64 @@ +// Copyright (c) 2018 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" + + "github.com/hashicorp/go-plugin" + "google.golang.org/grpc" + + "github.com/jaegertracing/jaeger/plugin/storage/external/proto" + "github.com/jaegertracing/jaeger/storage/dependencystore" + "github.com/jaegertracing/jaeger/storage/spanstore" +) + +// StoragePluginIdentifier is the identifier that is shared by plugin and host. +const StoragePluginIdentifier = "storage_plugin" + +// Handshake is a common handshake that is shared by plugin and host. +var Handshake = plugin.HandshakeConfig{ + MagicCookieKey: "STORAGE_PLUGIN", + MagicCookieValue: "jaeger", +} + +// PluginMap is the map of plugins we can dispense. +var PluginMap = map[string]plugin.Plugin{ + StoragePluginIdentifier: &StorageGRPCPlugin{}, +} + +// StoragePlugin is the interface we're exposing as a plugin. +type StoragePlugin interface { + spanstore.Reader + spanstore.Writer + dependencystore.Reader +} + +// This is the implementation of plugin.GRPCPlugin so we can serve/consume this. +type StorageGRPCPlugin struct { + plugin.Plugin + // Concrete implementation, written in Go. This is only used for plugins + // that are written in Go. + Impl StoragePlugin +} + +func (p *StorageGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error { + proto.RegisterStoragePluginServer(s, &GRPCServer{Impl: p.Impl}) + return nil +} + +func (*StorageGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { + return &GRPCClient{client: proto.NewStoragePluginClient(c)}, nil +} diff --git a/plugin/storage/external/shared/mapping.go b/plugin/storage/external/shared/mapping.go new file mode 100644 index 00000000000..387c88e324f --- /dev/null +++ b/plugin/storage/external/shared/mapping.go @@ -0,0 +1,420 @@ +// Copyright (c) 2018 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 ( + "time" + + "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/plugin/storage/external/proto" +) + +func DependencyLinkSliceFromProto(p []*proto.DependencyLink) []model.DependencyLink { + rs := make([]model.DependencyLink, len(p)) + + for n, dep := range p { + rs[n] = DependencyLinkFromProto(dep) + } + + return rs +} + +func DependencyLinkSliceToProto(ds []model.DependencyLink) []*proto.DependencyLink { + rs := make([]*proto.DependencyLink, len(ds)) + + for n, dep := range ds { + rs[n] = DependencyLinkToProto(&dep) + } + + return rs +} + +func DependencyLinkToProto(dep *model.DependencyLink) *proto.DependencyLink { + return &proto.DependencyLink{ + Parent: dep.Parent, + Child: dep.Child, + CallCount: dep.CallCount, + } +} + +func DependencyLinkFromProto(p *proto.DependencyLink) model.DependencyLink { + return model.DependencyLink{ + Parent: p.Parent, + Child: p.Child, + CallCount: p.CallCount, + } +} + +func TraceProcessMappingSliceToProto(mappings []model.Trace_ProcessMapping) []*proto.TraceProcessMapping { + rs := make([]*proto.TraceProcessMapping, len(mappings)) + + for n, mapping := range mappings { + rs[n] = TraceProcessMappingToProto(&mapping) + } + + return rs +} + +func TraceProcessMappingSliceFromProto(p []*proto.TraceProcessMapping) []model.Trace_ProcessMapping { + rs := make([]model.Trace_ProcessMapping, len(p)) + + for n, mapping := range p { + rs[n] = TraceProcessMappingFromProto(mapping) + } + + return rs +} + +func TraceProcessMappingToProto(mapping *model.Trace_ProcessMapping) *proto.TraceProcessMapping { + return &proto.TraceProcessMapping{ + ProcessId: mapping.ProcessID, + Process: ProcessToProto(&mapping.Process), + } +} + +func TraceProcessMappingFromProto(p *proto.TraceProcessMapping) model.Trace_ProcessMapping { + return model.Trace_ProcessMapping{ + ProcessID: p.ProcessId, + Process: ProcessFromProto(p.Process), + } +} + +func ProcessToProto(process *model.Process) *proto.Process { + return &proto.Process{ + ServiceName: process.ServiceName, + Tags: KeyValueSliceToProto(process.Tags), + } +} + +func ProcessFromProto(p *proto.Process) model.Process { + return model.Process{ + ServiceName: p.ServiceName, + Tags: KeyValueSliceFromProto(p.Tags), + } +} + +func ProcessPtrFromProto(p *proto.Process) *model.Process { + if p == nil { + return nil + } + + return &model.Process{ + ServiceName: p.ServiceName, + Tags: KeyValueSliceFromProto(p.Tags), + } +} + +func LogSliceToProto(ls []model.Log) []*proto.Log { + rs := make([]*proto.Log, len(ls)) + + for n, log := range ls { + rs[n] = LogToProto(&log) + } + + return rs +} + +func LogSliceFromProto(p []*proto.Log) []model.Log { + rs := make([]model.Log, len(p)) + + for n, log := range p { + rs[n] = LogFromProto(log) + } + + return rs +} + +func LogToProto(log *model.Log) *proto.Log { + return &proto.Log{ + Timestamp: TimeToProto(log.Timestamp), + Fields: KeyValueSliceToProto(log.Fields), + } +} + +func LogFromProto(p *proto.Log) model.Log { + return model.Log{ + Timestamp: TimeFromProto(p.Timestamp), + Fields: KeyValueSliceFromProto(p.Fields), + } +} + +func ValueTypeToProto(vt model.ValueType) proto.ValueType { + switch vt { + case model.ValueType_STRING: + return proto.ValueType_ValueType_STRING + case model.ValueType_BOOL: + return proto.ValueType_ValueType_BOOL + case model.ValueType_INT64: + return proto.ValueType_ValueType_INT64 + case model.ValueType_FLOAT64: + return proto.ValueType_ValueType_FLOAT64 + case model.ValueType_BINARY: + return proto.ValueType_ValueType_BINARY + default: + panic("unreachable") + } +} + +func ValueTypeFromProto(p proto.ValueType) model.ValueType { + switch p { + case proto.ValueType_ValueType_STRING: + return model.ValueType_STRING + case proto.ValueType_ValueType_INT64: + return model.ValueType_INT64 + case proto.ValueType_ValueType_FLOAT64: + return model.ValueType_FLOAT64 + case proto.ValueType_ValueType_BINARY: + return model.ValueType_BINARY + default: + panic("unreachable") + } +} + +func KeyValueSliceToProto(kvs []model.KeyValue) []*proto.KeyValue { + rs := make([]*proto.KeyValue, len(kvs)) + + for n, kv := range kvs { + rs[n] = KeyValueToProto(&kv) + } + + return rs +} + +func KeyValueSliceFromProto(p []*proto.KeyValue) []model.KeyValue { + rs := make([]model.KeyValue, len(p)) + + for n, kv := range p { + rs[n] = KeyValueFromProto(kv) + } + + return rs +} + +func KeyValueToProto(kv *model.KeyValue) *proto.KeyValue { + return &proto.KeyValue{ + Key: kv.Key, + ValueType: ValueTypeToProto(kv.VType), + StringValue: kv.VStr, + BoolValue: kv.VBool, + Int64Value: kv.VInt64, + Float64Value: kv.VFloat64, + BinaryValue: kv.VBinary, + } +} + +func KeyValueFromProto(p *proto.KeyValue) model.KeyValue { + return model.KeyValue{ + Key: p.Key, + VType: ValueTypeFromProto(p.ValueType), + VStr: p.StringValue, + VBool: p.BoolValue, + VInt64: p.Int64Value, + VFloat64: p.Float64Value, + VBinary: p.BinaryValue, + } +} + +func DurationToProto(d time.Duration) *proto.Duration { + nanos := d.Nanoseconds() + secs := nanos / 1e9 + nanos -= secs * 1e9 + return &proto.Duration{ + Seconds: secs, + Nanos: int32(nanos), + } +} + +func DurationFromProto(p *proto.Duration) time.Duration { + d := time.Duration(p.Seconds) * time.Second + if p.Nanos != 0 { + d += time.Duration(p.Nanos) + } + + return d +} + +func TimeToProto(t time.Time) *proto.Timestamp { + seconds := t.Unix() + return &proto.Timestamp{ + Seconds: seconds, + Nanos: int32(t.Sub(time.Unix(seconds, 0))), + } +} + +func TimeFromProto(p *proto.Timestamp) time.Time { + return time.Unix(p.Seconds, int64(p.Nanos)) +} + +func SpanRefTypeToProto(spanRefType model.SpanRefType) proto.SpanRefType { + switch spanRefType { + case model.FollowsFrom: + return proto.SpanRefType_SpanRefType_FOLLOWS_FROM + case model.ChildOf: + return proto.SpanRefType_SpanRefType_CHILD_OF + default: + panic("unreachable") + } +} + +func SpanRefTypeFromProto(p proto.SpanRefType) model.SpanRefType { + switch p { + case proto.SpanRefType_SpanRefType_CHILD_OF: + return model.ChildOf + case proto.SpanRefType_SpanRefType_FOLLOWS_FROM: + return model.FollowsFrom + default: + panic("unreachable") + } +} + +func SpanRefSliceToProto(srs []model.SpanRef) []*proto.SpanRef { + rs := make([]*proto.SpanRef, len(srs)) + + for n, spanRef := range srs { + rs[n] = SpanRefToProto(&spanRef) + } + + return rs +} + +func SpanRefSliceFromProto(p []*proto.SpanRef) []model.SpanRef { + rs := make([]model.SpanRef, len(p)) + + for n, spanRef := range p { + rs[n] = SpanRefFromProto(spanRef) + } + + return rs +} + +func SpanRefToProto(spanRef *model.SpanRef) *proto.SpanRef { + return &proto.SpanRef{ + TraceId: TraceIDToProto(&spanRef.TraceID), + SpanId: uint64(spanRef.SpanID), + RefType: SpanRefTypeToProto(spanRef.RefType), + } +} + +func SpanRefFromProto(p *proto.SpanRef) model.SpanRef { + return model.SpanRef{ + TraceID: TraceIDFromProto(p.TraceId), + SpanID: model.SpanID(p.SpanId), + RefType: SpanRefTypeFromProto(p.RefType), + } +} + +func TraceIDToProto(tid *model.TraceID) *proto.TraceId { + return &proto.TraceId{ + Low: tid.Low, + High: tid.High, + } +} + +func TraceIDFromProto(p *proto.TraceId) model.TraceID { + return model.TraceID{ + Low: p.Low, + High: p.High, + } +} + +func TraceSliceToProto(ts []*model.Trace) []*proto.Trace { + rs := make([]*proto.Trace, len(ts)) + + for n, trace := range ts { + rs[n] = TraceToProto(trace) + } + + return rs +} + +func TraceSliceFromProto(p []*proto.Trace) []*model.Trace { + rs := make([]*model.Trace, len(p)) + + for n, trace := range p { + rs[n] = TraceFromProto(trace) + } + + return rs +} + +func TraceToProto(trace *model.Trace) *proto.Trace { + return &proto.Trace{ + Spans: SpanSliceToProto(trace.Spans), + ProcessMap: TraceProcessMappingSliceToProto(trace.ProcessMap), + Warnings: trace.Warnings, + } +} + +func TraceFromProto(p *proto.Trace) *model.Trace { + return &model.Trace{ + Spans: SpanSliceFromProto(p.Spans), + ProcessMap: TraceProcessMappingSliceFromProto(p.ProcessMap), + Warnings: p.Warnings, + } +} + +func SpanSliceToProto(spans []*model.Span) []*proto.Span { + rs := make([]*proto.Span, len(spans)) + + for n, span := range spans { + rs[n] = SpanToProto(span) + } + + return rs +} + +func SpanSliceFromProto(p []*proto.Span) []*model.Span { + rs := make([]*model.Span, len(p)) + + for n, span := range p { + rs[n] = SpanFromProto(span) + } + + return rs +} + +func SpanToProto(span *model.Span) *proto.Span { + return &proto.Span{ + TraceId: TraceIDToProto(&span.TraceID), + SpanId: uint64(span.SpanID), + OperationName: span.OperationName, + References: SpanRefSliceToProto(span.References), + Flags: uint32(span.Flags), + StartTime: TimeToProto(span.StartTime), + Duration: DurationToProto(span.Duration), + Tags: KeyValueSliceToProto(span.Tags), + Logs: LogSliceToProto(span.Logs), + Process: ProcessToProto(span.Process), + ProcessId: span.ProcessID, + Warnings: span.Warnings, + } +} + +func SpanFromProto(p *proto.Span) *model.Span { + return &model.Span{ + TraceID: TraceIDFromProto(p.TraceId), + SpanID: model.SpanID(p.SpanId), + OperationName: p.OperationName, + References: SpanRefSliceFromProto(p.References), + Flags: model.Flags(p.Flags), + StartTime: TimeFromProto(p.StartTime), + Duration: DurationFromProto(p.Duration), + Tags: KeyValueSliceFromProto(p.Tags), + Logs: LogSliceFromProto(p.Logs), + Process: ProcessPtrFromProto(p.Process), + ProcessID: p.ProcessId, + Warnings: p.Warnings, + } +} diff --git a/plugin/storage/factory.go b/plugin/storage/factory.go index bd1c641ebd0..e6fc6b85c1d 100644 --- a/plugin/storage/factory.go +++ b/plugin/storage/factory.go @@ -25,6 +25,7 @@ import ( "github.com/jaegertracing/jaeger/plugin" "github.com/jaegertracing/jaeger/plugin/storage/cassandra" "github.com/jaegertracing/jaeger/plugin/storage/es" + "github.com/jaegertracing/jaeger/plugin/storage/external" "github.com/jaegertracing/jaeger/plugin/storage/kafka" "github.com/jaegertracing/jaeger/plugin/storage/memory" "github.com/jaegertracing/jaeger/storage" @@ -37,6 +38,9 @@ const ( elasticsearchStorageType = "elasticsearch" memoryStorageType = "memory" kafkaStorageType = "kafka" + // TODO(olivierboucher): I'm confused with the naming since I didn't want to name the package "plugin" but using "external" here + // does not make sense really + pluginStorageType = "plugin" ) var allStorageTypes = []string{cassandraStorageType, elasticsearchStorageType, memoryStorageType, kafkaStorageType} @@ -79,6 +83,8 @@ func (f *Factory) getFactoryOfType(factoryType string) (storage.Factory, error) return memory.NewFactory(), nil case kafkaStorageType: return kafka.NewFactory(), nil + case pluginStorageType: + return external.NewFactory(), nil default: return nil, fmt.Errorf("Unknown storage type %s. Valid types are %v", factoryType, allStorageTypes) } From 7ed4b578a7fbae7f523d7687df4b16c5b36cf6ed Mon Sep 17 00:00:00 2001 From: Olivier Boucher Date: Sat, 24 Nov 2018 15:58:45 -0500 Subject: [PATCH 02/11] Added Memory GRPC Plugin. Renamed packages (#422) Renamed packages from "external" to "grpc". Changed storage type to "grpc-plugin". Added cmd/memory-grpc-plugin that uses the memory backend as a grpc plugin. Added go-plugin dependency to Glide. Added task to generate plugin protos to Makefile. Signed-off-by: Olivier Boucher --- Makefile | 8 +++++ cmd/memory-grpc-plugin/main.go | 36 +++++++++++++++++++ pkg/{external => grpc}/config/config.go | 2 +- plugin/storage/factory.go | 12 +++---- plugin/storage/{external => grpc}/factory.go | 2 +- plugin/storage/{external => grpc}/options.go | 6 ++-- plugin/storage/{external => grpc}/plugin.go | 6 ++-- .../{external => grpc}/proto/model.pb.go | 0 .../{external => grpc}/proto/model.proto | 0 .../{external => grpc}/proto/storage.pb.go | 0 .../{external => grpc}/proto/storage.proto | 0 .../storage/{external => grpc}/shared/grpc.go | 2 +- .../{external => grpc}/shared/interface.go | 2 +- .../{external => grpc}/shared/mapping.go | 4 ++- 14 files changed, 62 insertions(+), 18 deletions(-) create mode 100644 cmd/memory-grpc-plugin/main.go rename pkg/{external => grpc}/config/config.go (94%) rename plugin/storage/{external => grpc}/factory.go (99%) rename plugin/storage/{external => grpc}/options.go (89%) rename plugin/storage/{external => grpc}/plugin.go (95%) rename plugin/storage/{external => grpc}/proto/model.pb.go (100%) rename plugin/storage/{external => grpc}/proto/model.proto (100%) rename plugin/storage/{external => grpc}/proto/storage.pb.go (100%) rename plugin/storage/{external => grpc}/proto/storage.proto (100%) rename plugin/storage/{external => grpc}/shared/grpc.go (99%) rename plugin/storage/{external => grpc}/shared/interface.go (96%) rename plugin/storage/{external => grpc}/shared/mapping.go (98%) diff --git a/Makefile b/Makefile index 64ddb0086e6..b65836a05bf 100644 --- a/Makefile +++ b/Makefile @@ -386,3 +386,11 @@ proto-install: ./vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger # ./vendor/github.com/mwitkow/go-proto-validators/protoc-gen-govalidators \ # ./vendor/github.com/rakyll/statik + +.PHONY: plugin-proto +plugin-proto: + protoc \ + -I plugin/storage/external/proto \ + --go_out=plugins=grpc:$(PWD)/plugin/storage/external/proto \ + plugin/storage/external/proto/storage.proto \ + plugin/storage/external/proto/model.proto \ No newline at end of file diff --git a/cmd/memory-grpc-plugin/main.go b/cmd/memory-grpc-plugin/main.go new file mode 100644 index 00000000000..1bbf135c9ad --- /dev/null +++ b/cmd/memory-grpc-plugin/main.go @@ -0,0 +1,36 @@ +// Copyright (c) 2018 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 main + +import ( + "github.com/hashicorp/go-plugin" + + "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" + "github.com/jaegertracing/jaeger/plugin/storage/memory" +) + +func main() { + plugin.Serve(&plugin.ServeConfig{ + HandshakeConfig: shared.Handshake, + VersionedPlugins: map[int]plugin.PluginSet{ + 18: map[string]plugin.Plugin{ + shared.StoragePluginIdentifier: &shared.StorageGRPCPlugin{ + Impl: memory.NewStore(), + }, + }, + }, + GRPCServer: plugin.DefaultGRPCServer, + }) +} diff --git a/pkg/external/config/config.go b/pkg/grpc/config/config.go similarity index 94% rename from pkg/external/config/config.go rename to pkg/grpc/config/config.go index 99333b14c28..f0703eeddcc 100644 --- a/pkg/external/config/config.go +++ b/pkg/grpc/config/config.go @@ -16,5 +16,5 @@ package config // Configuration describes the options to customize the storage behavior type Configuration struct { - PluginBinary string `yaml:"plugin-binary"` + PluginBinary string `yaml:"binary"` } diff --git a/plugin/storage/factory.go b/plugin/storage/factory.go index e6fc6b85c1d..71fa96b1ef2 100644 --- a/plugin/storage/factory.go +++ b/plugin/storage/factory.go @@ -25,7 +25,7 @@ import ( "github.com/jaegertracing/jaeger/plugin" "github.com/jaegertracing/jaeger/plugin/storage/cassandra" "github.com/jaegertracing/jaeger/plugin/storage/es" - "github.com/jaegertracing/jaeger/plugin/storage/external" + "github.com/jaegertracing/jaeger/plugin/storage/grpc" "github.com/jaegertracing/jaeger/plugin/storage/kafka" "github.com/jaegertracing/jaeger/plugin/storage/memory" "github.com/jaegertracing/jaeger/storage" @@ -38,12 +38,10 @@ const ( elasticsearchStorageType = "elasticsearch" memoryStorageType = "memory" kafkaStorageType = "kafka" - // TODO(olivierboucher): I'm confused with the naming since I didn't want to name the package "plugin" but using "external" here - // does not make sense really - pluginStorageType = "plugin" + grpcPluginStorageType = "grpc-plugin" ) -var allStorageTypes = []string{cassandraStorageType, elasticsearchStorageType, memoryStorageType, kafkaStorageType} +var allStorageTypes = []string{cassandraStorageType, elasticsearchStorageType, memoryStorageType, kafkaStorageType, grpcPluginStorageType} // Factory implements storage.Factory interface as a meta-factory for storage components. type Factory struct { @@ -83,8 +81,8 @@ func (f *Factory) getFactoryOfType(factoryType string) (storage.Factory, error) return memory.NewFactory(), nil case kafkaStorageType: return kafka.NewFactory(), nil - case pluginStorageType: - return external.NewFactory(), nil + case grpcPluginStorageType: + return grpc.NewFactory(), nil default: return nil, fmt.Errorf("Unknown storage type %s. Valid types are %v", factoryType, allStorageTypes) } diff --git a/plugin/storage/external/factory.go b/plugin/storage/grpc/factory.go similarity index 99% rename from plugin/storage/external/factory.go rename to plugin/storage/grpc/factory.go index c820df1e549..df4d1c21664 100644 --- a/plugin/storage/external/factory.go +++ b/plugin/storage/grpc/factory.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package external +package grpc import ( "flag" diff --git a/plugin/storage/external/options.go b/plugin/storage/grpc/options.go similarity index 89% rename from plugin/storage/external/options.go rename to plugin/storage/grpc/options.go index 5756ed3722d..e0ff53b7ca6 100644 --- a/plugin/storage/external/options.go +++ b/plugin/storage/grpc/options.go @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -package external +package grpc import ( "flag" "github.com/spf13/viper" - "github.com/jaegertracing/jaeger/pkg/external/config" + "github.com/jaegertracing/jaeger/pkg/grpc/config" ) -const pluginBinary = "external.plugin-binary" +const pluginBinary = "grpc-plugin.binary" type Options struct { Configuration config.Configuration diff --git a/plugin/storage/external/plugin.go b/plugin/storage/grpc/plugin.go similarity index 95% rename from plugin/storage/external/plugin.go rename to plugin/storage/grpc/plugin.go index 713091ce6f0..e077377f95c 100644 --- a/plugin/storage/external/plugin.go +++ b/plugin/storage/grpc/plugin.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package external +package grpc import ( "context" @@ -23,8 +23,8 @@ import ( "github.com/hashicorp/go-plugin" "github.com/jaegertracing/jaeger/model" - "github.com/jaegertracing/jaeger/pkg/external/config" - "github.com/jaegertracing/jaeger/plugin/storage/external/shared" + "github.com/jaegertracing/jaeger/pkg/grpc/config" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" "github.com/jaegertracing/jaeger/storage/spanstore" ) diff --git a/plugin/storage/external/proto/model.pb.go b/plugin/storage/grpc/proto/model.pb.go similarity index 100% rename from plugin/storage/external/proto/model.pb.go rename to plugin/storage/grpc/proto/model.pb.go diff --git a/plugin/storage/external/proto/model.proto b/plugin/storage/grpc/proto/model.proto similarity index 100% rename from plugin/storage/external/proto/model.proto rename to plugin/storage/grpc/proto/model.proto diff --git a/plugin/storage/external/proto/storage.pb.go b/plugin/storage/grpc/proto/storage.pb.go similarity index 100% rename from plugin/storage/external/proto/storage.pb.go rename to plugin/storage/grpc/proto/storage.pb.go diff --git a/plugin/storage/external/proto/storage.proto b/plugin/storage/grpc/proto/storage.proto similarity index 100% rename from plugin/storage/external/proto/storage.proto rename to plugin/storage/grpc/proto/storage.proto diff --git a/plugin/storage/external/shared/grpc.go b/plugin/storage/grpc/shared/grpc.go similarity index 99% rename from plugin/storage/external/shared/grpc.go rename to plugin/storage/grpc/shared/grpc.go index 29dd5d48964..37e53a841fb 100644 --- a/plugin/storage/external/shared/grpc.go +++ b/plugin/storage/grpc/shared/grpc.go @@ -20,7 +20,7 @@ import ( "time" "github.com/jaegertracing/jaeger/model" - "github.com/jaegertracing/jaeger/plugin/storage/external/proto" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/proto" "github.com/jaegertracing/jaeger/storage/spanstore" ) diff --git a/plugin/storage/external/shared/interface.go b/plugin/storage/grpc/shared/interface.go similarity index 96% rename from plugin/storage/external/shared/interface.go rename to plugin/storage/grpc/shared/interface.go index b42e52619f9..0fd11ba5685 100644 --- a/plugin/storage/external/shared/interface.go +++ b/plugin/storage/grpc/shared/interface.go @@ -20,7 +20,7 @@ import ( "github.com/hashicorp/go-plugin" "google.golang.org/grpc" - "github.com/jaegertracing/jaeger/plugin/storage/external/proto" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/proto" "github.com/jaegertracing/jaeger/storage/dependencystore" "github.com/jaegertracing/jaeger/storage/spanstore" ) diff --git a/plugin/storage/external/shared/mapping.go b/plugin/storage/grpc/shared/mapping.go similarity index 98% rename from plugin/storage/external/shared/mapping.go rename to plugin/storage/grpc/shared/mapping.go index 387c88e324f..9bd8bbf83db 100644 --- a/plugin/storage/external/shared/mapping.go +++ b/plugin/storage/grpc/shared/mapping.go @@ -18,7 +18,7 @@ import ( "time" "github.com/jaegertracing/jaeger/model" - "github.com/jaegertracing/jaeger/plugin/storage/external/proto" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/proto" ) func DependencyLinkSliceFromProto(p []*proto.DependencyLink) []model.DependencyLink { @@ -171,6 +171,8 @@ func ValueTypeFromProto(p proto.ValueType) model.ValueType { switch p { case proto.ValueType_ValueType_STRING: return model.ValueType_STRING + case proto.ValueType_ValueType_BOOL: + return model.ValueType_BOOL case proto.ValueType_ValueType_INT64: return model.ValueType_INT64 case proto.ValueType_ValueType_FLOAT64: From b0bd3219f7a5d9d978642c389552479517731430 Mon Sep 17 00:00:00 2001 From: Olivier Boucher Date: Sun, 9 Dec 2018 19:27:06 -0500 Subject: [PATCH 03/11] Refactored gRPC storage plugin protos Now makes use of protos from model/proto/model.proto and removed mapping functions. Plugin invoker calls the plugin binary directly instead of relying on sh. Signed-off-by: Olivier Boucher Refactored gRPC plugin protos to use defined models Removed mapping code. Removed used of sh, calling plugin binary directly. Signed-off-by: Olivier Boucher --- Makefile | 14 +- cmd/memory-grpc-plugin/main.go | 2 +- model/ids.go | 36 - model/model.pb.go | 299 ++- model/proto/model.proto | 9 +- model/prototest/model_test.pb.go | 66 +- plugin/storage/grpc/plugin.go | 14 +- plugin/storage/grpc/proto/model.pb.go | 547 ---- plugin/storage/grpc/proto/model.proto | 90 - plugin/storage/grpc/proto/storage.pb.go | 3283 ++++++++++++++++++++--- plugin/storage/grpc/proto/storage.proto | 75 +- plugin/storage/grpc/shared/grpc.go | 107 +- plugin/storage/grpc/shared/interface.go | 2 - plugin/storage/grpc/shared/mapping.go | 422 --- proto-gen/openapi/api_v2.swagger.json | 19 +- 15 files changed, 3300 insertions(+), 1685 deletions(-) delete mode 100644 plugin/storage/grpc/proto/model.pb.go delete mode 100644 plugin/storage/grpc/proto/model.proto delete mode 100644 plugin/storage/grpc/shared/mapping.go diff --git a/Makefile b/Makefile index b65836a05bf..2382f072ace 100644 --- a/Makefile +++ b/Makefile @@ -323,9 +323,11 @@ PROTO_INCLUDES := \ -I model/proto \ -I vendor/github.com/grpc-ecosystem/grpc-gateway \ -I vendor/github.com/gogo/googleapis \ + -I vendor/github.com/gogo/protobuf/protobuf \ -I vendor/github.com/gogo/protobuf # Remapping of std types to gogo types (must not contain spaces) PROTO_GOGO_MAPPINGS := $(shell echo \ + Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/types, \ Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types, \ Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types, \ Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types, \ @@ -390,7 +392,11 @@ proto-install: .PHONY: plugin-proto plugin-proto: protoc \ - -I plugin/storage/external/proto \ - --go_out=plugins=grpc:$(PWD)/plugin/storage/external/proto \ - plugin/storage/external/proto/storage.proto \ - plugin/storage/external/proto/model.proto \ No newline at end of file + -I model/proto \ + -I vendor/github.com/grpc-ecosystem/grpc-gateway \ + -I vendor/github.com/gogo/googleapis \ + -I vendor/github.com/gogo/protobuf/protobuf \ + -I vendor/github.com/gogo/protobuf \ + -I plugin/storage/grpc/proto \ + --gogo_out=plugins=grpc,$(PROTO_GOGO_MAPPINGS):$(PWD)/plugin/storage/grpc/proto \ + plugin/storage/grpc/proto/storage.proto \ No newline at end of file diff --git a/cmd/memory-grpc-plugin/main.go b/cmd/memory-grpc-plugin/main.go index 1bbf135c9ad..5d4b315b5b4 100644 --- a/cmd/memory-grpc-plugin/main.go +++ b/cmd/memory-grpc-plugin/main.go @@ -25,7 +25,7 @@ func main() { plugin.Serve(&plugin.ServeConfig{ HandshakeConfig: shared.Handshake, VersionedPlugins: map[int]plugin.PluginSet{ - 18: map[string]plugin.Plugin{ + 1: map[string]plugin.Plugin{ shared.StoragePluginIdentifier: &shared.StorageGRPCPlugin{ Impl: memory.NewStore(), }, diff --git a/model/ids.go b/model/ids.go index 1cb1849ecb2..50aa79b68dc 100644 --- a/model/ids.go +++ b/model/ids.go @@ -23,12 +23,6 @@ import ( "github.com/gogo/protobuf/jsonpb" ) -// TraceID is a random 128bit identifier for a trace -type TraceID struct { - Low uint64 `json:"lo"` - High uint64 `json:"hi"` -} - // SpanID is a random 64bit identifier for a span type SpanID uint64 @@ -39,13 +33,6 @@ func NewTraceID(high, low uint64) TraceID { return TraceID{High: high, Low: low} } -func (t TraceID) String() string { - if t.High == 0 { - return fmt.Sprintf("%x", t.Low) - } - return fmt.Sprintf("%x%016x", t.High, t.Low) -} - // TraceIDFromString creates a TraceID from a hexadecimal string func TraceIDFromString(s string) (TraceID, error) { var hi, lo uint64 @@ -78,29 +65,6 @@ func (t *TraceID) UnmarshalText(text []byte) error { return fmt.Errorf("unsupported method TraceID.UnmarshalText; please use github.com/gogo/protobuf/jsonpb for marshalling") } -// Size returns the size of this datum in protobuf. It is always 16 bytes. -func (t *TraceID) Size() int { - return 16 -} - -// MarshalTo converts trace ID into a binary representation. Called by protobuf serialization. -func (t *TraceID) MarshalTo(data []byte) (n int, err error) { - var b [16]byte - binary.BigEndian.PutUint64(b[:8], uint64(t.High)) - binary.BigEndian.PutUint64(b[8:], uint64(t.Low)) - return marshalBytes(data, b[:]) -} - -// Unmarshal inflates this trace ID from binary representation. Called by protobuf serialization. -func (t *TraceID) Unmarshal(data []byte) error { - if len(data) < 16 { - return fmt.Errorf("buffer is too short") - } - t.High = binary.BigEndian.Uint64(data[:8]) - t.Low = binary.BigEndian.Uint64(data[8:]) - return nil -} - func marshalBytes(dst []byte, src []byte) (n int, err error) { if len(dst) < len(src) { return 0, fmt.Errorf("buffer is too short") diff --git a/model/model.pb.go b/model/model.pb.go index a2877bd5feb..2bb2c1c6232 100644 --- a/model/model.pb.go +++ b/model/model.pb.go @@ -13,6 +13,7 @@ SpanRef Process Span + TraceID Trace Batch */ @@ -189,7 +190,7 @@ func (m *Log) GetFields() []KeyValue { } type SpanRef struct { - TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"` + TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,customtype=TraceID" json:"trace_id"` SpanID SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=SpanID" json:"span_id"` RefType SpanRefType `protobuf:"varint,3,opt,name=ref_type,json=refType,proto3,enum=jaeger.api_v2.SpanRefType" json:"ref_type,omitempty"` } @@ -231,7 +232,7 @@ func (m *Process) GetTags() []KeyValue { } type Span struct { - TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"` + TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,customtype=TraceID" json:"trace_id"` SpanID SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=SpanID" json:"span_id"` OperationName string `protobuf:"bytes,3,opt,name=operation_name,json=operationName,proto3" json:"operation_name,omitempty"` References []SpanRef `protobuf:"bytes,4,rep,name=references" json:"references"` @@ -313,6 +314,30 @@ func (m *Span) GetWarnings() []string { return nil } +type TraceID struct { + Low uint64 `protobuf:"varint,1,opt,name=low,proto3" json:"low,omitempty"` + High uint64 `protobuf:"varint,2,opt,name=high,proto3" json:"high,omitempty"` +} + +func (m *TraceID) Reset() { *m = TraceID{} } +func (m *TraceID) String() string { return proto.CompactTextString(m) } +func (*TraceID) ProtoMessage() {} +func (*TraceID) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{5} } + +func (m *TraceID) GetLow() uint64 { + if m != nil { + return m.Low + } + return 0 +} + +func (m *TraceID) GetHigh() uint64 { + if m != nil { + return m.High + } + return 0 +} + type Trace struct { Spans []*Span `protobuf:"bytes,1,rep,name=spans" json:"spans,omitempty"` ProcessMap []Trace_ProcessMapping `protobuf:"bytes,2,rep,name=process_map,json=processMap" json:"process_map"` @@ -322,7 +347,7 @@ type Trace struct { func (m *Trace) Reset() { *m = Trace{} } func (m *Trace) String() string { return proto.CompactTextString(m) } func (*Trace) ProtoMessage() {} -func (*Trace) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{5} } +func (*Trace) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{6} } func (m *Trace) GetSpans() []*Span { if m != nil { @@ -353,7 +378,7 @@ type Trace_ProcessMapping struct { func (m *Trace_ProcessMapping) Reset() { *m = Trace_ProcessMapping{} } func (m *Trace_ProcessMapping) String() string { return proto.CompactTextString(m) } func (*Trace_ProcessMapping) ProtoMessage() {} -func (*Trace_ProcessMapping) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{5, 0} } +func (*Trace_ProcessMapping) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{6, 0} } func (m *Trace_ProcessMapping) GetProcessID() string { if m != nil { @@ -377,7 +402,7 @@ type Batch struct { func (m *Batch) Reset() { *m = Batch{} } func (m *Batch) String() string { return proto.CompactTextString(m) } func (*Batch) ProtoMessage() {} -func (*Batch) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{6} } +func (*Batch) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{7} } func (m *Batch) GetSpans() []*Span { if m != nil { @@ -404,6 +429,8 @@ func init() { golang_proto.RegisterType((*Process)(nil), "jaeger.api_v2.Process") proto.RegisterType((*Span)(nil), "jaeger.api_v2.Span") golang_proto.RegisterType((*Span)(nil), "jaeger.api_v2.Span") + proto.RegisterType((*TraceID)(nil), "jaeger.api_v2.TraceID") + golang_proto.RegisterType((*TraceID)(nil), "jaeger.api_v2.TraceID") proto.RegisterType((*Trace)(nil), "jaeger.api_v2.Trace") golang_proto.RegisterType((*Trace)(nil), "jaeger.api_v2.Trace") proto.RegisterType((*Trace_ProcessMapping)(nil), "jaeger.api_v2.Trace.ProcessMapping") @@ -832,6 +859,34 @@ func (m *Span) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *TraceID) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TraceID) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Low != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintModel(dAtA, i, uint64(m.Low)) + } + if m.High != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintModel(dAtA, i, uint64(m.High)) + } + return i, nil +} + func (m *Trace) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1096,6 +1151,18 @@ func (m *Span) Size() (n int) { return n } +func (m *TraceID) Size() (n int) { + var l int + _ = l + if m.Low != 0 { + n += 1 + sovModel(uint64(m.Low)) + } + if m.High != 0 { + n += 1 + sovModel(uint64(m.High)) + } + return n +} + func (m *Trace) Size() (n int) { var l int _ = l @@ -1513,7 +1580,7 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModel @@ -1523,15 +1590,15 @@ func (m *SpanRef) 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 ErrInvalidLengthModel } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } @@ -1752,7 +1819,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModel @@ -1762,15 +1829,15 @@ func (m *Span) 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 ErrInvalidLengthModel } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } @@ -2121,6 +2188,94 @@ func (m *Span) Unmarshal(dAtA []byte) error { } return nil } +func (m *TraceID) 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 ErrIntOverflowModel + } + 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: TraceID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Low", wireType) + } + m.Low = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Low |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field High", wireType) + } + m.High = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.High |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipModel(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Trace) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2594,62 +2749,64 @@ func init() { proto.RegisterFile("model.proto", fileDescriptorModel) } func init() { golang_proto.RegisterFile("model.proto", fileDescriptorModel) } var fileDescriptorModel = []byte{ - // 905 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x41, 0x8f, 0xdb, 0x44, - 0x14, 0xde, 0x49, 0xec, 0xd8, 0x79, 0x49, 0x56, 0xd1, 0x14, 0x58, 0x37, 0xa0, 0x24, 0xa4, 0x42, - 0x0a, 0x55, 0x49, 0xda, 0xd0, 0xee, 0x01, 0x21, 0xa1, 0xba, 0x4b, 0xc0, 0x90, 0xdd, 0xa0, 0xd9, - 0x08, 0x04, 0x17, 0x6b, 0x36, 0x99, 0x18, 0x17, 0xc7, 0x63, 0xd9, 0x5e, 0xa3, 0xdc, 0xf8, 0x09, - 0x88, 0x13, 0x47, 0xb8, 0xf2, 0x2b, 0x38, 0xf6, 0xc8, 0x81, 0x13, 0x12, 0x0b, 0x0a, 0x97, 0xfe, - 0x0c, 0x34, 0xe3, 0x71, 0xb6, 0x1b, 0x2a, 0xd8, 0x5e, 0x38, 0x79, 0x66, 0xde, 0xf7, 0xde, 0x7c, - 0xef, 0x7b, 0x9f, 0x6d, 0xa8, 0xad, 0xf8, 0x82, 0x05, 0x83, 0x28, 0xe6, 0x29, 0xc7, 0x8d, 0xc7, - 0x94, 0x79, 0x2c, 0x1e, 0xd0, 0xc8, 0x77, 0xb3, 0x51, 0xeb, 0x25, 0x8f, 0x7b, 0x5c, 0x46, 0x86, - 0x62, 0x95, 0x83, 0x5a, 0xaf, 0x79, 0x9c, 0x7b, 0x01, 0x1b, 0xd2, 0xc8, 0x1f, 0xd2, 0x30, 0xe4, - 0x29, 0x4d, 0x7d, 0x1e, 0x26, 0x2a, 0xda, 0x51, 0x51, 0xb9, 0x3b, 0x3b, 0x5f, 0x0e, 0x53, 0x7f, - 0xc5, 0x92, 0x94, 0xae, 0x22, 0x05, 0x68, 0xef, 0x02, 0x16, 0xe7, 0xb1, 0xac, 0x90, 0xc7, 0x7b, - 0xbf, 0x22, 0x30, 0x3f, 0x66, 0xeb, 0x4f, 0x69, 0x70, 0xce, 0x70, 0x13, 0xca, 0x5f, 0xb1, 0xb5, - 0x85, 0xba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xf8, 0xe1, 0xa5, 0xb0, 0xa5, 0x7f, 0x13, 0x56, 0xd1, 0x2a, - 0xc0, 0xbd, 0xc7, 0xa0, 0xdb, 0x34, 0x9d, 0x7f, 0xf9, 0x22, 0x9a, 0xbc, 0xd0, 0x5d, 0x68, 0x7b, - 0xd7, 0xed, 0xf7, 0xa1, 0xba, 0xfd, 0x19, 0x60, 0x80, 0xca, 0xe9, 0x8c, 0x38, 0x27, 0x1f, 0x34, - 0xf7, 0xb0, 0x09, 0x9a, 0x3d, 0x9d, 0x4e, 0x9a, 0x08, 0x57, 0x41, 0x77, 0x4e, 0x66, 0x87, 0xf7, - 0x9b, 0x25, 0x5c, 0x03, 0x63, 0x3c, 0x99, 0x3e, 0x14, 0x9b, 0xb2, 0x40, 0xdb, 0xce, 0xc9, 0x43, - 0xf2, 0x79, 0x53, 0xbb, 0xfd, 0x16, 0xd4, 0x9e, 0xf9, 0x40, 0xe1, 0x3a, 0x98, 0x8f, 0x3e, 0x74, - 0x26, 0x47, 0xee, 0x74, 0xdc, 0xdc, 0xc3, 0x4d, 0xa8, 0x8f, 0xa7, 0x93, 0xc9, 0xf4, 0xb3, 0x53, - 0x77, 0x4c, 0xa6, 0xc7, 0x4d, 0x64, 0xdf, 0x7d, 0xb2, 0x69, 0xa3, 0x5f, 0x36, 0x6d, 0xf4, 0xe7, - 0xa6, 0x8d, 0x7e, 0xfe, 0xab, 0x8d, 0xe0, 0xc0, 0xe7, 0x8a, 0xb0, 0xf8, 0x74, 0xf8, 0xa1, 0xa7, - 0x78, 0x7f, 0xa1, 0xcb, 0x5f, 0xef, 0x59, 0x45, 0xbe, 0x2c, 0x6f, 0xff, 0x1d, 0x00, 0x00, 0xff, - 0xff, 0xc9, 0x46, 0x02, 0x11, 0x8a, 0x07, 0x00, 0x00, + // 938 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x41, 0x8f, 0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 0x8a, 0xdf, 0xb1, 0x77, 0x54, 0x55, 0xfa, 0x50, 0x5c, 0x92, 0xdc, 0x87, 0x1f, 0x03, 0x24, 0x29, + 0x8d, 0x53, 0x57, 0x88, 0x50, 0x2e, 0xc0, 0xb5, 0x65, 0x2b, 0xe3, 0x84, 0x07, 0x7f, 0x08, 0x66, + 0xb1, 0xeb, 0x72, 0x4f, 0xaa, 0x83, 0x5b, 0xff, 0x4a, 0x71, 0xa0, 0x00, 0x79, 0x86, 0x1f, 0x44, + 0x86, 0x75, 0xd0, 0x7a, 0x9a, 0xe6, 0xb5, 0xa7, 0x89, 0xef, 0x82, 0x16, 0x70, 0x2f, 0xb1, 0x2a, + 0x32, 0x04, 0x6f, 0x84, 0x8c, 0xb8, 0x57, 0xa0, 0x05, 0x0a, 0xdf, 0x03, 0x23, 0xca, 0xc5, 0x65, + 0xc1, 0x95, 0x13, 0x57, 0xd2, 0x23, 0x05, 0x0c, 0xdf, 0x05, 0x50, 0xa6, 0x18, 0x6c, 0x55, 0x8c, + 0xc7, 0xde, 0x59, 0x9d, 0xb7, 0x2a, 0x0a, 0xe9, 0x1c, 0x90, 0x8a, 0x02, 0x38, 0x33, 0xdc, 0x00, + 0xf3, 0x29, 0x8d, 0x43, 0x3f, 0xf4, 0x12, 0xab, 0xd6, 0x2e, 0x75, 0x2b, 0x64, 0x7d, 0xee, 0xf4, + 0xa1, 0xd0, 0x8c, 0xf8, 0xea, 0x05, 0xfc, 0xa9, 0x14, 0x9d, 0x46, 0x84, 0x89, 0x31, 0x68, 0xa7, + 0xbe, 0x77, 0x2a, 0x95, 0xa3, 0x11, 0x69, 0x77, 0xbe, 0xdf, 0x06, 0x5d, 0x46, 0xe0, 0x77, 0x40, + 0x17, 0x8a, 0x49, 0x2c, 0x24, 0xbb, 0xbc, 0x71, 0xd5, 0xec, 0x73, 0x04, 0xfe, 0x14, 0xaa, 0x45, + 0xbd, 0x0b, 0x1a, 0xa9, 0xbd, 0xb8, 0x7d, 0x95, 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0x00, 0x00, + 0xff, 0xff, 0x45, 0x93, 0xae, 0x51, 0xeb, 0x07, 0x00, 0x00, } diff --git a/model/proto/model.proto b/model/proto/model.proto index 3bce8a1ac5a..f594ddadd4d 100644 --- a/model/proto/model.proto +++ b/model/proto/model.proto @@ -76,7 +76,7 @@ enum SpanRefType { }; message SpanRef { - bytes trace_id = 1 [ + TraceID trace_id = 1 [ (gogoproto.nullable) = false, (gogoproto.customtype) = "TraceID", (gogoproto.customname) = "TraceID" @@ -97,7 +97,7 @@ message Process { } message Span { - bytes trace_id = 1 [ + TraceID trace_id = 1 [ (gogoproto.nullable) = false, (gogoproto.customtype) = "TraceID", (gogoproto.customname) = "TraceID" @@ -136,6 +136,11 @@ message Span { repeated string warnings = 12; } +message TraceID { + uint64 low = 1; + uint64 high = 2; +} + message Trace { message ProcessMapping { string process_id = 1 [ diff --git a/model/prototest/model_test.pb.go b/model/prototest/model_test.pb.go index 87a1e7dd6fc..3a9c61d7bf1 100644 --- a/model/prototest/model_test.pb.go +++ b/model/prototest/model_test.pb.go @@ -1,20 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: model_test.proto -/* -Package prototest is a generated protocol buffer package. - -It is generated from these files: - model_test.proto - -It has these top-level messages: - SpanRef -*/ package prototest -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -38,6 +31,7 @@ var SpanRefType_name = map[int32]string{ 0: "CHILD_OF", 1: "FOLLOWS_FROM", } + var SpanRefType_value = map[string]int32{ "CHILD_OF": 0, "FOLLOWS_FROM": 1, @@ -46,18 +40,44 @@ var SpanRefType_value = map[string]int32{ func (x SpanRefType) String() string { return proto.EnumName(SpanRefType_name, int32(x)) } -func (SpanRefType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (SpanRefType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_7d019f60590a05da, []int{0} +} type SpanRef struct { - TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` - SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` - RefType SpanRefType `protobuf:"varint,3,opt,name=ref_type,json=refType,enum=prototest.SpanRefType" json:"ref_type,omitempty"` + TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` + RefType SpanRefType `protobuf:"varint,3,opt,name=ref_type,json=refType,proto3,enum=prototest.SpanRefType" json:"ref_type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SpanRef) Reset() { *m = SpanRef{} } +func (m *SpanRef) String() string { return proto.CompactTextString(m) } +func (*SpanRef) ProtoMessage() {} +func (*SpanRef) Descriptor() ([]byte, []int) { + return fileDescriptor_7d019f60590a05da, []int{0} } -func (m *SpanRef) Reset() { *m = SpanRef{} } -func (m *SpanRef) String() string { return proto.CompactTextString(m) } -func (*SpanRef) ProtoMessage() {} -func (*SpanRef) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (m *SpanRef) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SpanRef.Unmarshal(m, b) +} +func (m *SpanRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SpanRef.Marshal(b, m, deterministic) +} +func (m *SpanRef) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpanRef.Merge(m, src) +} +func (m *SpanRef) XXX_Size() int { + return xxx_messageInfo_SpanRef.Size(m) +} +func (m *SpanRef) XXX_DiscardUnknown() { + xxx_messageInfo_SpanRef.DiscardUnknown(m) +} + +var xxx_messageInfo_SpanRef proto.InternalMessageInfo func (m *SpanRef) GetTraceId() []byte { if m != nil { @@ -81,13 +101,13 @@ func (m *SpanRef) GetRefType() SpanRefType { } func init() { - proto.RegisterType((*SpanRef)(nil), "prototest.SpanRef") proto.RegisterEnum("prototest.SpanRefType", SpanRefType_name, SpanRefType_value) + proto.RegisterType((*SpanRef)(nil), "prototest.SpanRef") } -func init() { proto.RegisterFile("model_test.proto", fileDescriptor0) } +func init() { proto.RegisterFile("model_test.proto", fileDescriptor_7d019f60590a05da) } -var fileDescriptor0 = []byte{ +var fileDescriptor_7d019f60590a05da = []byte{ // 178 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc8, 0xcd, 0x4f, 0x49, 0xcd, 0x89, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x04, 0x53, diff --git a/plugin/storage/grpc/plugin.go b/plugin/storage/grpc/plugin.go index e077377f95c..6e828b15dd5 100644 --- a/plugin/storage/grpc/plugin.go +++ b/plugin/storage/grpc/plugin.go @@ -17,10 +17,8 @@ package grpc import ( "context" "fmt" - "os/exec" - "time" - "github.com/hashicorp/go-plugin" + "os/exec" "github.com/jaegertracing/jaeger/model" "github.com/jaegertracing/jaeger/pkg/grpc/config" @@ -39,9 +37,9 @@ func WithConfiguration(configuration config.Configuration) (*Store, error) { client := plugin.NewClient(&plugin.ClientConfig{ HandshakeConfig: shared.Handshake, VersionedPlugins: map[int]plugin.PluginSet{ - 18: shared.PluginMap, + 1: shared.PluginMap, }, - Cmd: exec.Command("sh", "-c", configuration.PluginBinary), + Cmd: exec.Command(configuration.PluginBinary), AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC}, }) @@ -86,6 +84,6 @@ func (s *Store) FindTraces(ctx context.Context, query *spanstore.TraceQueryParam return s.plugin.FindTraces(ctx, query) } -func (s *Store) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { - return s.plugin.GetDependencies(endTs, lookback) -} +//func (s *Store) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { +// return s.plugin.GetDependencies(endTs, lookback) +//} diff --git a/plugin/storage/grpc/proto/model.pb.go b/plugin/storage/grpc/proto/model.pb.go deleted file mode 100644 index 40d4d6a3490..00000000000 --- a/plugin/storage/grpc/proto/model.pb.go +++ /dev/null @@ -1,547 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: model.proto - -package proto - -import proto1 "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto1.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type SpanRefType int32 - -const ( - SpanRefType_SpanRefType_CHILD_OF SpanRefType = 0 - SpanRefType_SpanRefType_FOLLOWS_FROM SpanRefType = 1 -) - -var SpanRefType_name = map[int32]string{ - 0: "SpanRefType_CHILD_OF", - 1: "SpanRefType_FOLLOWS_FROM", -} -var SpanRefType_value = map[string]int32{ - "SpanRefType_CHILD_OF": 0, - "SpanRefType_FOLLOWS_FROM": 1, -} - -func (x SpanRefType) String() string { - return proto1.EnumName(SpanRefType_name, int32(x)) -} -func (SpanRefType) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } - -type ValueType int32 - -const ( - ValueType_ValueType_STRING ValueType = 0 - ValueType_ValueType_BOOL ValueType = 1 - ValueType_ValueType_INT64 ValueType = 2 - ValueType_ValueType_FLOAT64 ValueType = 3 - ValueType_ValueType_BINARY ValueType = 4 -) - -var ValueType_name = map[int32]string{ - 0: "ValueType_STRING", - 1: "ValueType_BOOL", - 2: "ValueType_INT64", - 3: "ValueType_FLOAT64", - 4: "ValueType_BINARY", -} -var ValueType_value = map[string]int32{ - "ValueType_STRING": 0, - "ValueType_BOOL": 1, - "ValueType_INT64": 2, - "ValueType_FLOAT64": 3, - "ValueType_BINARY": 4, -} - -func (x ValueType) String() string { - return proto1.EnumName(ValueType_name, int32(x)) -} -func (ValueType) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } - -type DependencyLink struct { - Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"` - Child string `protobuf:"bytes,2,opt,name=child" json:"child,omitempty"` - CallCount uint64 `protobuf:"varint,3,opt,name=call_count,json=callCount" json:"call_count,omitempty"` -} - -func (m *DependencyLink) Reset() { *m = DependencyLink{} } -func (m *DependencyLink) String() string { return proto1.CompactTextString(m) } -func (*DependencyLink) ProtoMessage() {} -func (*DependencyLink) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } - -func (m *DependencyLink) GetParent() string { - if m != nil { - return m.Parent - } - return "" -} - -func (m *DependencyLink) GetChild() string { - if m != nil { - return m.Child - } - return "" -} - -func (m *DependencyLink) GetCallCount() uint64 { - if m != nil { - return m.CallCount - } - return 0 -} - -type TraceId struct { - Low uint64 `protobuf:"varint,1,opt,name=low" json:"low,omitempty"` - High uint64 `protobuf:"varint,2,opt,name=high" json:"high,omitempty"` -} - -func (m *TraceId) Reset() { *m = TraceId{} } -func (m *TraceId) String() string { return proto1.CompactTextString(m) } -func (*TraceId) ProtoMessage() {} -func (*TraceId) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } - -func (m *TraceId) GetLow() uint64 { - if m != nil { - return m.Low - } - return 0 -} - -func (m *TraceId) GetHigh() uint64 { - if m != nil { - return m.High - } - return 0 -} - -type SpanRef struct { - TraceId *TraceId `protobuf:"bytes,1,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"` - SpanId uint64 `protobuf:"varint,2,opt,name=span_id,json=spanId" json:"span_id,omitempty"` - RefType SpanRefType `protobuf:"varint,3,opt,name=ref_type,json=refType,enum=proto.SpanRefType" json:"ref_type,omitempty"` -} - -func (m *SpanRef) Reset() { *m = SpanRef{} } -func (m *SpanRef) String() string { return proto1.CompactTextString(m) } -func (*SpanRef) ProtoMessage() {} -func (*SpanRef) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} } - -func (m *SpanRef) GetTraceId() *TraceId { - if m != nil { - return m.TraceId - } - return nil -} - -func (m *SpanRef) GetSpanId() uint64 { - if m != nil { - return m.SpanId - } - return 0 -} - -func (m *SpanRef) GetRefType() SpanRefType { - if m != nil { - return m.RefType - } - return SpanRefType_SpanRefType_CHILD_OF -} - -type KeyValue struct { - Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` - ValueType ValueType `protobuf:"varint,2,opt,name=value_type,json=valueType,enum=proto.ValueType" json:"value_type,omitempty"` - StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` - BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue" json:"bool_value,omitempty"` - Int64Value int64 `protobuf:"varint,5,opt,name=int64_value,json=int64Value" json:"int64_value,omitempty"` - Float64Value float64 `protobuf:"fixed64,6,opt,name=float64_value,json=float64Value" json:"float64_value,omitempty"` - BinaryValue []byte `protobuf:"bytes,7,opt,name=binary_value,json=binaryValue,proto3" json:"binary_value,omitempty"` -} - -func (m *KeyValue) Reset() { *m = KeyValue{} } -func (m *KeyValue) String() string { return proto1.CompactTextString(m) } -func (*KeyValue) ProtoMessage() {} -func (*KeyValue) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} } - -func (m *KeyValue) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *KeyValue) GetValueType() ValueType { - if m != nil { - return m.ValueType - } - return ValueType_ValueType_STRING -} - -func (m *KeyValue) GetStringValue() string { - if m != nil { - return m.StringValue - } - return "" -} - -func (m *KeyValue) GetBoolValue() bool { - if m != nil { - return m.BoolValue - } - return false -} - -func (m *KeyValue) GetInt64Value() int64 { - if m != nil { - return m.Int64Value - } - return 0 -} - -func (m *KeyValue) GetFloat64Value() float64 { - if m != nil { - return m.Float64Value - } - return 0 -} - -func (m *KeyValue) GetBinaryValue() []byte { - if m != nil { - return m.BinaryValue - } - return nil -} - -type Log struct { - Timestamp *Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"` - Fields []*KeyValue `protobuf:"bytes,2,rep,name=fields" json:"fields,omitempty"` -} - -func (m *Log) Reset() { *m = Log{} } -func (m *Log) String() string { return proto1.CompactTextString(m) } -func (*Log) ProtoMessage() {} -func (*Log) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} } - -func (m *Log) GetTimestamp() *Timestamp { - if m != nil { - return m.Timestamp - } - return nil -} - -func (m *Log) GetFields() []*KeyValue { - if m != nil { - return m.Fields - } - return nil -} - -type Process struct { - ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName" json:"service_name,omitempty"` - Tags []*KeyValue `protobuf:"bytes,2,rep,name=tags" json:"tags,omitempty"` -} - -func (m *Process) Reset() { *m = Process{} } -func (m *Process) String() string { return proto1.CompactTextString(m) } -func (*Process) ProtoMessage() {} -func (*Process) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} } - -func (m *Process) GetServiceName() string { - if m != nil { - return m.ServiceName - } - return "" -} - -func (m *Process) GetTags() []*KeyValue { - if m != nil { - return m.Tags - } - return nil -} - -type TraceProcessMapping struct { - ProcessId string `protobuf:"bytes,1,opt,name=process_id,json=processId" json:"process_id,omitempty"` - Process *Process `protobuf:"bytes,2,opt,name=process" json:"process,omitempty"` -} - -func (m *TraceProcessMapping) Reset() { *m = TraceProcessMapping{} } -func (m *TraceProcessMapping) String() string { return proto1.CompactTextString(m) } -func (*TraceProcessMapping) ProtoMessage() {} -func (*TraceProcessMapping) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} } - -func (m *TraceProcessMapping) GetProcessId() string { - if m != nil { - return m.ProcessId - } - return "" -} - -func (m *TraceProcessMapping) GetProcess() *Process { - if m != nil { - return m.Process - } - return nil -} - -type Span struct { - TraceId *TraceId `protobuf:"bytes,1,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"` - SpanId uint64 `protobuf:"varint,2,opt,name=span_id,json=spanId" json:"span_id,omitempty"` - OperationName string `protobuf:"bytes,3,opt,name=operation_name,json=operationName" json:"operation_name,omitempty"` - References []*SpanRef `protobuf:"bytes,4,rep,name=references" json:"references,omitempty"` - Flags uint32 `protobuf:"varint,5,opt,name=flags" json:"flags,omitempty"` - StartTime *Timestamp `protobuf:"bytes,6,opt,name=start_time,json=startTime" json:"start_time,omitempty"` - Duration *Duration `protobuf:"bytes,7,opt,name=duration" json:"duration,omitempty"` - Tags []*KeyValue `protobuf:"bytes,8,rep,name=tags" json:"tags,omitempty"` - Logs []*Log `protobuf:"bytes,9,rep,name=logs" json:"logs,omitempty"` - Process *Process `protobuf:"bytes,10,opt,name=process" json:"process,omitempty"` - ProcessId string `protobuf:"bytes,11,opt,name=process_id,json=processId" json:"process_id,omitempty"` - Warnings []string `protobuf:"bytes,12,rep,name=warnings" json:"warnings,omitempty"` -} - -func (m *Span) Reset() { *m = Span{} } -func (m *Span) String() string { return proto1.CompactTextString(m) } -func (*Span) ProtoMessage() {} -func (*Span) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} } - -func (m *Span) GetTraceId() *TraceId { - if m != nil { - return m.TraceId - } - return nil -} - -func (m *Span) GetSpanId() uint64 { - if m != nil { - return m.SpanId - } - return 0 -} - -func (m *Span) GetOperationName() string { - if m != nil { - return m.OperationName - } - return "" -} - -func (m *Span) GetReferences() []*SpanRef { - if m != nil { - return m.References - } - return nil -} - -func (m *Span) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -func (m *Span) GetStartTime() *Timestamp { - if m != nil { - return m.StartTime - } - return nil -} - -func (m *Span) GetDuration() *Duration { - if m != nil { - return m.Duration - } - return nil -} - -func (m *Span) GetTags() []*KeyValue { - if m != nil { - return m.Tags - } - return nil -} - -func (m *Span) GetLogs() []*Log { - if m != nil { - return m.Logs - } - return nil -} - -func (m *Span) GetProcess() *Process { - if m != nil { - return m.Process - } - return nil -} - -func (m *Span) GetProcessId() string { - if m != nil { - return m.ProcessId - } - return "" -} - -func (m *Span) GetWarnings() []string { - if m != nil { - return m.Warnings - } - return nil -} - -type Trace struct { - Spans []*Span `protobuf:"bytes,1,rep,name=spans" json:"spans,omitempty"` - ProcessMap []*TraceProcessMapping `protobuf:"bytes,2,rep,name=process_map,json=processMap" json:"process_map,omitempty"` - Warnings []string `protobuf:"bytes,3,rep,name=warnings" json:"warnings,omitempty"` -} - -func (m *Trace) Reset() { *m = Trace{} } -func (m *Trace) String() string { return proto1.CompactTextString(m) } -func (*Trace) ProtoMessage() {} -func (*Trace) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} } - -func (m *Trace) GetSpans() []*Span { - if m != nil { - return m.Spans - } - return nil -} - -func (m *Trace) GetProcessMap() []*TraceProcessMapping { - if m != nil { - return m.ProcessMap - } - return nil -} - -func (m *Trace) GetWarnings() []string { - if m != nil { - return m.Warnings - } - return nil -} - -// NOTE(olivierboucher): would rather use google's wrappers but given the current context its easier -type Timestamp struct { - Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` - Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` -} - -func (m *Timestamp) Reset() { *m = Timestamp{} } -func (m *Timestamp) String() string { return proto1.CompactTextString(m) } -func (*Timestamp) ProtoMessage() {} -func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{9} } - -func (m *Timestamp) GetSeconds() int64 { - if m != nil { - return m.Seconds - } - return 0 -} - -func (m *Timestamp) GetNanos() int32 { - if m != nil { - return m.Nanos - } - return 0 -} - -// NOTE(olivierboucher): would rather use google's wrappers but given the current context its easier -type Duration struct { - Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` - Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"` -} - -func (m *Duration) Reset() { *m = Duration{} } -func (m *Duration) String() string { return proto1.CompactTextString(m) } -func (*Duration) ProtoMessage() {} -func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{10} } - -func (m *Duration) GetSeconds() int64 { - if m != nil { - return m.Seconds - } - return 0 -} - -func (m *Duration) GetNanos() int32 { - if m != nil { - return m.Nanos - } - return 0 -} - -func init() { - proto1.RegisterType((*DependencyLink)(nil), "proto.DependencyLink") - proto1.RegisterType((*TraceId)(nil), "proto.TraceId") - proto1.RegisterType((*SpanRef)(nil), "proto.SpanRef") - proto1.RegisterType((*KeyValue)(nil), "proto.KeyValue") - proto1.RegisterType((*Log)(nil), "proto.Log") - proto1.RegisterType((*Process)(nil), "proto.Process") - proto1.RegisterType((*TraceProcessMapping)(nil), "proto.TraceProcessMapping") - proto1.RegisterType((*Span)(nil), "proto.Span") - proto1.RegisterType((*Trace)(nil), "proto.Trace") - proto1.RegisterType((*Timestamp)(nil), "proto.Timestamp") - proto1.RegisterType((*Duration)(nil), "proto.Duration") - proto1.RegisterEnum("proto.SpanRefType", SpanRefType_name, SpanRefType_value) - proto1.RegisterEnum("proto.ValueType", ValueType_name, ValueType_value) -} - -func init() { proto1.RegisterFile("model.proto", fileDescriptor1) } - -var fileDescriptor1 = []byte{ - // 814 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x5d, 0x6f, 0xdc, 0x44, - 0x14, 0xad, 0x63, 0xef, 0xda, 0xbe, 0xde, 0x6c, 0xcd, 0x34, 0x80, 0x55, 0x51, 0x70, 0x8c, 0x10, - 0xa6, 0x88, 0x54, 0x0a, 0x55, 0x1f, 0xe8, 0x53, 0xdb, 0xb0, 0xb0, 0xc2, 0xd9, 0x85, 0xc9, 0x0a, - 0xc4, 0x03, 0xb5, 0x26, 0xf6, 0xac, 0x63, 0xd5, 0x3b, 0x63, 0xd9, 0x4e, 0xa2, 0x95, 0x78, 0xe3, - 0x87, 0xf1, 0xb7, 0x78, 0x44, 0xf3, 0xe1, 0xfd, 0x88, 0x20, 0x12, 0x12, 0x4f, 0x99, 0x7b, 0xee, - 0x99, 0xe3,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16, 0x1e, 0xc9, 0x24, 0x68, 0xdd, 0x73, 0x52, 0xd7, 0x25, 0x2b, 0xc4, 0x46, 0x6b, 0x85, 0xf4, - 0xc9, 0x71, 0xb1, 0xab, 0x91, 0x69, 0x8e, 0x62, 0xb0, 0x75, 0x21, 0x1d, 0xdc, 0xa6, 0x4a, 0xcb, - 0xe0, 0xbe, 0x1d, 0xfd, 0x69, 0x82, 0x25, 0x62, 0xf2, 0xbf, 0x24, 0xf1, 0x33, 0x18, 0xf3, 0x9a, - 0x36, 0xa4, 0x2b, 0x39, 0x53, 0xcf, 0x56, 0x61, 0x38, 0xdc, 0xa0, 0xf2, 0xe1, 0x27, 0x00, 0x0d, - 0x5d, 0xd2, 0x86, 0xb2, 0x8c, 0xb6, 0x81, 0x25, 0x9f, 0x3f, 0xde, 0x8f, 0x2c, 0xde, 0x61, 0x88, - 0xff, 0xca, 0x65, 0x25, 0x36, 0x25, 0x92, 0x71, 0x88, 0x55, 0x21, 0x82, 0xda, 0x76, 0xa4, 0xe9, - 0x52, 0x61, 0x94, 0x4c, 0xc4, 0x3f, 0xda, 0x28, 0x39, 0xa2, 0x46, 0x5f, 0x82, 0x93, 0x5f, 0xab, - 0x31, 0x64, 0x38, 0xb6, 0x3b, 0x3f, 0xd3, 0x30, 0xde, 0x10, 0x36, 0xe6, 0x38, 0xf7, 0x98, 0x83, - 0x3e, 0x06, 0xab, 0xe2, 0x45, 0x1b, 0xb8, 0x92, 0x04, 0x9a, 0x94, 0xf0, 0x02, 0x4b, 0x7c, 0xd7, - 0x06, 0xb8, 0xd7, 0x86, 0x3b, 0x7e, 0x7a, 0x77, 0xfd, 0x7c, 0x0c, 0xce, 0x2d, 0x69, 0x58, 0xc9, - 0x8a, 0x36, 0x18, 0x85, 0x66, 0xec, 0xe2, 0x4d, 0x1d, 0xfd, 0x61, 0xc0, 0x40, 0x5a, 0x84, 0x8e, - 0x61, 0x20, 0x8c, 0x68, 0x03, 0x43, 0xce, 0xe3, 0xed, 0xae,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storage/grpc/proto/model.proto b/plugin/storage/grpc/proto/model.proto deleted file mode 100644 index 0ddc5990adb..00000000000 --- a/plugin/storage/grpc/proto/model.proto +++ /dev/null @@ -1,90 +0,0 @@ -syntax = "proto3"; -package proto; - -message DependencyLink { - string parent = 1; - string child = 2; - uint64 call_count = 3; -} - -message TraceId { - uint64 low = 1; - uint64 high = 2; -} - -message SpanRef { - TraceId trace_id = 1; - uint64 span_id = 2; - SpanRefType ref_type = 3; -} - -message KeyValue { - string key = 1; - ValueType value_type = 2; - string string_value = 3; - bool bool_value = 4; - int64 int64_value = 5; - double float64_value = 6; - bytes binary_value = 7; -} - -message Log { - Timestamp timestamp = 1; - repeated KeyValue fields = 2; -} - -message Process { - string service_name = 1; - repeated KeyValue tags = 2; -} - -message TraceProcessMapping { - string process_id = 1; - Process process = 2; -} - -message Span { - TraceId trace_id = 1; - uint64 span_id = 2; - string operation_name = 3; - repeated SpanRef references = 4; - uint32 flags = 5; - Timestamp start_time = 6; - Duration duration = 7; - repeated KeyValue tags = 8; - repeated Log logs = 9; - Process process = 10; - string process_id = 11; - repeated string warnings = 12; -} - -message Trace { - repeated Span spans = 1; - repeated TraceProcessMapping process_map = 2; - repeated string warnings = 3; -} - -//NOTE(olivierboucher): would rather use google's wrappers but given the current context its easier -message Timestamp { - int64 seconds = 1; - int32 nanos = 2; -} - -//NOTE(olivierboucher): would rather use google's wrappers but given the current context its easier -message Duration { - int64 seconds = 1; - int32 nanos = 2; -} - -enum SpanRefType { - SpanRefType_CHILD_OF = 0; - SpanRefType_FOLLOWS_FROM = 1; -} - -enum ValueType { - ValueType_STRING = 0; - ValueType_BOOL = 1; - ValueType_INT64 = 2; - ValueType_FLOAT64 = 3; - ValueType_BINARY = 4; -} \ No newline at end of file diff --git a/plugin/storage/grpc/proto/storage.pb.go b/plugin/storage/grpc/proto/storage.pb.go index 972d7bb6fa8..d1f39832ab2 100644 --- a/plugin/storage/grpc/proto/storage.pb.go +++ b/plugin/storage/grpc/proto/storage.pb.go @@ -1,253 +1,73 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. - -// Copyright (c) 2018 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. - +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: storage.proto /* -Package proto is a generated protocol buffer package. - -It is generated from these files: - storage.proto - model.proto - -It has these top-level messages: - GetDependenciesRequest - GetDependenciesSuccess - GetDependenciesResponse - WriteSpanRequest - WriteSpanResponse - GetTraceRequest - GetTraceSuccess - GetTraceResponse - GetServicesRequest - GetServicesSuccess - GetServicesResponse - GetOperationsRequest - GetOperationsSuccess - GetOperationsResponse - FindTracesRequest - FindTracesSuccess - FindTracesResponse - EmptyResponse - StoragePluginError - DependencyLink - TraceId - SpanRef - KeyValue - Log - Process - TraceProcessMapping - Span - Trace - Timestamp - Duration + Package proto is a generated protocol buffer package. + + It is generated from these files: + storage.proto + + It has these top-level messages: + WriteSpanRequest + WriteSpanResponse + GetTraceRequest + GetTraceSuccess + GetTraceResponse + GetServicesRequest + GetServicesSuccess + GetServicesResponse + GetOperationsRequest + GetOperationsSuccess + GetOperationsResponse + FindTracesRequest + FindTracesSuccess + FindTracesResponse + EmptyResponse + StoragePluginError */ package proto -import proto1 "github.com/golang/protobuf/proto" +import proto1 "github.com/gogo/protobuf/proto" +import golang_proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import jaeger_api_v2 "github.com/jaegertracing/jaeger/model" +import _ "github.com/gogo/protobuf/types" +import _ "github.com/gogo/protobuf/types" -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) +import time "time" + +import context "golang.org/x/net/context" +import grpc "google.golang.org/grpc" + +import types "github.com/gogo/protobuf/types" + +import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto1.Marshal +var _ = golang_proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto1.ProtoPackageIsVersion2 // please upgrade the proto package - -type GetDependenciesRequest struct { - EndTimestamp *Timestamp `protobuf:"bytes,1,opt,name=end_timestamp,json=endTimestamp" json:"end_timestamp,omitempty"` - Lookback *Duration `protobuf:"bytes,2,opt,name=lookback" json:"lookback,omitempty"` -} - -func (m *GetDependenciesRequest) Reset() { *m = GetDependenciesRequest{} } -func (m *GetDependenciesRequest) String() string { return proto1.CompactTextString(m) } -func (*GetDependenciesRequest) ProtoMessage() {} -func (*GetDependenciesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *GetDependenciesRequest) GetEndTimestamp() *Timestamp { - if m != nil { - return m.EndTimestamp - } - return nil -} - -func (m *GetDependenciesRequest) GetLookback() *Duration { - if m != nil { - return m.Lookback - } - return nil -} - -type GetDependenciesSuccess struct { - Dependencies []*DependencyLink `protobuf:"bytes,1,rep,name=dependencies" json:"dependencies,omitempty"` -} - -func (m *GetDependenciesSuccess) Reset() { *m = GetDependenciesSuccess{} } -func (m *GetDependenciesSuccess) String() string { return proto1.CompactTextString(m) } -func (*GetDependenciesSuccess) ProtoMessage() {} -func (*GetDependenciesSuccess) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *GetDependenciesSuccess) GetDependencies() []*DependencyLink { - if m != nil { - return m.Dependencies - } - return nil -} - -type GetDependenciesResponse struct { - // Types that are valid to be assigned to Response: - // *GetDependenciesResponse_Success - // *GetDependenciesResponse_Error - Response isGetDependenciesResponse_Response `protobuf_oneof:"response"` -} - -func (m *GetDependenciesResponse) Reset() { *m = GetDependenciesResponse{} } -func (m *GetDependenciesResponse) String() string { return proto1.CompactTextString(m) } -func (*GetDependenciesResponse) ProtoMessage() {} -func (*GetDependenciesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } - -type isGetDependenciesResponse_Response interface { - isGetDependenciesResponse_Response() -} - -type GetDependenciesResponse_Success struct { - Success *GetDependenciesSuccess `protobuf:"bytes,1,opt,name=success,oneof"` -} -type GetDependenciesResponse_Error struct { - Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` -} - -func (*GetDependenciesResponse_Success) isGetDependenciesResponse_Response() {} -func (*GetDependenciesResponse_Error) isGetDependenciesResponse_Response() {} - -func (m *GetDependenciesResponse) GetResponse() isGetDependenciesResponse_Response { - if m != nil { - return m.Response - } - return nil -} - -func (m *GetDependenciesResponse) GetSuccess() *GetDependenciesSuccess { - if x, ok := m.GetResponse().(*GetDependenciesResponse_Success); ok { - return x.Success - } - return nil -} - -func (m *GetDependenciesResponse) GetError() *StoragePluginError { - if x, ok := m.GetResponse().(*GetDependenciesResponse_Error); ok { - return x.Error - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*GetDependenciesResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { - return _GetDependenciesResponse_OneofMarshaler, _GetDependenciesResponse_OneofUnmarshaler, _GetDependenciesResponse_OneofSizer, []interface{}{ - (*GetDependenciesResponse_Success)(nil), - (*GetDependenciesResponse_Error)(nil), - } -} - -func _GetDependenciesResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { - m := msg.(*GetDependenciesResponse) - // response - switch x := m.Response.(type) { - case *GetDependenciesResponse_Success: - b.EncodeVarint(1<<3 | proto1.WireBytes) - if err := b.EncodeMessage(x.Success); err != nil { - return err - } - case *GetDependenciesResponse_Error: - b.EncodeVarint(2<<3 | proto1.WireBytes) - if err := b.EncodeMessage(x.Error); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("GetDependenciesResponse.Response has unexpected type %T", x) - } - return nil -} - -func _GetDependenciesResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { - m := msg.(*GetDependenciesResponse) - switch tag { - case 1: // response.success - if wire != proto1.WireBytes { - return true, proto1.ErrInternalBadWireType - } - msg := new(GetDependenciesSuccess) - err := b.DecodeMessage(msg) - m.Response = &GetDependenciesResponse_Success{msg} - return true, err - case 2: // response.error - if wire != proto1.WireBytes { - return true, proto1.ErrInternalBadWireType - } - msg := new(StoragePluginError) - err := b.DecodeMessage(msg) - m.Response = &GetDependenciesResponse_Error{msg} - return true, err - default: - return false, nil - } -} - -func _GetDependenciesResponse_OneofSizer(msg proto1.Message) (n int) { - m := msg.(*GetDependenciesResponse) - // response - switch x := m.Response.(type) { - case *GetDependenciesResponse_Success: - s := proto1.Size(x.Success) - n += proto1.SizeVarint(1<<3 | proto1.WireBytes) - n += proto1.SizeVarint(uint64(s)) - n += s - case *GetDependenciesResponse_Error: - s := proto1.Size(x.Error) - n += proto1.SizeVarint(2<<3 | proto1.WireBytes) - n += proto1.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} +const _ = proto1.GoGoProtoPackageIsVersion2 // please upgrade the proto package type WriteSpanRequest struct { - Span *Span `protobuf:"bytes,1,opt,name=span" json:"span,omitempty"` + Span *jaeger_api_v2.Span `protobuf:"bytes,1,opt,name=span" json:"span,omitempty"` } func (m *WriteSpanRequest) Reset() { *m = WriteSpanRequest{} } func (m *WriteSpanRequest) String() string { return proto1.CompactTextString(m) } func (*WriteSpanRequest) ProtoMessage() {} -func (*WriteSpanRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (*WriteSpanRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{0} } -func (m *WriteSpanRequest) GetSpan() *Span { +func (m *WriteSpanRequest) GetSpan() *jaeger_api_v2.Span { if m != nil { return m.Span } @@ -264,10 +84,12 @@ type WriteSpanResponse struct { func (m *WriteSpanResponse) Reset() { *m = WriteSpanResponse{} } func (m *WriteSpanResponse) String() string { return proto1.CompactTextString(m) } func (*WriteSpanResponse) ProtoMessage() {} -func (*WriteSpanResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (*WriteSpanResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{1} } type isWriteSpanResponse_Response interface { isWriteSpanResponse_Response() + MarshalTo([]byte) (int, error) + Size() int } type WriteSpanResponse_Success struct { @@ -314,12 +136,12 @@ func _WriteSpanResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) err // response switch x := m.Response.(type) { case *WriteSpanResponse_Success: - b.EncodeVarint(1<<3 | proto1.WireBytes) + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) if err := b.EncodeMessage(x.Success); err != nil { return err } case *WriteSpanResponse_Error: - b.EncodeVarint(2<<3 | proto1.WireBytes) + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) if err := b.EncodeMessage(x.Error); err != nil { return err } @@ -376,31 +198,31 @@ func _WriteSpanResponse_OneofSizer(msg proto1.Message) (n int) { } type GetTraceRequest struct { - TraceId *TraceId `protobuf:"bytes,1,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"` + TraceID jaeger_api_v2.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId" json:"trace_id"` } func (m *GetTraceRequest) Reset() { *m = GetTraceRequest{} } func (m *GetTraceRequest) String() string { return proto1.CompactTextString(m) } func (*GetTraceRequest) ProtoMessage() {} -func (*GetTraceRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (*GetTraceRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{2} } -func (m *GetTraceRequest) GetTraceId() *TraceId { +func (m *GetTraceRequest) GetTraceID() jaeger_api_v2.TraceID { if m != nil { - return m.TraceId + return m.TraceID } - return nil + return jaeger_api_v2.TraceID{} } type GetTraceSuccess struct { - Trace *Trace `protobuf:"bytes,1,opt,name=trace" json:"trace,omitempty"` + Trace *jaeger_api_v2.Trace `protobuf:"bytes,1,opt,name=trace" json:"trace,omitempty"` } func (m *GetTraceSuccess) Reset() { *m = GetTraceSuccess{} } func (m *GetTraceSuccess) String() string { return proto1.CompactTextString(m) } func (*GetTraceSuccess) ProtoMessage() {} -func (*GetTraceSuccess) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (*GetTraceSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{3} } -func (m *GetTraceSuccess) GetTrace() *Trace { +func (m *GetTraceSuccess) GetTrace() *jaeger_api_v2.Trace { if m != nil { return m.Trace } @@ -417,10 +239,12 @@ type GetTraceResponse struct { func (m *GetTraceResponse) Reset() { *m = GetTraceResponse{} } func (m *GetTraceResponse) String() string { return proto1.CompactTextString(m) } func (*GetTraceResponse) ProtoMessage() {} -func (*GetTraceResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (*GetTraceResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{4} } type isGetTraceResponse_Response interface { isGetTraceResponse_Response() + MarshalTo([]byte) (int, error) + Size() int } type GetTraceResponse_Success struct { @@ -467,12 +291,12 @@ func _GetTraceResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) erro // response switch x := m.Response.(type) { case *GetTraceResponse_Success: - b.EncodeVarint(1<<3 | proto1.WireBytes) + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) if err := b.EncodeMessage(x.Success); err != nil { return err } case *GetTraceResponse_Error: - b.EncodeVarint(2<<3 | proto1.WireBytes) + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) if err := b.EncodeMessage(x.Error); err != nil { return err } @@ -534,7 +358,7 @@ type GetServicesRequest struct { func (m *GetServicesRequest) Reset() { *m = GetServicesRequest{} } func (m *GetServicesRequest) String() string { return proto1.CompactTextString(m) } func (*GetServicesRequest) ProtoMessage() {} -func (*GetServicesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (*GetServicesRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{5} } type GetServicesSuccess struct { Services []string `protobuf:"bytes,1,rep,name=services" json:"services,omitempty"` @@ -543,7 +367,7 @@ type GetServicesSuccess struct { func (m *GetServicesSuccess) Reset() { *m = GetServicesSuccess{} } func (m *GetServicesSuccess) String() string { return proto1.CompactTextString(m) } func (*GetServicesSuccess) ProtoMessage() {} -func (*GetServicesSuccess) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (*GetServicesSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{6} } func (m *GetServicesSuccess) GetServices() []string { if m != nil { @@ -562,10 +386,12 @@ type GetServicesResponse struct { func (m *GetServicesResponse) Reset() { *m = GetServicesResponse{} } func (m *GetServicesResponse) String() string { return proto1.CompactTextString(m) } func (*GetServicesResponse) ProtoMessage() {} -func (*GetServicesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (*GetServicesResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{7} } type isGetServicesResponse_Response interface { isGetServicesResponse_Response() + MarshalTo([]byte) (int, error) + Size() int } type GetServicesResponse_Success struct { @@ -612,12 +438,12 @@ func _GetServicesResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) e // response switch x := m.Response.(type) { case *GetServicesResponse_Success: - b.EncodeVarint(1<<3 | proto1.WireBytes) + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) if err := b.EncodeMessage(x.Success); err != nil { return err } case *GetServicesResponse_Error: - b.EncodeVarint(2<<3 | proto1.WireBytes) + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) if err := b.EncodeMessage(x.Error); err != nil { return err } @@ -674,13 +500,13 @@ func _GetServicesResponse_OneofSizer(msg proto1.Message) (n int) { } type GetOperationsRequest struct { - Service string `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"` + Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` } func (m *GetOperationsRequest) Reset() { *m = GetOperationsRequest{} } func (m *GetOperationsRequest) String() string { return proto1.CompactTextString(m) } func (*GetOperationsRequest) ProtoMessage() {} -func (*GetOperationsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (*GetOperationsRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{8} } func (m *GetOperationsRequest) GetService() string { if m != nil { @@ -696,7 +522,7 @@ type GetOperationsSuccess struct { func (m *GetOperationsSuccess) Reset() { *m = GetOperationsSuccess{} } func (m *GetOperationsSuccess) String() string { return proto1.CompactTextString(m) } func (*GetOperationsSuccess) ProtoMessage() {} -func (*GetOperationsSuccess) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (*GetOperationsSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{9} } func (m *GetOperationsSuccess) GetOperations() []string { if m != nil { @@ -715,10 +541,12 @@ type GetOperationsResponse struct { func (m *GetOperationsResponse) Reset() { *m = GetOperationsResponse{} } func (m *GetOperationsResponse) String() string { return proto1.CompactTextString(m) } func (*GetOperationsResponse) ProtoMessage() {} -func (*GetOperationsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +func (*GetOperationsResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{10} } type isGetOperationsResponse_Response interface { isGetOperationsResponse_Response() + MarshalTo([]byte) (int, error) + Size() int } type GetOperationsResponse_Success struct { @@ -765,12 +593,12 @@ func _GetOperationsResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) // response switch x := m.Response.(type) { case *GetOperationsResponse_Success: - b.EncodeVarint(1<<3 | proto1.WireBytes) + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) if err := b.EncodeMessage(x.Success); err != nil { return err } case *GetOperationsResponse_Error: - b.EncodeVarint(2<<3 | proto1.WireBytes) + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) if err := b.EncodeMessage(x.Error); err != nil { return err } @@ -827,20 +655,20 @@ func _GetOperationsResponse_OneofSizer(msg proto1.Message) (n int) { } type FindTracesRequest struct { - ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName" json:"service_name,omitempty"` - OperationName string `protobuf:"bytes,2,opt,name=operation_name,json=operationName" json:"operation_name,omitempty"` - Tags map[string]string `protobuf:"bytes,3,rep,name=tags" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StartTimeMin *Timestamp `protobuf:"bytes,4,opt,name=start_time_min,json=startTimeMin" json:"start_time_min,omitempty"` - StartTimeMax *Timestamp `protobuf:"bytes,5,opt,name=start_time_max,json=startTimeMax" json:"start_time_max,omitempty"` - DurationMin *Duration `protobuf:"bytes,6,opt,name=duration_min,json=durationMin" json:"duration_min,omitempty"` - DurationMax *Duration `protobuf:"bytes,7,opt,name=duration_max,json=durationMax" json:"duration_max,omitempty"` - NumTraces int32 `protobuf:"varint,8,opt,name=num_traces,json=numTraces" json:"num_traces,omitempty"` + ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + OperationName string `protobuf:"bytes,2,opt,name=operation_name,json=operationName,proto3" json:"operation_name,omitempty"` + Tags map[string]string `protobuf:"bytes,3,rep,name=tags" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StartTimeMin time.Time `protobuf:"bytes,4,opt,name=start_time_min,json=startTimeMin,stdtime" json:"start_time_min"` + StartTimeMax time.Time `protobuf:"bytes,5,opt,name=start_time_max,json=startTimeMax,stdtime" json:"start_time_max"` + DurationMin time.Duration `protobuf:"bytes,6,opt,name=duration_min,json=durationMin,stdduration" json:"duration_min"` + DurationMax time.Duration `protobuf:"bytes,7,opt,name=duration_max,json=durationMax,stdduration" json:"duration_max"` + NumTraces int32 `protobuf:"varint,8,opt,name=num_traces,json=numTraces,proto3" json:"num_traces,omitempty"` } func (m *FindTracesRequest) Reset() { *m = FindTracesRequest{} } func (m *FindTracesRequest) String() string { return proto1.CompactTextString(m) } func (*FindTracesRequest) ProtoMessage() {} -func (*FindTracesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } +func (*FindTracesRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{11} } func (m *FindTracesRequest) GetServiceName() string { if m != nil { @@ -863,32 +691,32 @@ func (m *FindTracesRequest) GetTags() map[string]string { return nil } -func (m *FindTracesRequest) GetStartTimeMin() *Timestamp { +func (m *FindTracesRequest) GetStartTimeMin() time.Time { if m != nil { return m.StartTimeMin } - return nil + return time.Time{} } -func (m *FindTracesRequest) GetStartTimeMax() *Timestamp { +func (m *FindTracesRequest) GetStartTimeMax() time.Time { if m != nil { return m.StartTimeMax } - return nil + return time.Time{} } -func (m *FindTracesRequest) GetDurationMin() *Duration { +func (m *FindTracesRequest) GetDurationMin() time.Duration { if m != nil { return m.DurationMin } - return nil + return 0 } -func (m *FindTracesRequest) GetDurationMax() *Duration { +func (m *FindTracesRequest) GetDurationMax() time.Duration { if m != nil { return m.DurationMax } - return nil + return 0 } func (m *FindTracesRequest) GetNumTraces() int32 { @@ -899,15 +727,15 @@ func (m *FindTracesRequest) GetNumTraces() int32 { } type FindTracesSuccess struct { - Traces []*Trace `protobuf:"bytes,1,rep,name=traces" json:"traces,omitempty"` + Traces []*jaeger_api_v2.Trace `protobuf:"bytes,1,rep,name=traces" json:"traces,omitempty"` } func (m *FindTracesSuccess) Reset() { *m = FindTracesSuccess{} } func (m *FindTracesSuccess) String() string { return proto1.CompactTextString(m) } func (*FindTracesSuccess) ProtoMessage() {} -func (*FindTracesSuccess) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } +func (*FindTracesSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{12} } -func (m *FindTracesSuccess) GetTraces() []*Trace { +func (m *FindTracesSuccess) GetTraces() []*jaeger_api_v2.Trace { if m != nil { return m.Traces } @@ -924,10 +752,12 @@ type FindTracesResponse struct { func (m *FindTracesResponse) Reset() { *m = FindTracesResponse{} } func (m *FindTracesResponse) String() string { return proto1.CompactTextString(m) } func (*FindTracesResponse) ProtoMessage() {} -func (*FindTracesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } +func (*FindTracesResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{13} } type isFindTracesResponse_Response interface { isFindTracesResponse_Response() + MarshalTo([]byte) (int, error) + Size() int } type FindTracesResponse_Success struct { @@ -974,12 +804,12 @@ func _FindTracesResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) er // response switch x := m.Response.(type) { case *FindTracesResponse_Success: - b.EncodeVarint(1<<3 | proto1.WireBytes) + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) if err := b.EncodeMessage(x.Success); err != nil { return err } case *FindTracesResponse_Error: - b.EncodeVarint(2<<3 | proto1.WireBytes) + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) if err := b.EncodeMessage(x.Error); err != nil { return err } @@ -1041,16 +871,16 @@ type EmptyResponse struct { func (m *EmptyResponse) Reset() { *m = EmptyResponse{} } func (m *EmptyResponse) String() string { return proto1.CompactTextString(m) } func (*EmptyResponse) ProtoMessage() {} -func (*EmptyResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } +func (*EmptyResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{14} } type StoragePluginError struct { - Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` } func (m *StoragePluginError) Reset() { *m = StoragePluginError{} } func (m *StoragePluginError) String() string { return proto1.CompactTextString(m) } func (*StoragePluginError) ProtoMessage() {} -func (*StoragePluginError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } +func (*StoragePluginError) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{15} } func (m *StoragePluginError) GetMessage() string { if m != nil { @@ -1060,25 +890,38 @@ func (m *StoragePluginError) GetMessage() string { } func init() { - proto1.RegisterType((*GetDependenciesRequest)(nil), "proto.GetDependenciesRequest") - proto1.RegisterType((*GetDependenciesSuccess)(nil), "proto.GetDependenciesSuccess") - proto1.RegisterType((*GetDependenciesResponse)(nil), "proto.GetDependenciesResponse") - proto1.RegisterType((*WriteSpanRequest)(nil), "proto.WriteSpanRequest") - proto1.RegisterType((*WriteSpanResponse)(nil), "proto.WriteSpanResponse") - proto1.RegisterType((*GetTraceRequest)(nil), "proto.GetTraceRequest") - proto1.RegisterType((*GetTraceSuccess)(nil), "proto.GetTraceSuccess") - proto1.RegisterType((*GetTraceResponse)(nil), "proto.GetTraceResponse") - proto1.RegisterType((*GetServicesRequest)(nil), "proto.GetServicesRequest") - proto1.RegisterType((*GetServicesSuccess)(nil), "proto.GetServicesSuccess") - proto1.RegisterType((*GetServicesResponse)(nil), "proto.GetServicesResponse") - proto1.RegisterType((*GetOperationsRequest)(nil), "proto.GetOperationsRequest") - proto1.RegisterType((*GetOperationsSuccess)(nil), "proto.GetOperationsSuccess") - proto1.RegisterType((*GetOperationsResponse)(nil), "proto.GetOperationsResponse") - proto1.RegisterType((*FindTracesRequest)(nil), "proto.FindTracesRequest") - proto1.RegisterType((*FindTracesSuccess)(nil), "proto.FindTracesSuccess") - proto1.RegisterType((*FindTracesResponse)(nil), "proto.FindTracesResponse") - proto1.RegisterType((*EmptyResponse)(nil), "proto.EmptyResponse") - proto1.RegisterType((*StoragePluginError)(nil), "proto.StoragePluginError") + proto1.RegisterType((*WriteSpanRequest)(nil), "jaeger.api_v2.WriteSpanRequest") + golang_proto.RegisterType((*WriteSpanRequest)(nil), "jaeger.api_v2.WriteSpanRequest") + proto1.RegisterType((*WriteSpanResponse)(nil), "jaeger.api_v2.WriteSpanResponse") + golang_proto.RegisterType((*WriteSpanResponse)(nil), "jaeger.api_v2.WriteSpanResponse") + proto1.RegisterType((*GetTraceRequest)(nil), "jaeger.api_v2.GetTraceRequest") + golang_proto.RegisterType((*GetTraceRequest)(nil), "jaeger.api_v2.GetTraceRequest") + proto1.RegisterType((*GetTraceSuccess)(nil), "jaeger.api_v2.GetTraceSuccess") + golang_proto.RegisterType((*GetTraceSuccess)(nil), "jaeger.api_v2.GetTraceSuccess") + proto1.RegisterType((*GetTraceResponse)(nil), "jaeger.api_v2.GetTraceResponse") + golang_proto.RegisterType((*GetTraceResponse)(nil), "jaeger.api_v2.GetTraceResponse") + proto1.RegisterType((*GetServicesRequest)(nil), "jaeger.api_v2.GetServicesRequest") + golang_proto.RegisterType((*GetServicesRequest)(nil), "jaeger.api_v2.GetServicesRequest") + proto1.RegisterType((*GetServicesSuccess)(nil), "jaeger.api_v2.GetServicesSuccess") + golang_proto.RegisterType((*GetServicesSuccess)(nil), "jaeger.api_v2.GetServicesSuccess") + proto1.RegisterType((*GetServicesResponse)(nil), "jaeger.api_v2.GetServicesResponse") + golang_proto.RegisterType((*GetServicesResponse)(nil), "jaeger.api_v2.GetServicesResponse") + proto1.RegisterType((*GetOperationsRequest)(nil), "jaeger.api_v2.GetOperationsRequest") + golang_proto.RegisterType((*GetOperationsRequest)(nil), "jaeger.api_v2.GetOperationsRequest") + proto1.RegisterType((*GetOperationsSuccess)(nil), "jaeger.api_v2.GetOperationsSuccess") + golang_proto.RegisterType((*GetOperationsSuccess)(nil), "jaeger.api_v2.GetOperationsSuccess") + proto1.RegisterType((*GetOperationsResponse)(nil), "jaeger.api_v2.GetOperationsResponse") + golang_proto.RegisterType((*GetOperationsResponse)(nil), "jaeger.api_v2.GetOperationsResponse") + proto1.RegisterType((*FindTracesRequest)(nil), "jaeger.api_v2.FindTracesRequest") + golang_proto.RegisterType((*FindTracesRequest)(nil), "jaeger.api_v2.FindTracesRequest") + proto1.RegisterType((*FindTracesSuccess)(nil), "jaeger.api_v2.FindTracesSuccess") + golang_proto.RegisterType((*FindTracesSuccess)(nil), "jaeger.api_v2.FindTracesSuccess") + proto1.RegisterType((*FindTracesResponse)(nil), "jaeger.api_v2.FindTracesResponse") + golang_proto.RegisterType((*FindTracesResponse)(nil), "jaeger.api_v2.FindTracesResponse") + proto1.RegisterType((*EmptyResponse)(nil), "jaeger.api_v2.EmptyResponse") + golang_proto.RegisterType((*EmptyResponse)(nil), "jaeger.api_v2.EmptyResponse") + proto1.RegisterType((*StoragePluginError)(nil), "jaeger.api_v2.StoragePluginError") + golang_proto.RegisterType((*StoragePluginError)(nil), "jaeger.api_v2.StoragePluginError") } // Reference imports to suppress errors if they are not otherwise used. @@ -1092,10 +935,6 @@ const _ = grpc.SupportPackageIsVersion4 // Client API for StoragePlugin service type StoragePluginClient interface { - // dependencystore/Writer - // rpc WriteDependencies(WriteDependenciesRequest) returns (WriteDependenciesResponse); - // dependencystore/Reader - GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) // spanstore/Writer WriteSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) // spanstore/Reader @@ -1113,18 +952,9 @@ func NewStoragePluginClient(cc *grpc.ClientConn) StoragePluginClient { return &storagePluginClient{cc} } -func (c *storagePluginClient) GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) { - out := new(GetDependenciesResponse) - err := grpc.Invoke(ctx, "/proto.StoragePlugin/GetDependencies", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *storagePluginClient) WriteSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) { out := new(WriteSpanResponse) - err := grpc.Invoke(ctx, "/proto.StoragePlugin/WriteSpan", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/WriteSpan", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1133,7 +963,7 @@ func (c *storagePluginClient) WriteSpan(ctx context.Context, in *WriteSpanReques func (c *storagePluginClient) GetTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (*GetTraceResponse, error) { out := new(GetTraceResponse) - err := grpc.Invoke(ctx, "/proto.StoragePlugin/GetTrace", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/GetTrace", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1142,7 +972,7 @@ func (c *storagePluginClient) GetTrace(ctx context.Context, in *GetTraceRequest, func (c *storagePluginClient) GetServices(ctx context.Context, in *GetServicesRequest, opts ...grpc.CallOption) (*GetServicesResponse, error) { out := new(GetServicesResponse) - err := grpc.Invoke(ctx, "/proto.StoragePlugin/GetServices", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/GetServices", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1151,7 +981,7 @@ func (c *storagePluginClient) GetServices(ctx context.Context, in *GetServicesRe func (c *storagePluginClient) GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*GetOperationsResponse, error) { out := new(GetOperationsResponse) - err := grpc.Invoke(ctx, "/proto.StoragePlugin/GetOperations", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/GetOperations", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1160,7 +990,7 @@ func (c *storagePluginClient) GetOperations(ctx context.Context, in *GetOperatio func (c *storagePluginClient) FindTraces(ctx context.Context, in *FindTracesRequest, opts ...grpc.CallOption) (*FindTracesResponse, error) { out := new(FindTracesResponse) - err := grpc.Invoke(ctx, "/proto.StoragePlugin/FindTraces", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/FindTraces", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1170,10 +1000,6 @@ func (c *storagePluginClient) FindTraces(ctx context.Context, in *FindTracesRequ // Server API for StoragePlugin service type StoragePluginServer interface { - // dependencystore/Writer - // rpc WriteDependencies(WriteDependenciesRequest) returns (WriteDependenciesResponse); - // dependencystore/Reader - GetDependencies(context.Context, *GetDependenciesRequest) (*GetDependenciesResponse, error) // spanstore/Writer WriteSpan(context.Context, *WriteSpanRequest) (*WriteSpanResponse, error) // spanstore/Reader @@ -1187,24 +1013,6 @@ func RegisterStoragePluginServer(s *grpc.Server, srv StoragePluginServer) { s.RegisterService(&_StoragePlugin_serviceDesc, srv) } -func _StoragePlugin_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 interceptor == nil { - return srv.(StoragePluginServer).GetDependencies(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/proto.StoragePlugin/GetDependencies", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StoragePluginServer).GetDependencies(ctx, req.(*GetDependenciesRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _StoragePlugin_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 { @@ -1215,7 +1023,7 @@ func _StoragePlugin_WriteSpan_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.StoragePlugin/WriteSpan", + FullMethod: "/jaeger.api_v2.StoragePlugin/WriteSpan", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(StoragePluginServer).WriteSpan(ctx, req.(*WriteSpanRequest)) @@ -1233,7 +1041,7 @@ func _StoragePlugin_GetTrace_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.StoragePlugin/GetTrace", + FullMethod: "/jaeger.api_v2.StoragePlugin/GetTrace", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(StoragePluginServer).GetTrace(ctx, req.(*GetTraceRequest)) @@ -1251,7 +1059,7 @@ func _StoragePlugin_GetServices_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.StoragePlugin/GetServices", + FullMethod: "/jaeger.api_v2.StoragePlugin/GetServices", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(StoragePluginServer).GetServices(ctx, req.(*GetServicesRequest)) @@ -1269,7 +1077,7 @@ func _StoragePlugin_GetOperations_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.StoragePlugin/GetOperations", + FullMethod: "/jaeger.api_v2.StoragePlugin/GetOperations", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(StoragePluginServer).GetOperations(ctx, req.(*GetOperationsRequest)) @@ -1287,7 +1095,7 @@ func _StoragePlugin_FindTraces_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.StoragePlugin/FindTraces", + FullMethod: "/jaeger.api_v2.StoragePlugin/FindTraces", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(StoragePluginServer).FindTraces(ctx, req.(*FindTracesRequest)) @@ -1296,13 +1104,9 @@ func _StoragePlugin_FindTraces_Handler(srv interface{}, ctx context.Context, dec } var _StoragePlugin_serviceDesc = grpc.ServiceDesc{ - ServiceName: "proto.StoragePlugin", + ServiceName: "jaeger.api_v2.StoragePlugin", HandlerType: (*StoragePluginServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "GetDependencies", - Handler: _StoragePlugin_GetDependencies_Handler, - }, { MethodName: "WriteSpan", Handler: _StoragePlugin_WriteSpan_Handler, @@ -1328,60 +1132,2741 @@ var _StoragePlugin_serviceDesc = grpc.ServiceDesc{ Metadata: "storage.proto", } -func init() { proto1.RegisterFile("storage.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 819 bytes of a gzipped FileDescriptorProto - 0x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9, 0x1a, 0x1a, 0xe9, 0x43, 0x44, 0x8e, 0x31, 0xb8, - 0xf8, 0xa0, 0xf5, 0xec, 0xb2, 0x03, 0xf1, 0x5f, 0x42, 0xdd, 0x48, 0x34, 0x29, 0x6a, 0xb6, 0x41, - 0x1f, 0x97, 0xec, 0x08, 0xbe, 0x86, 0x66, 0x46, 0x0c, 0xc9, 0x06, 0x81, 0x34, 0x29, 0x7a, 0x9b, - 0x5c, 0x98, 0xe5, 0x07, 0x68, 0xe7, 0x84, 0x85, 0x6c, 0x94, 0x1b, 0x93, 0xe9, 0xbd, 0xcd, 0x4e, - 0xcc, 0xf5, 0x0d, 0xc0, 0x7a, 0x24, 0x88, 0xbd, 0xed, 0x8a, 0xf7, 0x4e, 0x36, 0x78, 0x92, 0x14, - 0xf7, 0x07, 0xda, 0xf3, 0xea, 0x6d, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x61, 0x40, 0xda, 0xa5, - 0x09, 0x00, 0x00, +func (m *WriteSpanRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WriteSpanRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Span != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Span.Size())) + n1, err := m.Span.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + return i, nil +} + +func (m *WriteSpanResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WriteSpanResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Response != nil { + nn2, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn2 + } + return i, nil +} + +func (m *WriteSpanResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Success != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n3, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + return i, nil +} +func (m *WriteSpanResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Error != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n4, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} +func (m *GetTraceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTraceRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.TraceID.Size())) + n5, err := m.TraceID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + return i, nil +} + +func (m *GetTraceSuccess) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTraceSuccess) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Trace != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Trace.Size())) + n6, err := m.Trace.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + return i, nil +} + +func (m *GetTraceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTraceResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Response != nil { + nn7, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn7 + } + return i, nil +} + +func (m *GetTraceResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Success != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n8, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + return i, nil +} +func (m *GetTraceResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Error != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n9, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + return i, nil +} +func (m *GetServicesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetServicesRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *GetServicesSuccess) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetServicesSuccess) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Services) > 0 { + for _, s := range m.Services { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *GetServicesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetServicesResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Response != nil { + nn10, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn10 + } + return i, nil +} + +func (m *GetServicesResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Success != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n11, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + return i, nil +} +func (m *GetServicesResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Error != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n12, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + } + return i, nil +} +func (m *GetOperationsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetOperationsRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Service) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(m.Service))) + i += copy(dAtA[i:], m.Service) + } + return i, nil +} + +func (m *GetOperationsSuccess) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetOperationsSuccess) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Operations) > 0 { + for _, s := range m.Operations { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *GetOperationsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetOperationsResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Response != nil { + nn13, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn13 + } + return i, nil +} + +func (m *GetOperationsResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Success != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n14, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + } + return i, nil +} +func (m *GetOperationsResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Error != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n15, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n15 + } + return i, nil +} +func (m *FindTracesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FindTracesRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ServiceName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(m.ServiceName))) + i += copy(dAtA[i:], m.ServiceName) + } + if len(m.OperationName) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(m.OperationName))) + i += copy(dAtA[i:], m.OperationName) + } + if len(m.Tags) > 0 { + for k, _ := range m.Tags { + dAtA[i] = 0x1a + i++ + v := m.Tags[k] + mapSize := 1 + len(k) + sovStorage(uint64(len(k))) + 1 + len(v) + sovStorage(uint64(len(v))) + i = encodeVarintStorage(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + dAtA[i] = 0x22 + i++ + i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdTime(m.StartTimeMin))) + n16, err := types.StdTimeMarshalTo(m.StartTimeMin, dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + dAtA[i] = 0x2a + i++ + i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdTime(m.StartTimeMax))) + n17, err := types.StdTimeMarshalTo(m.StartTimeMax, dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + dAtA[i] = 0x32 + i++ + i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdDuration(m.DurationMin))) + n18, err := types.StdDurationMarshalTo(m.DurationMin, dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + dAtA[i] = 0x3a + i++ + i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdDuration(m.DurationMax))) + n19, err := types.StdDurationMarshalTo(m.DurationMax, dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + if m.NumTraces != 0 { + dAtA[i] = 0x40 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.NumTraces)) + } + return i, nil +} + +func (m *FindTracesSuccess) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FindTracesSuccess) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Traces) > 0 { + for _, msg := range m.Traces { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *FindTracesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FindTracesResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Response != nil { + nn20, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn20 + } + return i, nil +} + +func (m *FindTracesResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Success != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n21, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + return i, nil +} +func (m *FindTracesResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Error != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n22, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + } + return i, nil +} +func (m *EmptyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EmptyResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *StoragePluginError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoragePluginError) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Message) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(m.Message))) + i += copy(dAtA[i:], m.Message) + } + return i, nil +} + +func encodeVarintStorage(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *WriteSpanRequest) Size() (n int) { + var l int + _ = l + if m.Span != nil { + l = m.Span.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + +func (m *WriteSpanResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *WriteSpanResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *WriteSpanResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetTraceRequest) Size() (n int) { + var l int + _ = l + l = m.TraceID.Size() + n += 1 + l + sovStorage(uint64(l)) + return n +} + +func (m *GetTraceSuccess) Size() (n int) { + var l int + _ = l + if m.Trace != nil { + l = m.Trace.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + +func (m *GetTraceResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *GetTraceResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetTraceResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetServicesRequest) Size() (n int) { + var l int + _ = l + return n +} + +func (m *GetServicesSuccess) Size() (n int) { + var l int + _ = l + if len(m.Services) > 0 { + for _, s := range m.Services { + l = len(s) + n += 1 + l + sovStorage(uint64(l)) + } + } + return n +} + +func (m *GetServicesResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *GetServicesResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetServicesResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetOperationsRequest) Size() (n int) { + var l int + _ = l + l = len(m.Service) + if l > 0 { + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + +func (m *GetOperationsSuccess) Size() (n int) { + var l int + _ = l + if len(m.Operations) > 0 { + for _, s := range m.Operations { + l = len(s) + n += 1 + l + sovStorage(uint64(l)) + } + } + return n +} + +func (m *GetOperationsResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *GetOperationsResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetOperationsResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *FindTracesRequest) Size() (n int) { + 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 = types.SizeOfStdTime(m.StartTimeMin) + n += 1 + l + sovStorage(uint64(l)) + l = types.SizeOfStdTime(m.StartTimeMax) + n += 1 + l + sovStorage(uint64(l)) + l = types.SizeOfStdDuration(m.DurationMin) + n += 1 + l + sovStorage(uint64(l)) + l = types.SizeOfStdDuration(m.DurationMax) + n += 1 + l + sovStorage(uint64(l)) + if m.NumTraces != 0 { + n += 1 + sovStorage(uint64(m.NumTraces)) + } + return n +} + +func (m *FindTracesSuccess) Size() (n int) { + var l int + _ = l + if len(m.Traces) > 0 { + for _, e := range m.Traces { + l = e.Size() + n += 1 + l + sovStorage(uint64(l)) + } + } + return n +} + +func (m *FindTracesResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *FindTracesResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *FindTracesResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *EmptyResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *StoragePluginError) Size() (n int) { + var l int + _ = l + l = len(m.Message) + if l > 0 { + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + +func sovStorage(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozStorage(x uint64) (n int) { + return sovStorage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +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 > l { + return io.ErrUnexpectedEOF + } + if m.Span == nil { + m.Span = &jaeger_api_v2.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 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + 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 { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", 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 > l { + return io.ErrUnexpectedEOF + } + v := &EmptyResponse{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &WriteSpanResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", 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 > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &WriteSpanResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + 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 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 > 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 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTraceSuccess) 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: GetTraceSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTraceSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Trace", 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 > l { + return io.ErrUnexpectedEOF + } + if m.Trace == nil { + m.Trace = &jaeger_api_v2.Trace{} + } + if err := m.Trace.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 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTraceResponse) 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: GetTraceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTraceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", 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 > l { + return io.ErrUnexpectedEOF + } + v := &GetTraceSuccess{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetTraceResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", 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 > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetTraceResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + 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 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetServicesSuccess) 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: GetServicesSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetServicesSuccess: 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 > 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 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + 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 Success", 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 > l { + return io.ErrUnexpectedEOF + } + v := &GetServicesSuccess{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetServicesResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", 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 > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetServicesResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + 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 > l { + return io.ErrUnexpectedEOF + } + m.Service = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetOperationsSuccess) 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: GetOperationsSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetOperationsSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operations", 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 > l { + return io.ErrUnexpectedEOF + } + m.Operations = append(m.Operations, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + 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: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", 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 > l { + return io.ErrUnexpectedEOF + } + v := &GetOperationsSuccess{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetOperationsResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", 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 > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetOperationsResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FindTracesRequest) 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: FindTracesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + 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 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 > 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 > 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 > 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 > 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 > 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 { + 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 StartTimeMin", 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 > l { + return io.ErrUnexpectedEOF + } + if err := types.StdTimeUnmarshal(&m.StartTimeMin, 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) + } + 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 > l { + return io.ErrUnexpectedEOF + } + if err := types.StdTimeUnmarshal(&m.StartTimeMax, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DurationMin", 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 > l { + return io.ErrUnexpectedEOF + } + if err := types.StdDurationUnmarshal(&m.DurationMin, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DurationMax", 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 > l { + return io.ErrUnexpectedEOF + } + if err := 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 + } + } + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FindTracesSuccess) 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: FindTracesSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FindTracesSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Traces", 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 > l { + return io.ErrUnexpectedEOF + } + m.Traces = append(m.Traces, &jaeger_api_v2.Trace{}) + if err := m.Traces[len(m.Traces)-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 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FindTracesResponse) 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: FindTracesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FindTracesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", 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 > l { + return io.ErrUnexpectedEOF + } + v := &FindTracesSuccess{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &FindTracesResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", 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 > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &FindTracesResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EmptyResponse) 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: EmptyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EmptyResponse: 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 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoragePluginError) 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: StoragePluginError: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoragePluginError: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", 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 > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipStorage(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStorage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStorage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStorage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthStorage + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStorage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipStorage(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthStorage = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStorage = fmt.Errorf("proto: integer overflow") +) + +func init() { proto1.RegisterFile("storage.proto", fileDescriptorStorage) } +func init() { golang_proto.RegisterFile("storage.proto", fileDescriptorStorage) } + +var fileDescriptorStorage = []byte{ + // 827 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xdd, 0x6e, 0x23, 0x35, + 0x14, 0xae, 0x9b, 0xa4, 0x49, 0x4e, 0x9a, 0x6d, 0xd7, 0x1b, 0x60, 0x88, 0x20, 0x3f, 0x03, 0x88, + 0x68, 0x85, 0xa6, 0xab, 0x20, 0xc1, 0xb2, 0x50, 0x10, 0x51, 0x7f, 0x41, 0x14, 0x98, 0x06, 0x21, + 0xf5, 0x26, 0x32, 0x89, 0x19, 0x0d, 0x64, 0x7e, 0x18, 0x7b, 0xaa, 0xf4, 0x2d, 0xb8, 0x00, 0x09, + 0x84, 0x10, 0xcf, 0xc0, 0x1b, 0x70, 0xd9, 0x4b, 0x9e, 0xa0, 0xa0, 0xf0, 0x22, 0x68, 0x3c, 0xf6, + 0x34, 0x71, 0x9a, 0xac, 0x54, 0x29, 0x57, 0x89, 0xed, 0xef, 0x7c, 0xe7, 0x9c, 0x6f, 0x8e, 0x3f, + 0x43, 0x95, 0xf1, 0x20, 0x22, 0x0e, 0xb5, 0xc2, 0x28, 0xe0, 0x01, 0xae, 0x7e, 0x47, 0xa8, 0x43, + 0x23, 0x8b, 0x84, 0xee, 0xe0, 0xb2, 0x5b, 0xaf, 0x39, 0x81, 0x13, 0x88, 0x93, 0xbd, 0xe4, 0x5f, + 0x0a, 0xaa, 0x57, 0xbc, 0x60, 0x44, 0xc7, 0x72, 0xd1, 0x74, 0x82, 0xc0, 0x19, 0xd3, 0x3d, 0xb1, + 0xfa, 0x26, 0xfe, 0x76, 0x8f, 0xbb, 0x1e, 0x65, 0x9c, 0x78, 0xa1, 0x04, 0x34, 0x74, 0xc0, 0x28, + 0x8e, 0x08, 0x77, 0x03, 0x3f, 0x3d, 0x37, 0xdf, 0x87, 0xdd, 0xaf, 0x23, 0x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, 0x10, 0x37, + 0xb5, 0xba, 0xf4, 0xf7, 0xb5, 0xde, 0x5a, 0x0e, 0x90, 0x3a, 0x7d, 0x0a, 0x25, 0x65, 0xfc, 0x78, + 0xd9, 0x8b, 0xa0, 0xd8, 0x9a, 0x4b, 0xcf, 0x25, 0x59, 0x1f, 0x2a, 0x33, 0x16, 0x8b, 0x57, 0xd8, + 0xaf, 0xa2, 0x34, 0x57, 0x41, 0x24, 0xeb, 0x05, 0x54, 0xe7, 0xec, 0x0a, 0xaf, 0x34, 0x33, 0xc5, + 0xfc, 0xfa, 0x6a, 0x90, 0xe4, 0xfe, 0x12, 0xe0, 0x76, 0x10, 0x70, 0xeb, 0x79, 0x06, 0x52, 0x6f, + 0xaf, 0x40, 0xa4, 0x94, 0xbd, 0x97, 0xae, 0xa7, 0x0d, 0xf4, 0xf7, 0xb4, 0x81, 0xfe, 0x9d, 0x36, + 0xd0, 0x5f, 0xff, 0x35, 0xd0, 0x45, 0x21, 0xbd, 0x67, 0x5b, 0xe2, 0xe7, 0xed, 0xff, 0x03, 0x00, + 0x00, 0xff, 0xff, 0x2d, 0x89, 0x27, 0xb7, 0x8b, 0x09, 0x00, 0x00, } diff --git a/plugin/storage/grpc/proto/storage.proto b/plugin/storage/grpc/proto/storage.proto index 8970334ece6..820dc4bfba9 100644 --- a/plugin/storage/grpc/proto/storage.proto +++ b/plugin/storage/grpc/proto/storage.proto @@ -1,7 +1,23 @@ syntax = "proto3"; -package proto; +package jaeger.api_v2; + +option go_package = "proto"; + +import "gogoproto/gogo.proto"; import "model.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; + +// Enable gogoprotobuf extensions (https://github.com/gogo/protobuf/blob/master/extensions.md). +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; //message WriteDependenciesRequest { // @@ -11,21 +27,21 @@ import "model.proto"; // //} -message GetDependenciesRequest { - Timestamp end_timestamp = 1; - Duration lookback = 2; -} - -message GetDependenciesSuccess { - repeated DependencyLink dependencies = 1; -} - -message GetDependenciesResponse { - oneof response { - GetDependenciesSuccess success = 1; - StoragePluginError error = 2; - } -} +//message GetDependenciesRequest { +// google.protobuf.Timestamp end_timestamp = 1; +// google.protobuf.Duration lookback = 2; +//} +// +//message GetDependenciesSuccess { +// repeated DependencyLink dependencies = 1; +//} +// +//message GetDependenciesResponse { +// oneof response { +// GetDependenciesSuccess success = 1; +// StoragePluginError error = 2; +// } +//} //message InsertThroughputRequest { // @@ -79,7 +95,10 @@ message WriteSpanResponse { } message GetTraceRequest { - TraceId trace_id = 1; + TraceID trace_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "TraceID" + ]; } message GetTraceSuccess { @@ -125,10 +144,22 @@ message FindTracesRequest { string service_name = 1; string operation_name = 2; map tags = 3; - Timestamp start_time_min = 4; - Timestamp start_time_max = 5; - Duration duration_min = 6; - Duration duration_max = 7; + google.protobuf.Timestamp start_time_min = 4 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false + ]; + google.protobuf.Timestamp start_time_max = 5 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false + ]; + google.protobuf.Duration duration_min = 6 [ + (gogoproto.stdduration) = true, + (gogoproto.nullable) = false + ]; + google.protobuf.Duration duration_max = 7 [ + (gogoproto.stdduration) = true, + (gogoproto.nullable) = false + ]; int32 num_traces = 8; } @@ -155,7 +186,7 @@ service StoragePlugin { // dependencystore/Writer // rpc WriteDependencies(WriteDependenciesRequest) returns (WriteDependenciesResponse); // dependencystore/Reader - rpc GetDependencies(GetDependenciesRequest) returns (GetDependenciesResponse); +// rpc GetDependencies(GetDependenciesRequest) returns (GetDependenciesResponse); // TODO(olivierboucher): make theses available once the POC goes through // samplingstore/Store diff --git a/plugin/storage/grpc/shared/grpc.go b/plugin/storage/grpc/shared/grpc.go index 37e53a841fb..f937c36e47c 100644 --- a/plugin/storage/grpc/shared/grpc.go +++ b/plugin/storage/grpc/shared/grpc.go @@ -17,7 +17,6 @@ package shared import ( "context" "fmt" - "time" "github.com/jaegertracing/jaeger/model" "github.com/jaegertracing/jaeger/plugin/storage/grpc/proto" @@ -30,7 +29,7 @@ type GRPCClient struct { func (c *GRPCClient) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) { resp, err := c.client.GetTrace(ctx, &proto.GetTraceRequest{ - TraceId: TraceIDToProto(&traceID), + TraceID: traceID, }) if err != nil { return nil, fmt.Errorf("grpc error: %s", err) @@ -38,7 +37,7 @@ func (c *GRPCClient) GetTrace(ctx context.Context, traceID model.TraceID) (*mode switch t := resp.Response.(type) { case *proto.GetTraceResponse_Success: - return TraceFromProto(t.Success.Trace), nil + return t.Success.Trace, nil case *proto.GetTraceResponse_Error: return nil, fmt.Errorf("plugin error: %s", t.Error.Message) default: @@ -85,10 +84,10 @@ func (c *GRPCClient) FindTraces(ctx context.Context, query *spanstore.TraceQuery ServiceName: query.ServiceName, OperationName: query.OperationName, Tags: query.Tags, - StartTimeMin: TimeToProto(query.StartTimeMin), - StartTimeMax: TimeToProto(query.StartTimeMax), - DurationMin: DurationToProto(query.DurationMin), - DurationMax: DurationToProto(query.DurationMax), + StartTimeMin: query.StartTimeMin, + StartTimeMax: query.StartTimeMax, + DurationMin: query.DurationMin, + DurationMax: query.DurationMax, NumTraces: int32(query.NumTraces), }) if err != nil { @@ -97,7 +96,7 @@ func (c *GRPCClient) FindTraces(ctx context.Context, query *spanstore.TraceQuery switch t := resp.Response.(type) { case *proto.FindTracesResponse_Success: - return TraceSliceFromProto(t.Success.Traces), nil + return t.Success.Traces, nil case *proto.FindTracesResponse_Error: return nil, fmt.Errorf("plugin error: %s", t.Error.Message) default: @@ -107,7 +106,7 @@ func (c *GRPCClient) FindTraces(ctx context.Context, query *spanstore.TraceQuery func (c *GRPCClient) WriteSpan(span *model.Span) error { resp, err := c.client.WriteSpan(context.Background(), &proto.WriteSpanRequest{ - Span: SpanToProto(span), + Span: span, }) if err != nil { return fmt.Errorf("grpc error: %s", err) @@ -123,51 +122,51 @@ func (c *GRPCClient) WriteSpan(span *model.Span) error { } } -func (c *GRPCClient) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { - resp, err := c.client.GetDependencies(context.Background(), &proto.GetDependenciesRequest{ - EndTimestamp: TimeToProto(endTs), - Lookback: DurationToProto(lookback), - }) - if err != nil { - return nil, fmt.Errorf("grpc error: %s", err) - } - - switch t := resp.Response.(type) { - case *proto.GetDependenciesResponse_Success: - return DependencyLinkSliceFromProto(t.Success.Dependencies), nil - case *proto.GetDependenciesResponse_Error: - return nil, fmt.Errorf("plugin error: %s", t.Error.Message) - default: - panic("unreachable") - } -} +//func (c *GRPCClient) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { +// resp, err := c.client.GetDependencies(context.Background(), &proto.GetDependenciesRequest{ +// EndTimestamp: TimeToProto(endTs), +// Lookback: DurationToProto(lookback), +// }) +// if err != nil { +// return nil, fmt.Errorf("grpc error: %s", err) +// } +// +// switch t := resp.Response.(type) { +// case *proto.GetDependenciesResponse_Success: +// return DependencyLinkSliceFromProto(t.Success.Dependencies), nil +// case *proto.GetDependenciesResponse_Error: +// return nil, fmt.Errorf("plugin error: %s", t.Error.Message) +// default: +// panic("unreachable") +// } +//} type GRPCServer struct { Impl StoragePlugin } -func (s *GRPCServer) GetDependencies(ctx context.Context, r *proto.GetDependenciesRequest) (*proto.GetDependenciesResponse, error) { - deps, err := s.Impl.GetDependencies(TimeFromProto(r.EndTimestamp), DurationFromProto(r.Lookback)) - if err != nil { - return &proto.GetDependenciesResponse{ - Response: &proto.GetDependenciesResponse_Error{ - Error: &proto.StoragePluginError{ - Message: err.Error(), - }, - }, - }, nil - } - return &proto.GetDependenciesResponse{ - Response: &proto.GetDependenciesResponse_Success{ - Success: &proto.GetDependenciesSuccess{ - Dependencies: DependencyLinkSliceToProto(deps), - }, - }, - }, nil -} +//func (s *GRPCServer) GetDependencies(ctx context.Context, r *proto.GetDependenciesRequest) (*proto.GetDependenciesResponse, error) { +// deps, err := s.Impl.GetDependencies(TimeFromProto(r.EndTimestamp), DurationFromProto(r.Lookback)) +// if err != nil { +// return &proto.GetDependenciesResponse{ +// Response: &proto.GetDependenciesResponse_Error{ +// Error: &proto.StoragePluginError{ +// Message: err.Error(), +// }, +// }, +// }, nil +// } +// return &proto.GetDependenciesResponse{ +// Response: &proto.GetDependenciesResponse_Success{ +// Success: &proto.GetDependenciesSuccess{ +// Dependencies: DependencyLinkSliceToProto(deps), +// }, +// }, +// }, nil +//} func (s *GRPCServer) WriteSpan(ctx context.Context, r *proto.WriteSpanRequest) (*proto.WriteSpanResponse, error) { - err := s.Impl.WriteSpan(SpanFromProto(r.Span)) + err := s.Impl.WriteSpan(r.Span) if err != nil { return &proto.WriteSpanResponse{ Response: &proto.WriteSpanResponse_Error{ @@ -185,7 +184,7 @@ func (s *GRPCServer) WriteSpan(ctx context.Context, r *proto.WriteSpanRequest) ( } func (s *GRPCServer) GetTrace(ctx context.Context, r *proto.GetTraceRequest) (*proto.GetTraceResponse, error) { - trace, err := s.Impl.GetTrace(ctx, TraceIDFromProto(r.TraceId)) + trace, err := s.Impl.GetTrace(ctx, r.TraceID) if err != nil { return &proto.GetTraceResponse{ Response: &proto.GetTraceResponse_Error{ @@ -198,7 +197,7 @@ func (s *GRPCServer) GetTrace(ctx context.Context, r *proto.GetTraceRequest) (*p return &proto.GetTraceResponse{ Response: &proto.GetTraceResponse_Success{ Success: &proto.GetTraceSuccess{ - Trace: TraceToProto(trace), + Trace: trace, }, }, }, nil @@ -249,10 +248,10 @@ func (s *GRPCServer) FindTraces(ctx context.Context, r *proto.FindTracesRequest) ServiceName: r.ServiceName, OperationName: r.OperationName, Tags: r.Tags, - StartTimeMin: TimeFromProto(r.StartTimeMin), - StartTimeMax: TimeFromProto(r.StartTimeMax), - DurationMin: DurationFromProto(r.DurationMin), - DurationMax: DurationFromProto(r.DurationMax), + StartTimeMin: r.StartTimeMin, + StartTimeMax: r.StartTimeMax, + DurationMin: r.DurationMin, + DurationMax: r.DurationMax, NumTraces: int(r.NumTraces), }) if err != nil { @@ -267,7 +266,7 @@ func (s *GRPCServer) FindTraces(ctx context.Context, r *proto.FindTracesRequest) return &proto.FindTracesResponse{ Response: &proto.FindTracesResponse_Success{ Success: &proto.FindTracesSuccess{ - Traces: TraceSliceToProto(traces), + Traces: traces, }, }, }, nil diff --git a/plugin/storage/grpc/shared/interface.go b/plugin/storage/grpc/shared/interface.go index 0fd11ba5685..a2ab8c336a6 100644 --- a/plugin/storage/grpc/shared/interface.go +++ b/plugin/storage/grpc/shared/interface.go @@ -21,7 +21,6 @@ import ( "google.golang.org/grpc" "github.com/jaegertracing/jaeger/plugin/storage/grpc/proto" - "github.com/jaegertracing/jaeger/storage/dependencystore" "github.com/jaegertracing/jaeger/storage/spanstore" ) @@ -43,7 +42,6 @@ var PluginMap = map[string]plugin.Plugin{ type StoragePlugin interface { spanstore.Reader spanstore.Writer - dependencystore.Reader } // This is the implementation of plugin.GRPCPlugin so we can serve/consume this. diff --git a/plugin/storage/grpc/shared/mapping.go b/plugin/storage/grpc/shared/mapping.go deleted file mode 100644 index 9bd8bbf83db..00000000000 --- a/plugin/storage/grpc/shared/mapping.go +++ /dev/null @@ -1,422 +0,0 @@ -// Copyright (c) 2018 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 ( - "time" - - "github.com/jaegertracing/jaeger/model" - "github.com/jaegertracing/jaeger/plugin/storage/grpc/proto" -) - -func DependencyLinkSliceFromProto(p []*proto.DependencyLink) []model.DependencyLink { - rs := make([]model.DependencyLink, len(p)) - - for n, dep := range p { - rs[n] = DependencyLinkFromProto(dep) - } - - return rs -} - -func DependencyLinkSliceToProto(ds []model.DependencyLink) []*proto.DependencyLink { - rs := make([]*proto.DependencyLink, len(ds)) - - for n, dep := range ds { - rs[n] = DependencyLinkToProto(&dep) - } - - return rs -} - -func DependencyLinkToProto(dep *model.DependencyLink) *proto.DependencyLink { - return &proto.DependencyLink{ - Parent: dep.Parent, - Child: dep.Child, - CallCount: dep.CallCount, - } -} - -func DependencyLinkFromProto(p *proto.DependencyLink) model.DependencyLink { - return model.DependencyLink{ - Parent: p.Parent, - Child: p.Child, - CallCount: p.CallCount, - } -} - -func TraceProcessMappingSliceToProto(mappings []model.Trace_ProcessMapping) []*proto.TraceProcessMapping { - rs := make([]*proto.TraceProcessMapping, len(mappings)) - - for n, mapping := range mappings { - rs[n] = TraceProcessMappingToProto(&mapping) - } - - return rs -} - -func TraceProcessMappingSliceFromProto(p []*proto.TraceProcessMapping) []model.Trace_ProcessMapping { - rs := make([]model.Trace_ProcessMapping, len(p)) - - for n, mapping := range p { - rs[n] = TraceProcessMappingFromProto(mapping) - } - - return rs -} - -func TraceProcessMappingToProto(mapping *model.Trace_ProcessMapping) *proto.TraceProcessMapping { - return &proto.TraceProcessMapping{ - ProcessId: mapping.ProcessID, - Process: ProcessToProto(&mapping.Process), - } -} - -func TraceProcessMappingFromProto(p *proto.TraceProcessMapping) model.Trace_ProcessMapping { - return model.Trace_ProcessMapping{ - ProcessID: p.ProcessId, - Process: ProcessFromProto(p.Process), - } -} - -func ProcessToProto(process *model.Process) *proto.Process { - return &proto.Process{ - ServiceName: process.ServiceName, - Tags: KeyValueSliceToProto(process.Tags), - } -} - -func ProcessFromProto(p *proto.Process) model.Process { - return model.Process{ - ServiceName: p.ServiceName, - Tags: KeyValueSliceFromProto(p.Tags), - } -} - -func ProcessPtrFromProto(p *proto.Process) *model.Process { - if p == nil { - return nil - } - - return &model.Process{ - ServiceName: p.ServiceName, - Tags: KeyValueSliceFromProto(p.Tags), - } -} - -func LogSliceToProto(ls []model.Log) []*proto.Log { - rs := make([]*proto.Log, len(ls)) - - for n, log := range ls { - rs[n] = LogToProto(&log) - } - - return rs -} - -func LogSliceFromProto(p []*proto.Log) []model.Log { - rs := make([]model.Log, len(p)) - - for n, log := range p { - rs[n] = LogFromProto(log) - } - - return rs -} - -func LogToProto(log *model.Log) *proto.Log { - return &proto.Log{ - Timestamp: TimeToProto(log.Timestamp), - Fields: KeyValueSliceToProto(log.Fields), - } -} - -func LogFromProto(p *proto.Log) model.Log { - return model.Log{ - Timestamp: TimeFromProto(p.Timestamp), - Fields: KeyValueSliceFromProto(p.Fields), - } -} - -func ValueTypeToProto(vt model.ValueType) proto.ValueType { - switch vt { - case model.ValueType_STRING: - return proto.ValueType_ValueType_STRING - case model.ValueType_BOOL: - return proto.ValueType_ValueType_BOOL - case model.ValueType_INT64: - return proto.ValueType_ValueType_INT64 - case model.ValueType_FLOAT64: - return proto.ValueType_ValueType_FLOAT64 - case model.ValueType_BINARY: - return proto.ValueType_ValueType_BINARY - default: - panic("unreachable") - } -} - -func ValueTypeFromProto(p proto.ValueType) model.ValueType { - switch p { - case proto.ValueType_ValueType_STRING: - return model.ValueType_STRING - case proto.ValueType_ValueType_BOOL: - return model.ValueType_BOOL - case proto.ValueType_ValueType_INT64: - return model.ValueType_INT64 - case proto.ValueType_ValueType_FLOAT64: - return model.ValueType_FLOAT64 - case proto.ValueType_ValueType_BINARY: - return model.ValueType_BINARY - default: - panic("unreachable") - } -} - -func KeyValueSliceToProto(kvs []model.KeyValue) []*proto.KeyValue { - rs := make([]*proto.KeyValue, len(kvs)) - - for n, kv := range kvs { - rs[n] = KeyValueToProto(&kv) - } - - return rs -} - -func KeyValueSliceFromProto(p []*proto.KeyValue) []model.KeyValue { - rs := make([]model.KeyValue, len(p)) - - for n, kv := range p { - rs[n] = KeyValueFromProto(kv) - } - - return rs -} - -func KeyValueToProto(kv *model.KeyValue) *proto.KeyValue { - return &proto.KeyValue{ - Key: kv.Key, - ValueType: ValueTypeToProto(kv.VType), - StringValue: kv.VStr, - BoolValue: kv.VBool, - Int64Value: kv.VInt64, - Float64Value: kv.VFloat64, - BinaryValue: kv.VBinary, - } -} - -func KeyValueFromProto(p *proto.KeyValue) model.KeyValue { - return model.KeyValue{ - Key: p.Key, - VType: ValueTypeFromProto(p.ValueType), - VStr: p.StringValue, - VBool: p.BoolValue, - VInt64: p.Int64Value, - VFloat64: p.Float64Value, - VBinary: p.BinaryValue, - } -} - -func DurationToProto(d time.Duration) *proto.Duration { - nanos := d.Nanoseconds() - secs := nanos / 1e9 - nanos -= secs * 1e9 - return &proto.Duration{ - Seconds: secs, - Nanos: int32(nanos), - } -} - -func DurationFromProto(p *proto.Duration) time.Duration { - d := time.Duration(p.Seconds) * time.Second - if p.Nanos != 0 { - d += time.Duration(p.Nanos) - } - - return d -} - -func TimeToProto(t time.Time) *proto.Timestamp { - seconds := t.Unix() - return &proto.Timestamp{ - Seconds: seconds, - Nanos: int32(t.Sub(time.Unix(seconds, 0))), - } -} - -func TimeFromProto(p *proto.Timestamp) time.Time { - return time.Unix(p.Seconds, int64(p.Nanos)) -} - -func SpanRefTypeToProto(spanRefType model.SpanRefType) proto.SpanRefType { - switch spanRefType { - case model.FollowsFrom: - return proto.SpanRefType_SpanRefType_FOLLOWS_FROM - case model.ChildOf: - return proto.SpanRefType_SpanRefType_CHILD_OF - default: - panic("unreachable") - } -} - -func SpanRefTypeFromProto(p proto.SpanRefType) model.SpanRefType { - switch p { - case proto.SpanRefType_SpanRefType_CHILD_OF: - return model.ChildOf - case proto.SpanRefType_SpanRefType_FOLLOWS_FROM: - return model.FollowsFrom - default: - panic("unreachable") - } -} - -func SpanRefSliceToProto(srs []model.SpanRef) []*proto.SpanRef { - rs := make([]*proto.SpanRef, len(srs)) - - for n, spanRef := range srs { - rs[n] = SpanRefToProto(&spanRef) - } - - return rs -} - -func SpanRefSliceFromProto(p []*proto.SpanRef) []model.SpanRef { - rs := make([]model.SpanRef, len(p)) - - for n, spanRef := range p { - rs[n] = SpanRefFromProto(spanRef) - } - - return rs -} - -func SpanRefToProto(spanRef *model.SpanRef) *proto.SpanRef { - return &proto.SpanRef{ - TraceId: TraceIDToProto(&spanRef.TraceID), - SpanId: uint64(spanRef.SpanID), - RefType: SpanRefTypeToProto(spanRef.RefType), - } -} - -func SpanRefFromProto(p *proto.SpanRef) model.SpanRef { - return model.SpanRef{ - TraceID: TraceIDFromProto(p.TraceId), - SpanID: model.SpanID(p.SpanId), - RefType: SpanRefTypeFromProto(p.RefType), - } -} - -func TraceIDToProto(tid *model.TraceID) *proto.TraceId { - return &proto.TraceId{ - Low: tid.Low, - High: tid.High, - } -} - -func TraceIDFromProto(p *proto.TraceId) model.TraceID { - return model.TraceID{ - Low: p.Low, - High: p.High, - } -} - -func TraceSliceToProto(ts []*model.Trace) []*proto.Trace { - rs := make([]*proto.Trace, len(ts)) - - for n, trace := range ts { - rs[n] = TraceToProto(trace) - } - - return rs -} - -func TraceSliceFromProto(p []*proto.Trace) []*model.Trace { - rs := make([]*model.Trace, len(p)) - - for n, trace := range p { - rs[n] = TraceFromProto(trace) - } - - return rs -} - -func TraceToProto(trace *model.Trace) *proto.Trace { - return &proto.Trace{ - Spans: SpanSliceToProto(trace.Spans), - ProcessMap: TraceProcessMappingSliceToProto(trace.ProcessMap), - Warnings: trace.Warnings, - } -} - -func TraceFromProto(p *proto.Trace) *model.Trace { - return &model.Trace{ - Spans: SpanSliceFromProto(p.Spans), - ProcessMap: TraceProcessMappingSliceFromProto(p.ProcessMap), - Warnings: p.Warnings, - } -} - -func SpanSliceToProto(spans []*model.Span) []*proto.Span { - rs := make([]*proto.Span, len(spans)) - - for n, span := range spans { - rs[n] = SpanToProto(span) - } - - return rs -} - -func SpanSliceFromProto(p []*proto.Span) []*model.Span { - rs := make([]*model.Span, len(p)) - - for n, span := range p { - rs[n] = SpanFromProto(span) - } - - return rs -} - -func SpanToProto(span *model.Span) *proto.Span { - return &proto.Span{ - TraceId: TraceIDToProto(&span.TraceID), - SpanId: uint64(span.SpanID), - OperationName: span.OperationName, - References: SpanRefSliceToProto(span.References), - Flags: uint32(span.Flags), - StartTime: TimeToProto(span.StartTime), - Duration: DurationToProto(span.Duration), - Tags: KeyValueSliceToProto(span.Tags), - Logs: LogSliceToProto(span.Logs), - Process: ProcessToProto(span.Process), - ProcessId: span.ProcessID, - Warnings: span.Warnings, - } -} - -func SpanFromProto(p *proto.Span) *model.Span { - return &model.Span{ - TraceID: TraceIDFromProto(p.TraceId), - SpanID: model.SpanID(p.SpanId), - OperationName: p.OperationName, - References: SpanRefSliceFromProto(p.References), - Flags: model.Flags(p.Flags), - StartTime: TimeFromProto(p.StartTime), - Duration: DurationFromProto(p.Duration), - Tags: KeyValueSliceFromProto(p.Tags), - Logs: LogSliceFromProto(p.Logs), - Process: ProcessPtrFromProto(p.Process), - ProcessID: p.ProcessId, - Warnings: p.Warnings, - } -} diff --git a/proto-gen/openapi/api_v2.swagger.json b/proto-gen/openapi/api_v2.swagger.json index a476c054cd6..cf2c619ecc9 100644 --- a/proto-gen/openapi/api_v2.swagger.json +++ b/proto-gen/openapi/api_v2.swagger.json @@ -242,8 +242,7 @@ "type": "object", "properties": { "trace_id": { - "type": "string", - "format": "byte" + "$ref": "#/definitions/api_v2TraceID" }, "span_id": { "type": "string", @@ -299,8 +298,7 @@ "type": "object", "properties": { "trace_id": { - "type": "string", - "format": "byte" + "$ref": "#/definitions/api_v2TraceID" }, "span_id": { "type": "string", @@ -319,6 +317,19 @@ ], "default": "CHILD_OF" }, + "api_v2TraceID": { + "type": "object", + "properties": { + "low": { + "type": "string", + "format": "uint64" + }, + "high": { + "type": "string", + "format": "uint64" + } + } + }, "api_v2ValueType": { "type": "string", "enum": [ From 5299fa1be4f5b99cdfe3fc7bdb69489de4ebdb9f Mon Sep 17 00:00:00 2001 From: Olivier Boucher Date: Tue, 11 Dec 2018 13:49:17 -0500 Subject: [PATCH 04/11] Removed .editorconfig file Signed-off-by: Olivier Boucher --- .editorconfig | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 2c594af82c0..00000000000 --- a/.editorconfig +++ /dev/null @@ -1,4 +0,0 @@ -# Override for Makefile -[{Makefile, makefile, GNUmakefile}] -indent_style = tab -indent_size = 4 \ No newline at end of file From 530a14a2b394ee2f17b90dfd55d0263d6bd60dca Mon Sep 17 00:00:00 2001 From: Olivier Boucher Date: Tue, 11 Dec 2018 18:17:32 -0500 Subject: [PATCH 05/11] Added support for gRPC plugin configuration Configuration file is passed down to the plugin through the --config argument. It is the plugin's responsability to parse the file and initialize itself. Signed-off-by: Olivier Boucher --- cmd/memory-grpc-plugin/main.go | 24 ++++++++++++++++++++++-- pkg/grpc/config/config.go | 1 + plugin/storage/grpc/factory.go | 7 +++---- plugin/storage/grpc/options.go | 9 +++++---- plugin/storage/grpc/plugin.go | 2 +- 5 files changed, 32 insertions(+), 11 deletions(-) diff --git a/cmd/memory-grpc-plugin/main.go b/cmd/memory-grpc-plugin/main.go index 5d4b315b5b4..8fce960eff1 100644 --- a/cmd/memory-grpc-plugin/main.go +++ b/cmd/memory-grpc-plugin/main.go @@ -15,19 +15,39 @@ package main import ( + "flag" "github.com/hashicorp/go-plugin" - "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" "github.com/jaegertracing/jaeger/plugin/storage/memory" + "github.com/spf13/viper" + "path" + "strings" ) +var configPath string + func main() { + flag.StringVar(&configPath, "config", "", "A path to the plugin's configuration file") + flag.Parse() + + if configPath != "" { + viper.SetConfigFile(path.Base(configPath)) + viper.AddConfigPath(path.Dir(configPath)) + } + + v := viper.New() + v.AutomaticEnv() + v.SetEnvKeyReplacer(strings.NewReplacer("-", "_", ".", "_")) + + opts := memory.Options{} + opts.InitFromViper(v) + plugin.Serve(&plugin.ServeConfig{ HandshakeConfig: shared.Handshake, VersionedPlugins: map[int]plugin.PluginSet{ 1: map[string]plugin.Plugin{ shared.StoragePluginIdentifier: &shared.StorageGRPCPlugin{ - Impl: memory.NewStore(), + Impl: memory.WithConfiguration(opts.Configuration), }, }, }, diff --git a/pkg/grpc/config/config.go b/pkg/grpc/config/config.go index f0703eeddcc..28866633ac5 100644 --- a/pkg/grpc/config/config.go +++ b/pkg/grpc/config/config.go @@ -17,4 +17,5 @@ package config // Configuration describes the options to customize the storage behavior type Configuration struct { PluginBinary string `yaml:"binary"` + PluginConfigurationFile string `yaml:"configuration-file"` } diff --git a/plugin/storage/grpc/factory.go b/plugin/storage/grpc/factory.go index df4d1c21664..c0c5790a203 100644 --- a/plugin/storage/grpc/factory.go +++ b/plugin/storage/grpc/factory.go @@ -21,7 +21,6 @@ import ( "github.com/uber/jaeger-lib/metrics" "go.uber.org/zap" - "github.com/jaegertracing/jaeger/storage/dependencystore" "github.com/jaegertracing/jaeger/storage/spanstore" ) @@ -70,6 +69,6 @@ func (f *Factory) CreateSpanWriter() (spanstore.Writer, error) { } // CreateDependencyReader implements storage.Factory -func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error) { - return f.store, nil -} +//func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error) { +// return f.store, nil +//} diff --git a/plugin/storage/grpc/options.go b/plugin/storage/grpc/options.go index e0ff53b7ca6..94917671c45 100644 --- a/plugin/storage/grpc/options.go +++ b/plugin/storage/grpc/options.go @@ -16,23 +16,24 @@ package grpc import ( "flag" - "github.com/spf13/viper" "github.com/jaegertracing/jaeger/pkg/grpc/config" ) -const pluginBinary = "grpc-plugin.binary" +const pluginBinary = "grpc-storage-plugin.binary" +const pluginConfigurationFile = "grpc-storage-plugin.configuration-file" type Options struct { Configuration config.Configuration } func (opt *Options) AddFlags(flagSet *flag.FlagSet) { - flagSet.String(pluginBinary, opt.Configuration.PluginBinary, "The location of the plugin binary") - + flagSet.String(pluginBinary, "", "The location of the plugin binary") + flagSet.String(pluginConfigurationFile, "", "A path pointing to the plugin's configuration file, made available to the plugin with the --config arg") } func (opt *Options) InitFromViper(v *viper.Viper) { opt.Configuration.PluginBinary = v.GetString(pluginBinary) + opt.Configuration.PluginConfigurationFile = v.GetString(pluginConfigurationFile) } diff --git a/plugin/storage/grpc/plugin.go b/plugin/storage/grpc/plugin.go index 6e828b15dd5..0e9d0353894 100644 --- a/plugin/storage/grpc/plugin.go +++ b/plugin/storage/grpc/plugin.go @@ -39,7 +39,7 @@ func WithConfiguration(configuration config.Configuration) (*Store, error) { VersionedPlugins: map[int]plugin.PluginSet{ 1: shared.PluginMap, }, - Cmd: exec.Command(configuration.PluginBinary), + Cmd: exec.Command(configuration.PluginBinary, "--config", configuration.PluginConfigurationFile), AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC}, }) From ac915c085ec4c5eca15978c94719e06dd06a55fc Mon Sep 17 00:00:00 2001 From: Olivier Boucher Date: Thu, 13 Dec 2018 19:06:22 -0500 Subject: [PATCH 06/11] Added benchmark for noop SpanWriter vs gRPC based noop plugin Fixed issues related to proto changes. Deleted memory-grpc-plugin since it was no longer relevant. Signed-off-by: Olivier Boucher --- cmd/collector/app/span_processor.go | 2 +- cmd/noop-grpc-plugin/load_test.go | 75 +++++++++++++++++++ .../main.go | 29 ++++++- .../cassandra/spanstore/dbmodel/model.go | 3 +- plugin/storage/grpc/factory.go | 7 +- plugin/storage/grpc/plugin.go | 9 +++ 6 files changed, 119 insertions(+), 6 deletions(-) create mode 100644 cmd/noop-grpc-plugin/load_test.go rename cmd/{memory-grpc-plugin => noop-grpc-plugin}/main.go (69%) diff --git a/cmd/collector/app/span_processor.go b/cmd/collector/app/span_processor.go index faf59b04060..b8bffdaebb4 100644 --- a/cmd/collector/app/span_processor.go +++ b/cmd/collector/app/span_processor.go @@ -103,7 +103,7 @@ func (sp *spanProcessor) saveSpan(span *model.Span) { sp.metrics.SavedErrBySvc.ReportServiceNameForSpan(span) } else { sp.logger.Debug("Span written to the storage by the collector", - zap.Stringer("trace-id", span.TraceID), zap.Stringer("span-id", span.SpanID)) + zap.Stringer("trace-id", &span.TraceID), zap.Stringer("span-id", span.SpanID)) sp.metrics.SavedOkBySvc.ReportServiceNameForSpan(span) } sp.metrics.SaveLatency.Record(time.Since(startTime)) diff --git a/cmd/noop-grpc-plugin/load_test.go b/cmd/noop-grpc-plugin/load_test.go new file mode 100644 index 00000000000..35a872c50e3 --- /dev/null +++ b/cmd/noop-grpc-plugin/load_test.go @@ -0,0 +1,75 @@ +package main + +import ( + "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/plugin/storage/grpc" + "github.com/spf13/viper" + "github.com/uber/jaeger-lib/metrics/prometheus" + "go.uber.org/zap" + "testing" + "time" +) + +var logger = zap.NewNop() + +func BenchmarkNoopSpanWriter(b *testing.B) { + s := &noopStore{} + + for n := 0; n < b.N; n++ { + s.WriteSpan(&model.Span{ + TraceID:model.NewTraceID(1, 2), + SpanID:model.NewSpanID(1), + OperationName: "test", + StartTime: time.Now(), + Duration: 1 * time.Second, + Process: model.NewProcess("process", []model.KeyValue{ + + }), + ProcessID: "process_id", + Tags: []model.KeyValue{ + { + Key:"test", + VStr: "", + }, + }, + }) + } +} + +func BenchmarkGRPCNoopSpanWriter(b *testing.B) { + v := viper.New() + + v.Set("grpc-storage-plugin.binary", "noop-grpc-plugin") + + f := grpc.NewFactory() + f.InitFromViper(v) + + metricsFactory := prometheus.New() + + f.Initialize( metricsFactory, logger) + + sw, err := f.CreateSpanWriter() + if err != nil { + b.Fatal(err) + } + + for n := 0; n < b.N; n++ { + sw.WriteSpan(&model.Span{ + TraceID:model.NewTraceID(1, 2), + SpanID:model.NewSpanID(1), + OperationName: "test", + StartTime: time.Now(), + Duration: 1 * time.Second, + Process: model.NewProcess("process", []model.KeyValue{ + + }), + ProcessID: "process_id", + Tags: []model.KeyValue{ + { + Key:"test", + VStr: "", + }, + }, + }) + } +} diff --git a/cmd/memory-grpc-plugin/main.go b/cmd/noop-grpc-plugin/main.go similarity index 69% rename from cmd/memory-grpc-plugin/main.go rename to cmd/noop-grpc-plugin/main.go index 8fce960eff1..1e511153c65 100644 --- a/cmd/memory-grpc-plugin/main.go +++ b/cmd/noop-grpc-plugin/main.go @@ -15,10 +15,13 @@ package main import ( + "context" "flag" "github.com/hashicorp/go-plugin" + "github.com/jaegertracing/jaeger/model" "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" "github.com/jaegertracing/jaeger/plugin/storage/memory" + "github.com/jaegertracing/jaeger/storage/spanstore" "github.com/spf13/viper" "path" "strings" @@ -47,10 +50,34 @@ func main() { VersionedPlugins: map[int]plugin.PluginSet{ 1: map[string]plugin.Plugin{ shared.StoragePluginIdentifier: &shared.StorageGRPCPlugin{ - Impl: memory.WithConfiguration(opts.Configuration), + Impl: &noopStore{}, }, }, }, GRPCServer: plugin.DefaultGRPCServer, }) } + +type noopStore struct { + +} + +func (*noopStore) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) { + return nil, nil +} + +func (*noopStore) GetServices(ctx context.Context) ([]string, error) { + return nil, nil +} + +func (*noopStore) GetOperations(ctx context.Context, service string) ([]string, error) { + return nil, nil +} + +func (*noopStore) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error) { + return nil,nil +} + +func (*noopStore) WriteSpan(span *model.Span) error { + return nil +} diff --git a/plugin/storage/cassandra/spanstore/dbmodel/model.go b/plugin/storage/cassandra/spanstore/dbmodel/model.go index ffc76b315f1..3056882f1c7 100644 --- a/plugin/storage/cassandra/spanstore/dbmodel/model.go +++ b/plugin/storage/cassandra/spanstore/dbmodel/model.go @@ -117,5 +117,6 @@ func (dbTraceID TraceID) ToDomain() model.TraceID { // String returns hex string representation of the trace ID. func (dbTraceID TraceID) String() string { - return dbTraceID.ToDomain().String() + t := dbTraceID.ToDomain() + return t.String() } diff --git a/plugin/storage/grpc/factory.go b/plugin/storage/grpc/factory.go index c0c5790a203..4a316441134 100644 --- a/plugin/storage/grpc/factory.go +++ b/plugin/storage/grpc/factory.go @@ -16,6 +16,7 @@ package grpc import ( "flag" + "github.com/jaegertracing/jaeger/storage/dependencystore" "github.com/spf13/viper" "github.com/uber/jaeger-lib/metrics" @@ -69,6 +70,6 @@ func (f *Factory) CreateSpanWriter() (spanstore.Writer, error) { } // CreateDependencyReader implements storage.Factory -//func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error) { -// return f.store, nil -//} +func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error) { + return nil, nil +} diff --git a/plugin/storage/grpc/plugin.go b/plugin/storage/grpc/plugin.go index 0e9d0353894..7f9a6372f0f 100644 --- a/plugin/storage/grpc/plugin.go +++ b/plugin/storage/grpc/plugin.go @@ -17,8 +17,10 @@ package grpc import ( "context" "fmt" + "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-plugin" "os/exec" + "runtime" "github.com/jaegertracing/jaeger/model" "github.com/jaegertracing/jaeger/pkg/grpc/config" @@ -41,6 +43,13 @@ func WithConfiguration(configuration config.Configuration) (*Store, error) { }, Cmd: exec.Command(configuration.PluginBinary, "--config", configuration.PluginConfigurationFile), AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC}, + Logger: hclog.New(&hclog.LoggerOptions{ + Level: hclog.Warn, + }), + }) + + runtime.SetFinalizer(client, func(c *plugin.Client) { + c.Kill() }) rpcClient, err := client.Client() From e66dbed2e232f8d06b336095fcd8a2004e5e0310 Mon Sep 17 00:00:00 2001 From: Olivier Boucher Date: Thu, 13 Dec 2018 19:45:23 -0500 Subject: [PATCH 07/11] Updated gRPC plugin & protos to implement latest SpanReader Added dependencies to Gopkg.lock since Glide -> dep transition happened recently. Signed-off-by: Olivier Boucher --- Gopkg.lock | 49 +- cmd/noop-grpc-plugin/main.go | 4 + plugin/storage/grpc/plugin.go | 4 + plugin/storage/grpc/proto/storage.pb.go | 1040 ++++++++++++++++++++--- plugin/storage/grpc/proto/storage.proto | 40 +- plugin/storage/grpc/shared/grpc.go | 92 +- 6 files changed, 1074 insertions(+), 155 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 78ba22f6db1..929251b41b2 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -349,6 +349,25 @@ pruneopts = "UT" revision = "e80d13ce29ede4452c43dea11e79b9bc8a15b478" +[[projects]] + branch = "master" + digest = "1:0876aeb6edb07e20b6b0ce1d346655cb63dbe0a26ccfb47b68a9b7697709777b" + name = "github.com/hashicorp/go-hclog" + packages = ["."] + pruneopts = "UT" + revision = "61d530d6c27f994fb6c83b80f99a69c54125ec8a" + +[[projects]] + branch = "master" + digest = "1:1f0c8665817a698bf12c6ad29922d6cdb85ecaa54dd404d77f91f58c6bccd84e" + name = "github.com/hashicorp/go-plugin" + packages = [ + ".", + "internal/proto", + ] + pruneopts = "UT" + revision = "f444068e8f5a19853177f7aa0aea7e7d95b5b528" + [[projects]] digest = "1:c0d19ab64b32ce9fe5cf4ddceba78d5bc9807f0016db6b1183599da3dcc24d10" name = "github.com/hashicorp/hcl" @@ -368,6 +387,14 @@ revision = "8cb6e5b959231cc1119e43259c4a608f9c51a241" version = "v1.0.0" +[[projects]] + branch = "master" + digest = "1:a4826c308e84f5f161b90b54a814f0be7d112b80164b9b884698a6903ea47ab3" + name = "github.com/hashicorp/yamux" + packages = ["."] + pruneopts = "UT" + revision = "2f1d1f20f75d5404f53b9edf6b53ed5505508675" + [[projects]] digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be" name = "github.com/inconshreveable/mousetrap" @@ -420,6 +447,14 @@ revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" version = "v1.0.1" +[[projects]] + digest = "1:42eb1f52b84a06820cedc9baec2e710bfbda3ee6dac6cdb97f8b9a5066134ec6" + name = "github.com/mitchellh/go-testing-interface" + packages = ["."] + pruneopts = "UT" + revision = "6d0b8010fcc857872e42fc6c931227569016843c" + version = "v1.0.0" + [[projects]] digest = "1:53bc4cd4914cd7cd52139990d5170d6dc99067ae31c56530621b18b35fc30318" name = "github.com/mitchellh/mapstructure" @@ -428,6 +463,14 @@ revision = "3536a929edddb9a5b34bd6861dc4a9647cb459fe" version = "v1.1.2" +[[projects]] + digest = "1:9ec6cf1df5ad1d55cf41a43b6b1e7e118a91bade4f68ff4303379343e40c0e25" + name = "github.com/oklog/run" + packages = ["."] + pruneopts = "UT" + revision = "4dadeb3030eda0273a12382bb2348ffc7c9d1a39" + version = "v1.0.0" + [[projects]] branch = "master" digest = "1:51fb21c0dd1b64d5ae74c34f544e312ee73edd2a258db6347369014b5949f44a" @@ -779,7 +822,7 @@ revision = "bd91e49a0898e27abb88c339b432fa53d7497ac0" [[projects]] - digest = "1:977794f3a0427850b6f4cb87cb88869a1833cb9e3f8867938c87434e422b7aa0" + digest = "1:63e4afbf415d15c3ef9a1fc5c749a0f6a381d6388eec233ed35c4c7b28898bc6" name = "google.golang.org/grpc" packages = [ ".", @@ -793,6 +836,8 @@ "encoding/proto", "grpclb/grpc_lb_v1/messages", "grpclog", + "health", + "health/grpc_health_v1", "internal", "keepalive", "metadata", @@ -870,6 +915,8 @@ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options", "github.com/grpc-ecosystem/grpc-gateway/runtime", "github.com/grpc-ecosystem/grpc-gateway/utilities", + "github.com/hashicorp/go-hclog", + "github.com/hashicorp/go-plugin", "github.com/kr/pretty", "github.com/opentracing-contrib/go-stdlib/nethttp", "github.com/opentracing/opentracing-go", diff --git a/cmd/noop-grpc-plugin/main.go b/cmd/noop-grpc-plugin/main.go index 1e511153c65..44863d84ab7 100644 --- a/cmd/noop-grpc-plugin/main.go +++ b/cmd/noop-grpc-plugin/main.go @@ -78,6 +78,10 @@ func (*noopStore) FindTraces(ctx context.Context, query *spanstore.TraceQueryPar return nil,nil } +func (*noopStore) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error) { + panic("implement me") +} + func (*noopStore) WriteSpan(span *model.Span) error { return nil } diff --git a/plugin/storage/grpc/plugin.go b/plugin/storage/grpc/plugin.go index 7f9a6372f0f..7c0ed4f38b8 100644 --- a/plugin/storage/grpc/plugin.go +++ b/plugin/storage/grpc/plugin.go @@ -93,6 +93,10 @@ func (s *Store) FindTraces(ctx context.Context, query *spanstore.TraceQueryParam return s.plugin.FindTraces(ctx, query) } +func (s *Store) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error) { + return s.plugin.FindTraceIDs(ctx, query) +} + //func (s *Store) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { // return s.plugin.GetDependencies(endTs, lookback) //} diff --git a/plugin/storage/grpc/proto/storage.pb.go b/plugin/storage/grpc/proto/storage.pb.go index d1f39832ab2..2ac17979e33 100644 --- a/plugin/storage/grpc/proto/storage.pb.go +++ b/plugin/storage/grpc/proto/storage.pb.go @@ -19,9 +19,13 @@ GetOperationsRequest GetOperationsSuccess GetOperationsResponse + TraceQueryParameters FindTracesRequest FindTracesSuccess FindTracesResponse + FindTraceIDsRequest + FindTraceIDsSuccess + FindTraceIDsResponse EmptyResponse StoragePluginError */ @@ -654,7 +658,7 @@ func _GetOperationsResponse_OneofSizer(msg proto1.Message) (n int) { return n } -type FindTracesRequest struct { +type TraceQueryParameters struct { ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` OperationName string `protobuf:"bytes,2,opt,name=operation_name,json=operationName,proto3" json:"operation_name,omitempty"` Tags map[string]string `protobuf:"bytes,3,rep,name=tags" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` @@ -665,67 +669,83 @@ type FindTracesRequest struct { NumTraces int32 `protobuf:"varint,8,opt,name=num_traces,json=numTraces,proto3" json:"num_traces,omitempty"` } -func (m *FindTracesRequest) Reset() { *m = FindTracesRequest{} } -func (m *FindTracesRequest) String() string { return proto1.CompactTextString(m) } -func (*FindTracesRequest) ProtoMessage() {} -func (*FindTracesRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{11} } +func (m *TraceQueryParameters) Reset() { *m = TraceQueryParameters{} } +func (m *TraceQueryParameters) String() string { return proto1.CompactTextString(m) } +func (*TraceQueryParameters) ProtoMessage() {} +func (*TraceQueryParameters) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{11} } -func (m *FindTracesRequest) GetServiceName() string { +func (m *TraceQueryParameters) GetServiceName() string { if m != nil { return m.ServiceName } return "" } -func (m *FindTracesRequest) GetOperationName() string { +func (m *TraceQueryParameters) GetOperationName() string { if m != nil { return m.OperationName } return "" } -func (m *FindTracesRequest) GetTags() map[string]string { +func (m *TraceQueryParameters) GetTags() map[string]string { if m != nil { return m.Tags } return nil } -func (m *FindTracesRequest) GetStartTimeMin() time.Time { +func (m *TraceQueryParameters) GetStartTimeMin() time.Time { if m != nil { return m.StartTimeMin } return time.Time{} } -func (m *FindTracesRequest) GetStartTimeMax() time.Time { +func (m *TraceQueryParameters) GetStartTimeMax() time.Time { if m != nil { return m.StartTimeMax } return time.Time{} } -func (m *FindTracesRequest) GetDurationMin() time.Duration { +func (m *TraceQueryParameters) GetDurationMin() time.Duration { if m != nil { return m.DurationMin } return 0 } -func (m *FindTracesRequest) GetDurationMax() time.Duration { +func (m *TraceQueryParameters) GetDurationMax() time.Duration { if m != nil { return m.DurationMax } return 0 } -func (m *FindTracesRequest) GetNumTraces() int32 { +func (m *TraceQueryParameters) GetNumTraces() int32 { if m != nil { return m.NumTraces } return 0 } +type FindTracesRequest struct { + Query *TraceQueryParameters `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"` +} + +func (m *FindTracesRequest) Reset() { *m = FindTracesRequest{} } +func (m *FindTracesRequest) String() string { return proto1.CompactTextString(m) } +func (*FindTracesRequest) ProtoMessage() {} +func (*FindTracesRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{12} } + +func (m *FindTracesRequest) GetQuery() *TraceQueryParameters { + if m != nil { + return m.Query + } + return nil +} + type FindTracesSuccess struct { Traces []*jaeger_api_v2.Trace `protobuf:"bytes,1,rep,name=traces" json:"traces,omitempty"` } @@ -733,7 +753,7 @@ type FindTracesSuccess struct { func (m *FindTracesSuccess) Reset() { *m = FindTracesSuccess{} } func (m *FindTracesSuccess) String() string { return proto1.CompactTextString(m) } func (*FindTracesSuccess) ProtoMessage() {} -func (*FindTracesSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{12} } +func (*FindTracesSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{13} } func (m *FindTracesSuccess) GetTraces() []*jaeger_api_v2.Trace { if m != nil { @@ -752,7 +772,7 @@ type FindTracesResponse struct { func (m *FindTracesResponse) Reset() { *m = FindTracesResponse{} } func (m *FindTracesResponse) String() string { return proto1.CompactTextString(m) } func (*FindTracesResponse) ProtoMessage() {} -func (*FindTracesResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{13} } +func (*FindTracesResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{14} } type isFindTracesResponse_Response interface { isFindTracesResponse_Response() @@ -865,13 +885,168 @@ func _FindTracesResponse_OneofSizer(msg proto1.Message) (n int) { return n } +type FindTraceIDsRequest struct { + Query *TraceQueryParameters `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"` +} + +func (m *FindTraceIDsRequest) Reset() { *m = FindTraceIDsRequest{} } +func (m *FindTraceIDsRequest) String() string { return proto1.CompactTextString(m) } +func (*FindTraceIDsRequest) ProtoMessage() {} +func (*FindTraceIDsRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{15} } + +func (m *FindTraceIDsRequest) GetQuery() *TraceQueryParameters { + if m != nil { + return m.Query + } + return nil +} + +type FindTraceIDsSuccess struct { + TraceIDs []jaeger_api_v2.TraceID `protobuf:"bytes,1,rep,name=traceIDs" json:"traceIDs"` +} + +func (m *FindTraceIDsSuccess) Reset() { *m = FindTraceIDsSuccess{} } +func (m *FindTraceIDsSuccess) String() string { return proto1.CompactTextString(m) } +func (*FindTraceIDsSuccess) ProtoMessage() {} +func (*FindTraceIDsSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{16} } + +func (m *FindTraceIDsSuccess) GetTraceIDs() []jaeger_api_v2.TraceID { + if m != nil { + return m.TraceIDs + } + return nil +} + +type FindTraceIDsResponse struct { + // Types that are valid to be assigned to Response: + // *FindTraceIDsResponse_Success + // *FindTraceIDsResponse_Error + Response isFindTraceIDsResponse_Response `protobuf_oneof:"response"` +} + +func (m *FindTraceIDsResponse) Reset() { *m = FindTraceIDsResponse{} } +func (m *FindTraceIDsResponse) String() string { return proto1.CompactTextString(m) } +func (*FindTraceIDsResponse) ProtoMessage() {} +func (*FindTraceIDsResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{17} } + +type isFindTraceIDsResponse_Response interface { + isFindTraceIDsResponse_Response() + MarshalTo([]byte) (int, error) + Size() int +} + +type FindTraceIDsResponse_Success struct { + Success *FindTraceIDsSuccess `protobuf:"bytes,1,opt,name=success,oneof"` +} +type FindTraceIDsResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*FindTraceIDsResponse_Success) isFindTraceIDsResponse_Response() {} +func (*FindTraceIDsResponse_Error) isFindTraceIDsResponse_Response() {} + +func (m *FindTraceIDsResponse) GetResponse() isFindTraceIDsResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *FindTraceIDsResponse) GetSuccess() *FindTraceIDsSuccess { + if x, ok := m.GetResponse().(*FindTraceIDsResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *FindTraceIDsResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*FindTraceIDsResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*FindTraceIDsResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _FindTraceIDsResponse_OneofMarshaler, _FindTraceIDsResponse_OneofUnmarshaler, _FindTraceIDsResponse_OneofSizer, []interface{}{ + (*FindTraceIDsResponse_Success)(nil), + (*FindTraceIDsResponse_Error)(nil), + } +} + +func _FindTraceIDsResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*FindTraceIDsResponse) + // response + switch x := m.Response.(type) { + case *FindTraceIDsResponse_Success: + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *FindTraceIDsResponse_Error: + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("FindTraceIDsResponse.Response has unexpected type %T", x) + } + return nil +} + +func _FindTraceIDsResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*FindTraceIDsResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(FindTraceIDsSuccess) + err := b.DecodeMessage(msg) + m.Response = &FindTraceIDsResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &FindTraceIDsResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _FindTraceIDsResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*FindTraceIDsResponse) + // response + switch x := m.Response.(type) { + case *FindTraceIDsResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *FindTraceIDsResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + type EmptyResponse struct { } func (m *EmptyResponse) Reset() { *m = EmptyResponse{} } func (m *EmptyResponse) String() string { return proto1.CompactTextString(m) } func (*EmptyResponse) ProtoMessage() {} -func (*EmptyResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{14} } +func (*EmptyResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{18} } type StoragePluginError struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` @@ -880,7 +1055,7 @@ type StoragePluginError struct { func (m *StoragePluginError) Reset() { *m = StoragePluginError{} } func (m *StoragePluginError) String() string { return proto1.CompactTextString(m) } func (*StoragePluginError) ProtoMessage() {} -func (*StoragePluginError) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{15} } +func (*StoragePluginError) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{19} } func (m *StoragePluginError) GetMessage() string { if m != nil { @@ -912,12 +1087,20 @@ func init() { golang_proto.RegisterType((*GetOperationsSuccess)(nil), "jaeger.api_v2.GetOperationsSuccess") proto1.RegisterType((*GetOperationsResponse)(nil), "jaeger.api_v2.GetOperationsResponse") golang_proto.RegisterType((*GetOperationsResponse)(nil), "jaeger.api_v2.GetOperationsResponse") + proto1.RegisterType((*TraceQueryParameters)(nil), "jaeger.api_v2.TraceQueryParameters") + golang_proto.RegisterType((*TraceQueryParameters)(nil), "jaeger.api_v2.TraceQueryParameters") proto1.RegisterType((*FindTracesRequest)(nil), "jaeger.api_v2.FindTracesRequest") golang_proto.RegisterType((*FindTracesRequest)(nil), "jaeger.api_v2.FindTracesRequest") proto1.RegisterType((*FindTracesSuccess)(nil), "jaeger.api_v2.FindTracesSuccess") golang_proto.RegisterType((*FindTracesSuccess)(nil), "jaeger.api_v2.FindTracesSuccess") proto1.RegisterType((*FindTracesResponse)(nil), "jaeger.api_v2.FindTracesResponse") golang_proto.RegisterType((*FindTracesResponse)(nil), "jaeger.api_v2.FindTracesResponse") + proto1.RegisterType((*FindTraceIDsRequest)(nil), "jaeger.api_v2.FindTraceIDsRequest") + golang_proto.RegisterType((*FindTraceIDsRequest)(nil), "jaeger.api_v2.FindTraceIDsRequest") + proto1.RegisterType((*FindTraceIDsSuccess)(nil), "jaeger.api_v2.FindTraceIDsSuccess") + golang_proto.RegisterType((*FindTraceIDsSuccess)(nil), "jaeger.api_v2.FindTraceIDsSuccess") + proto1.RegisterType((*FindTraceIDsResponse)(nil), "jaeger.api_v2.FindTraceIDsResponse") + golang_proto.RegisterType((*FindTraceIDsResponse)(nil), "jaeger.api_v2.FindTraceIDsResponse") proto1.RegisterType((*EmptyResponse)(nil), "jaeger.api_v2.EmptyResponse") golang_proto.RegisterType((*EmptyResponse)(nil), "jaeger.api_v2.EmptyResponse") proto1.RegisterType((*StoragePluginError)(nil), "jaeger.api_v2.StoragePluginError") @@ -942,6 +1125,7 @@ type StoragePluginClient interface { 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) (*FindTracesResponse, error) + FindTraceIDs(ctx context.Context, in *FindTraceIDsRequest, opts ...grpc.CallOption) (*FindTraceIDsResponse, error) } type storagePluginClient struct { @@ -997,6 +1181,15 @@ func (c *storagePluginClient) FindTraces(ctx context.Context, in *FindTracesRequ return out, nil } +func (c *storagePluginClient) FindTraceIDs(ctx context.Context, in *FindTraceIDsRequest, opts ...grpc.CallOption) (*FindTraceIDsResponse, error) { + out := new(FindTraceIDsResponse) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/FindTraceIDs", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // Server API for StoragePlugin service type StoragePluginServer interface { @@ -1007,6 +1200,7 @@ type StoragePluginServer interface { GetServices(context.Context, *GetServicesRequest) (*GetServicesResponse, error) GetOperations(context.Context, *GetOperationsRequest) (*GetOperationsResponse, error) FindTraces(context.Context, *FindTracesRequest) (*FindTracesResponse, error) + FindTraceIDs(context.Context, *FindTraceIDsRequest) (*FindTraceIDsResponse, error) } func RegisterStoragePluginServer(s *grpc.Server, srv StoragePluginServer) { @@ -1103,6 +1297,24 @@ func _StoragePlugin_FindTraces_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _StoragePlugin_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.(StoragePluginServer).FindTraceIDs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.StoragePlugin/FindTraceIDs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).FindTraceIDs(ctx, req.(*FindTraceIDsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _StoragePlugin_serviceDesc = grpc.ServiceDesc{ ServiceName: "jaeger.api_v2.StoragePlugin", HandlerType: (*StoragePluginServer)(nil), @@ -1127,6 +1339,10 @@ var _StoragePlugin_serviceDesc = grpc.ServiceDesc{ MethodName: "FindTraces", Handler: _StoragePlugin_FindTraces_Handler, }, + { + MethodName: "FindTraceIDs", + Handler: _StoragePlugin_FindTraceIDs_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "storage.proto", @@ -1534,7 +1750,7 @@ func (m *GetOperationsResponse_Error) MarshalTo(dAtA []byte) (int, error) { } return i, nil } -func (m *FindTracesRequest) Marshal() (dAtA []byte, err error) { +func (m *TraceQueryParameters) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1544,7 +1760,7 @@ func (m *FindTracesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FindTracesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *TraceQueryParameters) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1618,6 +1834,34 @@ func (m *FindTracesRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *FindTracesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FindTracesRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Query != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Query.Size())) + n20, err := m.Query.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + return i, nil +} + func (m *FindTracesSuccess) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1664,11 +1908,11 @@ func (m *FindTracesResponse) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if m.Response != nil { - nn20, err := m.Response.MarshalTo(dAtA[i:]) + nn21, err := m.Response.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn20 + i += nn21 } return i, nil } @@ -1679,11 +1923,11 @@ func (m *FindTracesResponse_Success) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) - n21, err := m.Success.MarshalTo(dAtA[i:]) + n22, err := m.Success.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n22 } return i, nil } @@ -1693,15 +1937,15 @@ func (m *FindTracesResponse_Error) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) - n22, err := m.Error.MarshalTo(dAtA[i:]) + n23, err := m.Error.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n22 + i += n23 } return i, nil } -func (m *EmptyResponse) Marshal() (dAtA []byte, err error) { +func (m *FindTraceIDsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1711,15 +1955,25 @@ func (m *EmptyResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EmptyResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *FindTraceIDsRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l + if m.Query != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Query.Size())) + n24, err := m.Query.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n24 + } return i, nil } -func (m *StoragePluginError) Marshal() (dAtA []byte, err error) { +func (m *FindTraceIDsSuccess) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1729,72 +1983,173 @@ func (m *StoragePluginError) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StoragePluginError) MarshalTo(dAtA []byte) (int, error) { +func (m *FindTraceIDsSuccess) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.Message) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintStorage(dAtA, i, uint64(len(m.Message))) - i += copy(dAtA[i:], m.Message) + if len(m.TraceIDs) > 0 { + for _, msg := range m.TraceIDs { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } return i, nil } -func encodeVarintStorage(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *WriteSpanRequest) Size() (n int) { - var l int - _ = l - if m.Span != nil { - l = m.Span.Size() - n += 1 + l + sovStorage(uint64(l)) +func (m *FindTraceIDsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *WriteSpanResponse) Size() (n int) { +func (m *FindTraceIDsResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i var l int _ = l if m.Response != nil { - n += m.Response.Size() + nn25, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn25 } - return n + return i, nil } -func (m *WriteSpanResponse_Success) Size() (n int) { - var l int - _ = l +func (m *FindTraceIDsResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 if m.Success != nil { - l = m.Success.Size() - n += 1 + l + sovStorage(uint64(l)) + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n26, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n26 } - return n + return i, nil } -func (m *WriteSpanResponse_Error) Size() (n int) { - var l int - _ = l +func (m *FindTraceIDsResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 if m.Error != nil { - l = m.Error.Size() - n += 1 + l + sovStorage(uint64(l)) + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n27, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 } - return n -} -func (m *GetTraceRequest) Size() (n int) { - var l int - _ = l - l = m.TraceID.Size() - n += 1 + l + sovStorage(uint64(l)) - return n + return i, nil +} +func (m *EmptyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EmptyResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *StoragePluginError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoragePluginError) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Message) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(m.Message))) + i += copy(dAtA[i:], m.Message) + } + return i, nil +} + +func encodeVarintStorage(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *WriteSpanRequest) Size() (n int) { + var l int + _ = l + if m.Span != nil { + l = m.Span.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + +func (m *WriteSpanResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *WriteSpanResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *WriteSpanResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetTraceRequest) Size() (n int) { + var l int + _ = l + l = m.TraceID.Size() + n += 1 + l + sovStorage(uint64(l)) + return n } func (m *GetTraceSuccess) Size() (n int) { @@ -1928,7 +2283,7 @@ func (m *GetOperationsResponse_Error) Size() (n int) { } return n } -func (m *FindTracesRequest) Size() (n int) { +func (m *TraceQueryParameters) Size() (n int) { var l int _ = l l = len(m.ServiceName) @@ -1961,6 +2316,16 @@ func (m *FindTracesRequest) Size() (n int) { return n } +func (m *FindTracesRequest) Size() (n int) { + var l int + _ = l + if m.Query != nil { + l = m.Query.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + func (m *FindTracesSuccess) Size() (n int) { var l int _ = l @@ -2000,6 +2365,55 @@ func (m *FindTracesResponse_Error) Size() (n int) { } return n } +func (m *FindTraceIDsRequest) Size() (n int) { + var l int + _ = l + if m.Query != nil { + l = m.Query.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + +func (m *FindTraceIDsSuccess) Size() (n int) { + var l int + _ = l + if len(m.TraceIDs) > 0 { + for _, e := range m.TraceIDs { + l = e.Size() + n += 1 + l + sovStorage(uint64(l)) + } + } + return n +} + +func (m *FindTraceIDsResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *FindTraceIDsResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *FindTraceIDsResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} func (m *EmptyResponse) Size() (n int) { var l int _ = l @@ -3018,7 +3432,7 @@ func (m *GetOperationsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *FindTracesRequest) Unmarshal(dAtA []byte) error { +func (m *TraceQueryParameters) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3041,10 +3455,10 @@ 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: TraceQueryParameters: 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: TraceQueryParameters: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3383,6 +3797,89 @@ func (m *FindTracesRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *FindTracesRequest) 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: FindTracesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + 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 Query", 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 > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &TraceQueryParameters{} + } + if err := m.Query.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 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *FindTracesSuccess) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3578,6 +4075,284 @@ func (m *FindTracesResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *FindTraceIDsRequest) 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: FindTraceIDsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + 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 Query", 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 > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &TraceQueryParameters{} + } + if err := m.Query.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 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FindTraceIDsSuccess) 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: FindTraceIDsSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FindTraceIDsSuccess: 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) + } + 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 > l { + return io.ErrUnexpectedEOF + } + m.TraceIDs = append(m.TraceIDs, jaeger_api_v2.TraceID{}) + if err := m.TraceIDs[len(m.TraceIDs)-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 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FindTraceIDsResponse) 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: FindTraceIDsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + 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 Success", 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 > l { + return io.ErrUnexpectedEOF + } + v := &FindTraceIDsSuccess{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &FindTraceIDsResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", 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 > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &FindTraceIDsResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *EmptyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3816,57 +4591,64 @@ func init() { proto1.RegisterFile("storage.proto", fileDescriptorStorage) } func init() { golang_proto.RegisterFile("storage.proto", fileDescriptorStorage) } var fileDescriptorStorage = []byte{ - // 827 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xdd, 0x6e, 0x23, 0x35, - 0x14, 0xae, 0x9b, 0xa4, 0x49, 0x4e, 0x9a, 0x6d, 0xd7, 0x1b, 0x60, 0x88, 0x20, 0x3f, 0x03, 0x88, - 0x68, 0x85, 0xa6, 0xab, 0x20, 0xc1, 0xb2, 0x50, 0x10, 0x51, 0x7f, 0x41, 0x14, 0x98, 0x06, 0x21, - 0xf5, 0x26, 0x32, 0x89, 0x19, 0x0d, 0x64, 0x7e, 0x18, 0x7b, 0xaa, 0xf4, 0x2d, 0xb8, 0x00, 0x09, - 0x84, 0x10, 0xcf, 0xc0, 0x1b, 0x70, 0xd9, 0x4b, 0x9e, 0xa0, 0xa0, 0xf0, 0x22, 0x68, 0x3c, 0xf6, - 0x34, 0x71, 0x9a, 0xac, 0x54, 0x29, 0x57, 0x89, 0xed, 0xef, 0x7c, 0xe7, 0x9c, 0x6f, 0x8e, 0x3f, - 0x43, 0x95, 0xf1, 0x20, 0x22, 0x0e, 0xb5, 0xc2, 0x28, 0xe0, 0x01, 0xae, 0x7e, 0x47, 0xa8, 0x43, - 0x23, 0x8b, 0x84, 0xee, 0xe0, 0xb2, 0x5b, 0xaf, 0x39, 0x81, 0x13, 0x88, 0x93, 0xbd, 0xe4, 0x5f, - 0x0a, 0xaa, 0x57, 0xbc, 0x60, 0x44, 0xc7, 0x72, 0xd1, 0x74, 0x82, 0xc0, 0x19, 0xd3, 0x3d, 0xb1, - 0xfa, 0x26, 0xfe, 0x76, 0x8f, 0xbb, 0x1e, 0x65, 0x9c, 0x78, 0xa1, 0x04, 0x34, 0x74, 0xc0, 0x28, - 0x8e, 0x08, 0x77, 0x03, 0x3f, 0x3d, 0x37, 0xdf, 0x87, 0xdd, 0xaf, 0x23, 0x97, 0xd3, 0xf3, 0x90, - 0xf8, 0x36, 0xfd, 0x21, 0xa6, 0x8c, 0xe3, 0x37, 0x21, 0xcf, 0x42, 0xe2, 0x1b, 0xa8, 0x85, 0x3a, - 0x95, 0xee, 0x23, 0x6b, 0xae, 0x2a, 0x4b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25, 0x59, 0x1f, 0x2a, 0x33, 0x16, 0x8b, 0x57, 0xd8, - 0xaf, 0xa2, 0x34, 0x57, 0x41, 0x24, 0xeb, 0x05, 0x54, 0xe7, 0xec, 0x0a, 0xaf, 0x34, 0x33, 0xc5, - 0xfc, 0xfa, 0x6a, 0x90, 0xe4, 0xfe, 0x12, 0xe0, 0x76, 0x10, 0x70, 0xeb, 0x79, 0x06, 0x52, 0x6f, - 0xaf, 0x40, 0xa4, 0x94, 0xbd, 0x97, 0xae, 0xa7, 0x0d, 0xf4, 0xf7, 0xb4, 0x81, 0xfe, 0x9d, 0x36, - 0xd0, 0x5f, 0xff, 0x35, 0xd0, 0x45, 0x21, 0xbd, 0x67, 0x5b, 0xe2, 0xe7, 0xed, 0xff, 0x03, 0x00, - 0x00, 0xff, 0xff, 0x2d, 0x89, 0x27, 0xb7, 0x8b, 0x09, 0x00, 0x00, + // 929 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x24, 0x76, 0x6c, 0x3f, 0xc7, 0x4d, 0x3a, 0x31, 0xb0, 0x58, 0x60, 0x3b, 0x53, 0x10, + 0x11, 0x82, 0x4d, 0x15, 0x24, 0x48, 0x0b, 0x05, 0xd5, 0x4a, 0x9a, 0x06, 0x44, 0x9a, 0x6e, 0x82, + 0x2a, 0xf5, 0x62, 0x0d, 0xf1, 0xb0, 0x5a, 0xc8, 0xee, 0xba, 0x33, 0xb3, 0x51, 0xf2, 0x15, 0x38, + 0x71, 0x00, 0x09, 0x84, 0x10, 0x07, 0xbe, 0x08, 0xc7, 0x1e, 0xf9, 0x04, 0x05, 0x85, 0x2f, 0x82, + 0x76, 0x76, 0x66, 0xe3, 0x1d, 0xff, 0x39, 0x54, 0xf8, 0x64, 0xcf, 0xcc, 0xef, 0xfd, 0xde, 0x7b, + 0xbf, 0x99,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0xad, 0x33, 0xf5, 0x5c, 0x93, 0x9d, + 0x40, 0x7d, 0x64, 0xf6, 0xe1, 0x19, 0x73, 0xd1, 0x50, 0x92, 0x59, 0x10, 0xcd, 0xfa, 0x14, 0x1a, + 0x85, 0x39, 0x82, 0x67, 0x4e, 0x19, 0xc3, 0xfc, 0xd6, 0x6c, 0x90, 0xe6, 0x7e, 0x0c, 0x70, 0x5d, + 0x4b, 0x78, 0x7a, 0x99, 0x19, 0xd6, 0x8d, 0x19, 0x08, 0x4d, 0xf9, 0x04, 0x56, 0x46, 0x5f, 0x17, + 0x9e, 0xf5, 0xf4, 0x0c, 0xed, 0xad, 0x99, 0x98, 0x8c, 0xb8, 0xf7, 0xda, 0xf3, 0xab, 0x36, 0xfa, + 0xeb, 0xaa, 0x8d, 0xfe, 0xb9, 0x6a, 0xa3, 0x3f, 0xff, 0x6d, 0xa3, 0xa7, 0xe5, 0xac, 0xa7, 0x2e, + 0xab, 0x9f, 0x0f, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xb0, 0xc7, 0xcc, 0xe9, 0x7d, 0x0b, 0x00, + 0x00, } diff --git a/plugin/storage/grpc/proto/storage.proto b/plugin/storage/grpc/proto/storage.proto index 820dc4bfba9..45a1086d39c 100644 --- a/plugin/storage/grpc/proto/storage.proto +++ b/plugin/storage/grpc/proto/storage.proto @@ -140,29 +140,33 @@ message GetOperationsResponse { } } -message FindTracesRequest { +message TraceQueryParameters { string service_name = 1; string operation_name = 2; map tags = 3; google.protobuf.Timestamp start_time_min = 4 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false ]; google.protobuf.Timestamp start_time_max = 5 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false ]; google.protobuf.Duration duration_min = 6 [ - (gogoproto.stdduration) = true, - (gogoproto.nullable) = false + (gogoproto.stdduration) = true, + (gogoproto.nullable) = false ]; google.protobuf.Duration duration_max = 7 [ - (gogoproto.stdduration) = true, - (gogoproto.nullable) = false + (gogoproto.stdduration) = true, + (gogoproto.nullable) = false ]; int32 num_traces = 8; } +message FindTracesRequest { + TraceQueryParameters query = 1; +} + message FindTracesSuccess { repeated Trace traces = 1; } @@ -174,6 +178,23 @@ message FindTracesResponse { } } +message FindTraceIDsRequest { + TraceQueryParameters query = 1; +} + +message FindTraceIDsSuccess { + repeated TraceID traceIDs = 1 [ + (gogoproto.nullable) = false + ]; +} + +message FindTraceIDsResponse { + oneof response { + FindTraceIDsSuccess success = 1; + StoragePluginError error = 2; + } +} + message EmptyResponse { } @@ -204,4 +225,5 @@ service StoragePlugin { rpc GetServices(GetServicesRequest) returns (GetServicesResponse); rpc GetOperations(GetOperationsRequest) returns (GetOperationsResponse); rpc FindTraces(FindTracesRequest) returns (FindTracesResponse); + rpc FindTraceIDs(FindTraceIDsRequest) returns (FindTraceIDsResponse); } \ No newline at end of file diff --git a/plugin/storage/grpc/shared/grpc.go b/plugin/storage/grpc/shared/grpc.go index f937c36e47c..6a7cd74786a 100644 --- a/plugin/storage/grpc/shared/grpc.go +++ b/plugin/storage/grpc/shared/grpc.go @@ -81,14 +81,16 @@ func (c *GRPCClient) GetOperations(ctx context.Context, service string) ([]strin func (c *GRPCClient) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error) { resp, err := c.client.FindTraces(context.Background(), &proto.FindTracesRequest{ - ServiceName: query.ServiceName, - OperationName: query.OperationName, - Tags: query.Tags, - StartTimeMin: query.StartTimeMin, - StartTimeMax: query.StartTimeMax, - DurationMin: query.DurationMin, - DurationMax: query.DurationMax, - NumTraces: int32(query.NumTraces), + Query: &proto.TraceQueryParameters{ + ServiceName: query.ServiceName, + OperationName: query.OperationName, + Tags: query.Tags, + StartTimeMin: query.StartTimeMin, + StartTimeMax: query.StartTimeMax, + DurationMin: query.DurationMin, + DurationMax: query.DurationMax, + NumTraces: int32(query.NumTraces), + }, }) if err != nil { return nil, fmt.Errorf("grpc error: %s", err) @@ -104,6 +106,33 @@ func (c *GRPCClient) FindTraces(ctx context.Context, query *spanstore.TraceQuery } } +func (c *GRPCClient) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error) { + resp, err := c.client.FindTraceIDs(context.Background(), &proto.FindTraceIDsRequest{ + Query: &proto.TraceQueryParameters{ + ServiceName: query.ServiceName, + OperationName: query.OperationName, + Tags: query.Tags, + StartTimeMin: query.StartTimeMin, + StartTimeMax: query.StartTimeMax, + DurationMin: query.DurationMin, + DurationMax: query.DurationMax, + NumTraces: int32(query.NumTraces), + }, + }) + if err != nil { + return nil, fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.FindTraceIDsResponse_Success: + return t.Success.TraceIDs, nil + case *proto.FindTraceIDsResponse_Error: + return nil, fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + func (c *GRPCClient) WriteSpan(span *model.Span) error { resp, err := c.client.WriteSpan(context.Background(), &proto.WriteSpanRequest{ Span: span, @@ -245,14 +274,14 @@ func (s *GRPCServer) GetOperations(ctx context.Context, r *proto.GetOperationsRe func (s *GRPCServer) FindTraces(ctx context.Context, r *proto.FindTracesRequest) (*proto.FindTracesResponse, error) { traces, err := s.Impl.FindTraces(ctx, &spanstore.TraceQueryParameters{ - ServiceName: r.ServiceName, - OperationName: r.OperationName, - Tags: r.Tags, - StartTimeMin: r.StartTimeMin, - StartTimeMax: r.StartTimeMax, - DurationMin: r.DurationMin, - DurationMax: r.DurationMax, - NumTraces: int(r.NumTraces), + ServiceName: r.Query.ServiceName, + OperationName: r.Query.OperationName, + Tags: r.Query.Tags, + StartTimeMin: r.Query.StartTimeMin, + StartTimeMax: r.Query.StartTimeMax, + DurationMin: r.Query.DurationMin, + DurationMax: r.Query.DurationMax, + NumTraces: int(r.Query.NumTraces), }) if err != nil { return &proto.FindTracesResponse{ @@ -271,3 +300,34 @@ func (s *GRPCServer) FindTraces(ctx context.Context, r *proto.FindTracesRequest) }, }, nil } + +func (s *GRPCServer) FindTraceIDs(ctx context.Context, r *proto.FindTraceIDsRequest) (*proto.FindTraceIDsResponse, error) { + traceIDs, err := s.Impl.FindTraceIDs(ctx, &spanstore.TraceQueryParameters{ + ServiceName: r.Query.ServiceName, + OperationName: r.Query.OperationName, + Tags: r.Query.Tags, + StartTimeMin: r.Query.StartTimeMin, + StartTimeMax: r.Query.StartTimeMax, + DurationMin: r.Query.DurationMin, + DurationMax: r.Query.DurationMax, + NumTraces: int(r.Query.NumTraces), + }) + if err != nil { + return &proto.FindTraceIDsResponse{ + Response: &proto.FindTraceIDsResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.FindTraceIDsResponse{ + Response: &proto.FindTraceIDsResponse_Success{ + Success: &proto.FindTraceIDsSuccess{ + TraceIDs: traceIDs, + }, + }, + }, nil +} + + From 00ffde5cef17e52957f6f9fbb1a0958ad6e6c00c Mon Sep 17 00:00:00 2001 From: Olivier Boucher Date: Thu, 13 Dec 2018 20:27:58 -0500 Subject: [PATCH 08/11] Fixed proto generation introduced when switching to Dep Changed json tags to match when TraceID was not a proto. Signed-off-by: Olivier Boucher proto fix --- Gopkg.lock | 320 ++++++++++++++++++++-------------------- Gopkg.toml | 14 ++ model/model.pb.go | 125 ++++++++-------- model/proto/model.proto | 8 +- 4 files changed, 243 insertions(+), 224 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 929251b41b2..a4cdf6e97a2 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,37 +2,37 @@ [[projects]] - digest = "1:d1665c44bd5db19aaee18d1b6233c99b0b9a986e8bccb24ef54747547a48027f" + digest = "1:d8ebbd207f3d3266d4423ce4860c9f3794956306ded6c7ba312ecc69cdfbf04c" name = "github.com/PuerkitoBio/purell" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4" version = "v1.1.0" [[projects]] branch = "master" - digest = "1:c739832d67eb1e9cc478a19cc1a1ccd78df0397bf8a32978b759152e205f644b" + digest = "1:8098cd40cd09879efbf12e33bcd51ead4a66006ac802cd563a66c4f3373b9727" name = "github.com/PuerkitoBio/urlesc" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "de5bf2ad457846296e2031421a34e2568e304e35" [[projects]] - digest = "1:64982d65e04905ce370e2e59dcf38c68c2c26fe6b7e550a6e4f7e05196d42803" + digest = "1:90a8a2a653a9b8d07a1e095a6dda29d6d8917014b44726f2aab487937e04a73b" name = "github.com/Shopify/sarama" packages = [ ".", "mocks", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "f7be6aa2bc7b2e38edf816b08b582782194a1c02" version = "v1.16.0" [[projects]] - digest = "1:8515c0ca4381246cf332cee05fc84070bbbb07bd679b639161506ba532f47128" + digest = "1:bad93311d7294e3916fd50a744e5185afcbe64716dde7734353ed0ccf96b6f14" name = "github.com/VividCortex/gohistogram" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "51564d9861991fb0ad0f531c99ef602d0f9866e6" version = "v1.0.0" @@ -40,107 +40,107 @@ digest = "1:f563c51359f64bc448d47183c7a3959f4e76c3bfc7dd040e2dfa84ec124c38fe" name = "github.com/apache/thrift" packages = ["lib/go/thrift"] - pruneopts = "UT" + pruneopts = "NUT" revision = "53dd39833a08ce33582e5ff31fa18bb4735d6731" version = "0.9.3" [[projects]] - digest = "1:320e7ead93de9fd2b0e59b50fd92a4d50c1f8ab455d96bc2eb083267453a9709" + digest = "1:5a23cd3a5496a0b2da7e3b348d14e77b11a210738c398200d7d6f04ea8cf3bd8" name = "github.com/asaskevich/govalidator" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "ccb8e960c48f04d6935e72476ae4a51028f9e22f" version = "v9" [[projects]] branch = "master" - digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d" + digest = "1:707ebe952a8b3d00b343c01536c79c73771d100f63ec6babeaed5c79e2b8a8dd" name = "github.com/beorn7/perks" packages = ["quantile"] - pruneopts = "UT" + pruneopts = "NUT" revision = "3a771d992973f24aa725d07868b467d1ddfceafb" [[projects]] - digest = "1:4fdffd1724c105db8c394019cfc2444fd23466be04812850506437361ee5de55" + digest = "1:4fb088ed7f384178cfc4552661e280a12ccc93be7f30a1ca994958a61a8e1d13" name = "github.com/bsm/sarama-cluster" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "cf455bc755fe41ac9bb2861e7a961833d9c2ecc3" version = "v2.1.13" [[projects]] branch = "master" - digest = "1:4c4c33075b704791d6a7f09dfb55c66769e8a1dc6adf87026292d274fe8ad113" + digest = "1:8ecb89af7dfe3ac401bdb0c9390b134ef96a97e85f732d2b0604fb7b3977839f" name = "github.com/codahale/hdrhistogram" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "3a0bb77429bd3a61596f5e8a3172445844342120" [[projects]] branch = "master" - digest = "1:a382acd6150713655ded76ab5fbcbc7924a7808dab4312dda5d1f23dd8ce5277" + digest = "1:b0adc37330921aa4e756b811d1c99cd6ee2a45a8753bf835cfd7527647500571" name = "github.com/crossdock/crossdock-go" packages = [ ".", "assert", "require", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "049aabb0122b03bc9bd30cab8f3f91fb60166361" [[projects]] digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" name = "github.com/davecgh/go-spew" packages = ["spew"] - pruneopts = "UT" + pruneopts = "NUT" revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" version = "v1.1.1" [[projects]] - digest = "1:1f0c7ab489b407a7f8f9ad16c25a504d28ab461517a971d341388a56156c1bd7" + digest = "1:08143362be979b087c2c1bae5dde986e988d3d5d4dc661727cbe436411b3f33a" name = "github.com/eapache/go-resiliency" packages = ["breaker"] - pruneopts = "UT" + pruneopts = "NUT" revision = "ea41b0fad31007accc7f806884dcdf3da98b79ce" version = "v1.1.0" [[projects]] branch = "master" - digest = "1:79f16588b5576b1b3cd90e48d2374cc9a1a8776862d28d8fd0f23b0e15534967" + digest = "1:d3430c048e919ed27813d20dc65a32d4e3bae3ad05b83700e244a81eaaf48e2a" name = "github.com/eapache/go-xerial-snappy" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "776d5712da21bc4762676d614db1d8a64f4238b0" [[projects]] - digest = "1:444b82bfe35c83bbcaf84e310fb81a1f9ece03edfed586483c869e2c046aef69" + digest = "1:0d36a2b325b9e75f8057f7f9fbe778d348d70ba652cb9335485b69d1a5c4e038" name = "github.com/eapache/queue" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "44cc805cf13205b55f69e14bcb69867d1ae92f98" version = "v1.1.0" [[projects]] - digest = "1:abeb38ade3f32a92943e5be54f55ed6d6e3b6602761d74b4aab4c9dd45c18abd" + digest = "1:1b91ae0dc69a41d4c2ed23ea5cffb721ea63f5037ca4b81e6d6771fbb8f45129" name = "github.com/fsnotify/fsnotify" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9" version = "v1.4.7" [[projects]] branch = "master" - digest = "1:7fb51688eadf38272411852d7a2b3538c7caff53309abee6c0964a83c00fe69e" + digest = "1:ce0cdcf4a121add67d3c6f7cc08e6233275d0f417852f025b790d35da88fab10" name = "github.com/globalsign/mgo" packages = [ "bson", "internal/json", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "eeefdecb41b842af6dc652aaea4026e8403e62df" [[projects]] - digest = "1:c598a8cefc266a1a0dae50314298326532768ab07b9e6a1b0cd4b26c5a9cf299" + digest = "1:ad610d570a66a738adba29e579d801a8b9825b55bfb10a67b3c80da2e28e48cf" name = "github.com/go-kit/kit" packages = [ "metrics", @@ -148,55 +148,55 @@ "metrics/generic", "metrics/internal/lv", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "a9ca6725cbbea455e61c6bc8a1ed28e81eb3493b" version = "v0.5.0" [[projects]] - digest = "1:c49164b7b1e34324258ae61deef2cba7912005ba9cb7a9ee4930fe6bdfec7b5d" + digest = "1:da40b9e5973892e2bd37a72c36464b8252a4034522925d920983edaabda03693" name = "github.com/go-openapi/analysis" packages = [ ".", "internal", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "c701774f4e604d952e4e8c56dee260be696e33c3" version = "v0.17.2" [[projects]] - digest = "1:ac4b35a4bba11edb2110fca0707bae03ae92fbd8222e6b483465d98efaabfb97" + digest = "1:02356188d2100454319fc9f17e956bf6db7abd0fd66fef602ffa17d7ceb2808b" name = "github.com/go-openapi/errors" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "d9664f9fab8994271e573ed69cf2adfc09b7a800" version = "v0.17.2" [[projects]] - digest = "1:953a2628e4c5c72856b53f5470ed5e071c55eccf943d798d42908102af2a610f" + digest = "1:260f7ebefc63024c8dfe2c9f1a2935a89fa4213637a1f522f592f80c001cc441" name = "github.com/go-openapi/jsonpointer" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "ef5f0afec364d3b9396b7b77b43dbe26bf1f8004" version = "v0.17.2" [[projects]] - digest = "1:81210e0af657a0fb3638932ec68e645236bceefa4c839823db0c4d918f080895" + digest = "1:98abd61947ff5c7c6fcfec5473d02a4821ed3a2dd99a4fbfdb7925b0dd745546" name = "github.com/go-openapi/jsonreference" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "8483a886a90412cd6858df4ea3483dce9c8e35a3" version = "v0.17.2" [[projects]] - digest = "1:ff04019588fc028ac28c3c565ce5316461a4641df197555041ee66cf45d213e3" + digest = "1:cc4186672d13bce6e14f7b39c6f51b2f8c5126532a020ced03841e7175886651" name = "github.com/go-openapi/loads" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "2a2b323bab96e6b1fdee110e57d959322446e9c9" version = "0.16.0" [[projects]] - digest = "1:47260ededff90d53b84a66578963639d7fd3e5a9cdc672dbcc7847af794339d2" + digest = "1:a630cba9cb07e32082bf314f5c13e5906cf557c04db3351aed7314255131616d" name = "github.com/go-openapi/runtime" packages = [ ".", @@ -207,45 +207,45 @@ "middleware/untyped", "security", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "231d7876b7019dbcbfc97a7ba764379497b67c1d" version = "v0.17.2" [[projects]] - digest = "1:394fed5c0425fe01da3a34078adaa1682e4deaea6e5d232dde25c4034004c151" + digest = "1:dfab391de021809e0041f0ab5648da6b74dd16a685472a1b8c3dc06b3dca1ee2" name = "github.com/go-openapi/spec" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "5bae59e25b21498baea7f9d46e9c147ec106a42e" version = "v0.17.2" [[projects]] - digest = "1:ffa79f4705a3a85f2412d2d163c37acdf60d128c679e641c323a5de712e23d27" + digest = "1:76667bb6bc2df5b95be9efb9ee0b72b3550c639f530232a0b8fcf3347035d987" name = "github.com/go-openapi/strfmt" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "edab9990ffc9b4a428f3306ecf4d18a069ca3317" version = "v0.17.2" [[projects]] - digest = "1:32f3d2e7f343de7263c550d696fb8a64d3c49d8df16b1ddfc8e80e1e4b3233ce" + digest = "1:983f95b2fae6fe8fdd361738325ed6090f4f3bd15ce4db745e899fb5b0fdfc46" name = "github.com/go-openapi/swag" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "5899d5c5e619fda5fa86e14795a835f473ca284c" version = "v0.17.2" [[projects]] - digest = "1:58541fddf3f4ec485710f1b346e7f647baf09a878a604e47e3668c600fe44076" + digest = "1:7d7626b94bc5e04d1c23eaa97816181f4ff6218540a6d43379070d6ece9ca467" name = "github.com/go-openapi/validate" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "d2eab7d93009e9215fc85b2faa2c2f2a98c2af48" version = "v0.17.2" [[projects]] branch = "master" - digest = "1:1a5f28249f1a5b118994359a1c7b8c53ee1ff47aa7fe65884fbd20cd237001f4" + digest = "1:c7981274f5866a0c444474d1eec4a2862fae27ad606fc3636c72542bd47ced6f" name = "github.com/gocql/gocql" packages = [ ".", @@ -253,19 +253,19 @@ "internal/murmur", "internal/streams", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "70385f88b28b43805bd83d212169ab2d38810b15" [[projects]] - digest = "1:38f3de2fa45b2e412a87b79d803fd1242f098b8add8c95cb8b25ecb53ad4c043" + digest = "1:54d5c6a784a9de9c836fc070d51d0689c3e99ee6d24dba8a36f0762039dae830" name = "github.com/gogo/googleapis" packages = ["google/api"] - pruneopts = "UT" + pruneopts = "T" revision = "8558fb44d2f1fc223118afc694129d2c2d2924d1" version = "v1.1.0" [[projects]] - digest = "1:35621fe20f140f05a0c4ef662c26c0ab4ee50bca78aa30fe87d33120bd28165e" + digest = "1:da39f4a22829ca95e63566208e0ea42d6f055f41dff1b14fdab88d88f62df653" name = "github.com/gogo/protobuf" packages = [ "gogoproto", @@ -275,12 +275,12 @@ "sortkeys", "types", ] - pruneopts = "UT" + pruneopts = "T" revision = "636bf0302bc95575d69441b25a2603156ffdddf1" version = "v1.1.1" [[projects]] - digest = "1:fa5e9e1af8a8645086811ec5ab003806026babc57c8bb3a6f7e1ab34b80e2ff1" + digest = "1:9b117ac202b9de210a7093bca0c29d0d2424e4c9235c9e025ae0d6ef6b121c82" name = "github.com/golang/protobuf" packages = [ "jsonpb", @@ -292,44 +292,44 @@ "ptypes/struct", "ptypes/timestamp", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" version = "v1.2.0" [[projects]] branch = "master" - digest = "1:4a0c6bb4805508a6287675fac876be2ac1182539ca8a32468d8128882e9d5009" + digest = "1:7f114b78210bf5b75f307fc97cff293633c835bab1e0ea8a744a44b39c042dfe" name = "github.com/golang/snappy" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "2e65f85255dbc3072edf28d6b5b8efc472979f5a" [[projects]] - digest = "1:c79fb010be38a59d657c48c6ba1d003a8aa651fa56b579d959d74573b7dff8e1" + digest = "1:c01767916c59f084bb7c41a7d5877c0f3099b1595cfa066e84ec6ad6b084dd89" name = "github.com/gorilla/context" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42" version = "v1.1.1" [[projects]] - digest = "1:bdde4c5680027035091a29ceef113a5fef59295682c97c29e5f673276e9a55d8" + digest = "1:ce99f0fa341de71caf89941d6c58e6b6473f841f590d5e3679eadf8c88e9ee56" name = "github.com/gorilla/handlers" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "3a5767ca75ece5f7f1440b1d16975247f8d8b221" version = "v1.2" [[projects]] - digest = "1:099bdd0a1b3a8f20c016e5e4c7c0eb717ec21fab7537633ce7088d7dece2dde6" + digest = "1:4f53b8f09786fc66f1c57754d6509cea6dd546167be9c881a9185af8895d71ae" name = "github.com/gorilla/mux" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "392c28fe23e1c45ddba891b0320b3b5df220beea" version = "v1.3.0" [[projects]] - digest = "1:d0f4b7935eec1d68994aaa55773fca3e5c1fdaa7898a45d966efde76f471156e" + digest = "1:c4a0b2286ccdfcb4575e19c2bab20d4972ba7fce2ed7cba0941c168708b96f54" name = "github.com/grpc-ecosystem/grpc-gateway" packages = [ "protoc-gen-swagger/options", @@ -337,39 +337,39 @@ "runtime/internal", "utilities", ] - pruneopts = "UT" + pruneopts = "T" revision = "aeab1d96e0f1368d243e2e5f526aa29d495517bb" version = "v1.5.1" [[projects]] branch = "master" - digest = "1:364b908b9b27b97ab838f2f6f1b1f46281fa29b978a037d72a9b1d4f6d940190" + digest = "1:414b0b85f897039eb35308a0f7f1beaf16c073cfdc6fccd325ddd8a7f7dca7a3" name = "github.com/hailocab/go-hostpool" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "e80d13ce29ede4452c43dea11e79b9bc8a15b478" [[projects]] branch = "master" - digest = "1:0876aeb6edb07e20b6b0ce1d346655cb63dbe0a26ccfb47b68a9b7697709777b" + digest = "1:26159b03ea04b155cb70d071c32bf599f0519548f8724be87df85fe8fd0a33a3" name = "github.com/hashicorp/go-hclog" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "61d530d6c27f994fb6c83b80f99a69c54125ec8a" [[projects]] branch = "master" - digest = "1:1f0c8665817a698bf12c6ad29922d6cdb85ecaa54dd404d77f91f58c6bccd84e" + digest = "1:8c38df748ea4cf82f8a5185eb3e6292a1047b76c90c8c8e8b924451e043ba7e4" name = "github.com/hashicorp/go-plugin" packages = [ ".", "internal/proto", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "f444068e8f5a19853177f7aa0aea7e7d95b5b528" [[projects]] - digest = "1:c0d19ab64b32ce9fe5cf4ddceba78d5bc9807f0016db6b1183599da3dcc24d10" + digest = "1:11c6c696067d3127ecf332b10f89394d386d9083f82baf71f40f2da31841a009" name = "github.com/hashicorp/hcl" packages = [ ".", @@ -383,47 +383,47 @@ "json/scanner", "json/token", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "8cb6e5b959231cc1119e43259c4a608f9c51a241" version = "v1.0.0" [[projects]] branch = "master" - digest = "1:a4826c308e84f5f161b90b54a814f0be7d112b80164b9b884698a6903ea47ab3" + digest = "1:8deb0c5545c824dfeb0ac77ab8eb67a3d541eab76df5c85ce93064ef02d44cd0" name = "github.com/hashicorp/yamux" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "2f1d1f20f75d5404f53b9edf6b53ed5505508675" [[projects]] - digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be" + digest = "1:406338ad39ab2e37b7f4452906442a3dbf0eb3379dd1f06aafb5c07e769a5fbb" name = "github.com/inconshreveable/mousetrap" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" version = "v1.0" [[projects]] - digest = "1:ca955a9cd5b50b0f43d2cc3aeb35c951473eeca41b34eb67507f1dbcc0542394" + digest = "1:7b21c7fc5551b46d1308b4ffa9e9e49b66c7a8b0ba88c0130474b0e7a20d859f" name = "github.com/kr/pretty" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "73f6ac0b30a98e433b289500d779f50c1a6f0712" version = "v0.1.0" [[projects]] - digest = "1:15b5cc79aad436d47019f814fde81a10221c740dc8ddf769221a65097fb6c2e9" + digest = "1:c3a7836b5904db0f8b609595b619916a6831cb35b8b714aec39f96d00c6155d8" name = "github.com/kr/text" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "e2ffdb16a802fe2bb95e2e35ff34f0e53aeef34f" version = "v0.1.0" [[projects]] - digest = "1:c568d7727aa262c32bdf8a3f7db83614f7af0ed661474b24588de635c20024c7" + digest = "1:d244f8666a838fe6ad70ec8fe77f50ebc29fdc3331a2729ba5886bef8435d10d" name = "github.com/magiconair/properties" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "c2353362d570a7bfa228149c62842019201cfb71" version = "v1.8.0" @@ -436,38 +436,38 @@ "jlexer", "jwriter", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "60711f1a8329503b04e1c88535f419d0bb440bff" [[projects]] - digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" + digest = "1:5985ef4caf91ece5d54817c11ea25f182697534f8ae6521eadcd628c142ac4b6" name = "github.com/matttproud/golang_protobuf_extensions" packages = ["pbutil"] - pruneopts = "UT" + pruneopts = "NUT" revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" version = "v1.0.1" [[projects]] - digest = "1:42eb1f52b84a06820cedc9baec2e710bfbda3ee6dac6cdb97f8b9a5066134ec6" + digest = "1:18b773b92ac82a451c1276bd2776c1e55ce057ee202691ab33c8d6690efcc048" name = "github.com/mitchellh/go-testing-interface" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "6d0b8010fcc857872e42fc6c931227569016843c" version = "v1.0.0" [[projects]] - digest = "1:53bc4cd4914cd7cd52139990d5170d6dc99067ae31c56530621b18b35fc30318" + digest = "1:a45ae66dea4c899d79fceb116accfa1892105c251f0dcd9a217ddc276b42ec68" name = "github.com/mitchellh/mapstructure" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "3536a929edddb9a5b34bd6861dc4a9647cb459fe" version = "v1.1.2" [[projects]] - digest = "1:9ec6cf1df5ad1d55cf41a43b6b1e7e118a91bade4f68ff4303379343e40c0e25" + digest = "1:3b517122f3aad1ecce45a630ea912b3092b4729f25532a911d0cb2935a1f9352" name = "github.com/oklog/run" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "4dadeb3030eda0273a12382bb2348ffc7c9d1a39" version = "v1.0.0" @@ -476,45 +476,45 @@ digest = "1:51fb21c0dd1b64d5ae74c34f544e312ee73edd2a258db6347369014b5949f44a" name = "github.com/opentracing-contrib/go-stdlib" packages = ["nethttp"] - pruneopts = "UT" + pruneopts = "NUT" revision = "c9628a4f0148d7e441a4af66dc0b1653cd941c20" [[projects]] - digest = "1:450b7623b185031f3a456801155c8320209f75d0d4c4e633c6b1e59d44d6e392" + digest = "1:7da29c22bcc5c2ffb308324377dc00b5084650348c2799e573ed226d8cc9faf0" name = "github.com/opentracing/opentracing-go" packages = [ ".", "ext", "log", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "1949ddbfd147afd4d964a9f00b24eb291e0e7c38" version = "v1.0.2" [[projects]] - digest = "1:95741de3af260a92cc5c7f3f3061e85273f5a81b5db20d4bd68da74bd521675e" + digest = "1:51ea800cff51752ff68e12e04106f5887b4daec6f9356721238c28019f0b42db" name = "github.com/pelletier/go-toml" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "c01d1270ff3e442a8a57cddc1c92dc1138598194" version = "v1.2.0" [[projects]] - digest = "1:e39a5ee8fcbec487f8fc68863ef95f2b025e0739b0e4aa55558a2b4cf8f0ecf0" + digest = "1:1d920dce8e11bfff65b5709e883a8ece131b63a5bc4b2cd404f9ef7eb445f73f" name = "github.com/pierrec/lz4" packages = [ ".", "internal/xxh32", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "635575b42742856941dbc767b44905bb9ba083f6" version = "v2.0.7" [[projects]] - digest = "1:40e195917a951a8bf867cd05de2a46aaf1806c50cf92eebf4c16f78cd196f747" + digest = "1:5cf3f025cbee5951a4ee961de067c8a89fc95a5adabead774f82822efabab121" name = "github.com/pkg/errors" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "645ef00459ed84a119197bfb8d8205042c6df63d" version = "v0.8.0" @@ -522,18 +522,18 @@ digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" name = "github.com/pmezard/go-difflib" packages = ["difflib"] - pruneopts = "UT" + pruneopts = "NUT" revision = "792786c7400a136282c1664665ae0a8db921c6c2" version = "v1.0.0" [[projects]] - digest = "1:d14a5f4bfecf017cb780bdde1b6483e5deb87e12c332544d2c430eda58734bcb" + digest = "1:03bca087b180bf24c4f9060775f137775550a0834e18f0bca0520a868679dbd7" name = "github.com/prometheus/client_golang" packages = [ "prometheus", "prometheus/promhttp", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "c5b7fccd204277076155f10851dad72b76a49317" version = "v0.8.0" @@ -542,24 +542,24 @@ digest = "1:2d5cd61daa5565187e1d96bae64dbbc6080dacf741448e9629c64fd93203b0d4" name = "github.com/prometheus/client_model" packages = ["go"] - pruneopts = "UT" + pruneopts = "NUT" revision = "5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f" [[projects]] branch = "master" - digest = "1:db712fde5d12d6cdbdf14b777f0c230f4ff5ab0be8e35b239fc319953ed577a4" + digest = "1:06375f3b602de9c99fa99b8484f0e949fd5273e6e9c6592b5a0dd4cd9085f3ea" name = "github.com/prometheus/common" packages = [ "expfmt", "internal/bitbucket.org/ww/goautoneg", "model", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "4724e9255275ce38f7179b2478abeae4e28c904f" [[projects]] branch = "master" - digest = "1:d39e7c7677b161c2dd4c635a2ac196460608c7d8ba5337cc8cae5825a2681f8f" + digest = "1:102dea0c03a915acfc634b7c67f2662012b5483b56d9025e33f5188e112759b6" name = "github.com/prometheus/procfs" packages = [ ".", @@ -567,86 +567,86 @@ "nfs", "xfs", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "1dc9a6cbc91aacc3e8b2d63db4d2e957a5394ac4" [[projects]] digest = "1:ea0700160aca4ef099f4e06686a665a87691f4248dddd40796925eda2e46bd64" name = "github.com/rakyll/statik" packages = ["fs"] - pruneopts = "UT" + pruneopts = "NUT" revision = "1355192d24db2566a83c3914e187e2a7e7679832" version = "v0.1.5" [[projects]] branch = "master" - digest = "1:d38f81081a389f1466ec98192cf9115a82158854d6f01e1c23e2e7554b97db71" + digest = "1:120b256a4d3cd2946ffa4b87102731c2f004aed6d836dc2fba400ed9398696e7" name = "github.com/rcrowley/go-metrics" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "3113b8401b8a98917cde58f8bbd42a1b1c03b1fd" [[projects]] - digest = "1:6a4a11ba764a56d2758899ec6f3848d24698d48442ebce85ee7a3f63284526cd" + digest = "1:330e9062b308ac597e28485699c02223bd052437a6eed32a173c9227dcb9d95a" name = "github.com/spf13/afero" packages = [ ".", "mem", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "d40851caa0d747393da1ffb28f7f9d8b4eeffebd" version = "v1.1.2" [[projects]] - digest = "1:08d65904057412fc0270fc4812a1c90c594186819243160dc779a402d4b6d0bc" + digest = "1:c5e6b121ef3d2043505edaf4c80e5a008cec2513dc8804795eb0479d1555bcf7" name = "github.com/spf13/cast" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "8c9545af88b134710ab1cd196795e7f2388358d7" version = "v1.3.0" [[projects]] - digest = "1:645cabccbb4fa8aab25a956cbcbdf6a6845ca736b2c64e197ca7cbb9d210b939" + digest = "1:343d44e06621142ab09ae0c76c1799104cdfddd3ffb445d78b1adf8dc3ffaf3d" name = "github.com/spf13/cobra" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385" version = "v0.0.3" [[projects]] - digest = "1:68ea4e23713989dc20b1bded5d9da2c5f9be14ff9885beef481848edd18c26cb" + digest = "1:f29f83301ed096daed24a90f4af591b7560cb14b9cc3e1827abbf04db7269ab5" name = "github.com/spf13/jwalterweatherman" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "4a4406e478ca629068e7768fc33f3f044173c0a6" version = "v1.0.0" [[projects]] - digest = "1:c1b1102241e7f645bc8e0c22ae352e8f0dc6484b6cb4d132fa9f24174e0119e2" + digest = "1:9d8420bbf131d1618bde6530af37c3799340d3762cc47210c1d9532a4c3a2779" name = "github.com/spf13/pflag" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "298182f68c66c05229eb03ac171abe6e309ee79a" version = "v1.0.3" [[projects]] - digest = "1:34c2a71c3317bd76711f66330d7846597bea8cd26c9df5bfd4603d156503e1bf" + digest = "1:d12d5b3af1a59b158e074068eccc0ded9b9c399091ebe0b70507b46a72a7fc77" name = "github.com/spf13/viper" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "41cd1c3aa32b2685fae6c296e6f044bc68922c0e" version = "v1.3.0" [[projects]] - digest = "1:ac83cf90d08b63ad5f7e020ef480d319ae890c208f8524622a2f3136e2686b02" + digest = "1:60a46e2410edbf02b419f833372dd1d24d7aa1b916a990a7370e792fada1eadd" name = "github.com/stretchr/objx" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "477a77ecc69700c7cdeb1fa9e129548e1c1c393c" version = "v0.1.1" [[projects]] - digest = "1:131cbf301e1846f83658887188efbf97a6331095f53588b60525667e40f28f4c" + digest = "1:8376c0ff082913a631477205de033ca20aeb502319a8a19b759a1867570184ac" name = "github.com/stretchr/testify" packages = [ "assert", @@ -654,20 +654,20 @@ "mock", "require", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71" version = "v1.2.1" [[projects]] - digest = "1:3c1a69cdae3501bf75e76d0d86dc6f2b0a7421bc205c0cb7b96b19eed464a34d" + digest = "1:22f696cee54865fb8e9ff91df7b633f6b8f22037a8015253c6b6a71ca82219c7" name = "github.com/uber-go/atomic" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "1ea20fb1cbb1cc08cbd0d913a96dead89aa18289" version = "v1.3.2" [[projects]] - digest = "1:473fbf1a56c0b116352cbaaa7e3b6d012fbfe5b00194341a8c3ffd1de5fb74ff" + digest = "1:3eb7e4307e197a995396634cc87870c2189aefec4e338a6c7ee74837f9d7fefe" name = "github.com/uber/jaeger-client-go" packages = [ ".", @@ -690,7 +690,7 @@ "transport/zipkin", "utils", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "1a782e2da844727691fef1757c72eb190c2909f0" version = "v2.15.0" @@ -706,12 +706,12 @@ "metrics/prometheus", "metrics/testutils", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "ed3a127ec5fef7ae9ea95b01b542c47fbd999ce5" version = "v1.5.0" [[projects]] - digest = "1:9c231161ce5a181c5782f73f443933b928b631d988f705dafc070f83aa79f4e9" + digest = "1:f7dcdb21001852b64f48eea1eda86e699eee381dbb168d61dfe6a2dd69465aab" name = "github.com/uber/tchannel-go" packages = [ ".", @@ -726,28 +726,28 @@ "trand", "typed", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "1a0e35378f6f721bc07f6c4466bc9701ed70b506" version = "v1.1.0" [[projects]] - digest = "1:3c1a69cdae3501bf75e76d0d86dc6f2b0a7421bc205c0cb7b96b19eed464a34d" + digest = "1:22f696cee54865fb8e9ff91df7b633f6b8f22037a8015253c6b6a71ca82219c7" name = "go.uber.org/atomic" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "1ea20fb1cbb1cc08cbd0d913a96dead89aa18289" version = "v1.3.2" [[projects]] - digest = "1:60bf2a5e347af463c42ed31a493d817f8a72f102543060ed992754e689805d1a" + digest = "1:58ca93bdf81bac106ded02226b5395a0595d5346cdc4caa8d9c1f3a5f8f9976e" name = "go.uber.org/multierr" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "3c4937480c32f4c13a875a1829af76c98ca3d40a" version = "v1.1.0" [[projects]] - digest = "1:29f5757129c68d0f5c3ee78bf7ff2967259c52798a494fea010b1bfa83324f92" + digest = "1:a739f2c8e7f5ea57038c4d0a60d209d828b0ef756a9e49c7e6849fe73ec97014" name = "go.uber.org/zap" packages = [ ".", @@ -760,13 +760,13 @@ "zaptest", "zaptest/observer", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "ff33455a0e382e8a81d14dd7c922020b6b5e7982" version = "v1.9.1" [[projects]] branch = "master" - digest = "1:29fe5460430a338b64f4a0259a6c59a1e2350bbcff54fa66f906fa8d10515c4d" + digest = "1:fe6c7d45580996cb78fa1e5eb1eadc9422c20ff0ca93a3862bd151f91ec6f240" name = "golang.org/x/net" packages = [ "context", @@ -778,19 +778,19 @@ "internal/timeseries", "trace", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "351d144fa1fc0bd934e2408202be0c29f25e35a0" [[projects]] branch = "master" - digest = "1:9399de11945e643d7131cf070736122b76800d92d57a80494bd9a4e73e6979f3" + digest = "1:ed2e112f90e562e29a28c19801e8306c83efc3dbd6be76d55bd767d152cb72b5" name = "golang.org/x/sys" packages = ["unix"] - pruneopts = "UT" + pruneopts = "NUT" revision = "70b957f3b65e069b4930ea94e2721eefa0f8f695" [[projects]] - digest = "1:0c56024909189aee3364b7f21a95a27459f718aa7c199a5c111c36cfffd9eaef" + digest = "1:e33513a825fcd765e97b5de639a2f7547542d1a8245df0cef18e1fd390b778a9" name = "golang.org/x/text" packages = [ "collate", @@ -809,7 +809,7 @@ "unicode/rangetable", "width", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" version = "v0.3.0" @@ -818,11 +818,11 @@ digest = "1:077c1c599507b3b3e9156d17d36e1e61928ee9b53a5b420f10f28ebd4a0b275c" name = "google.golang.org/genproto" packages = ["googleapis/rpc/status"] - pruneopts = "UT" + pruneopts = "NUT" revision = "bd91e49a0898e27abb88c339b432fa53d7497ac0" [[projects]] - digest = "1:63e4afbf415d15c3ef9a1fc5c749a0f6a381d6388eec233ed35c4c7b28898bc6" + digest = "1:cf02868d74414ddc47a8859b706e47e7641cdfced08f5a7c39c9369a08267246" name = "google.golang.org/grpc" packages = [ ".", @@ -853,7 +853,7 @@ "test/bufconn", "transport", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "afc05b9e1d36f289ea16ba294894486a3e458246" version = "v1.11.0" @@ -861,27 +861,27 @@ digest = "1:2d1fbdc6777e5408cabeb02bf336305e724b925ff4546ded0fa8715a7267922a" name = "gopkg.in/inf.v0" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "d2d2541c53f18d2a059457998ce2876cc8e67cbf" version = "v0.9.1" [[projects]] - digest = "1:6847cc3dadcf84c757776d3aee7d635eefb97830dcae5aa4ec9f912073e062ab" + digest = "1:be950f632c30e58eeaf02bafeae71770e1bd7f12270f048b247771a172a8586e" name = "gopkg.in/olivere/elastic.v5" packages = [ ".", "config", "uritemplates", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "171ce647da4acfb30ffc99981d66d80bdea6bcee" version = "v5.0.53" [[projects]] - digest = "1:73e6fda93622790d2371344759df06ff5ff2fac64a6b6e8832b792e7402956e7" + digest = "1:13e704c08924325be00f96e47e7efe0bfddf0913cdfc237423c83f9b183ff590" name = "gopkg.in/yaml.v2" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4" version = "v2.0.0" diff --git a/Gopkg.toml b/Gopkg.toml index 056dc1b6088..551dadb3223 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -116,3 +116,17 @@ [prune] go-tests = true unused-packages = true + non-go = true + + [[prune.project]] + name = "github.com/gogo/protobuf" + non-go = false + unused-packages = false + [[prune.project]] + name = "github.com/grpc-ecosystem/grpc-gateway" + non-go = false + unused-packages = false + [[prune.project]] + name = "github.com/gogo/googleapis" + non-go = false + unused-packages = false \ No newline at end of file diff --git a/model/model.pb.go b/model/model.pb.go index 2bb2c1c6232..5d8569a9380 100644 --- a/model/model.pb.go +++ b/model/model.pb.go @@ -315,8 +315,8 @@ func (m *Span) GetWarnings() []string { } type TraceID struct { - Low uint64 `protobuf:"varint,1,opt,name=low,proto3" json:"low,omitempty"` - High uint64 `protobuf:"varint,2,opt,name=high,proto3" json:"high,omitempty"` + Low uint64 `protobuf:"varint,1,opt,name=low,proto3" json:"lo"` + High uint64 `protobuf:"varint,2,opt,name=high,proto3" json:"hi"` } func (m *TraceID) Reset() { *m = TraceID{} } @@ -2749,64 +2749,65 @@ func init() { proto.RegisterFile("model.proto", fileDescriptorModel) } func init() { golang_proto.RegisterFile("model.proto", fileDescriptorModel) } var fileDescriptorModel = []byte{ - // 938 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x41, 0x8f, 0xdb, 0x44, - 0x14, 0xde, 0xd9, 0xd8, 0xb1, 0xf3, 0x92, 0x5d, 0x45, 0x53, 0xe8, 0xba, 0x01, 0x25, 0x21, 0x15, - 0x52, 0xa8, 0x4a, 0xd2, 0x86, 0x76, 0x0f, 0x08, 0x09, 0xd5, 0x5d, 0x02, 0x86, 0xec, 0x06, 0xcd, - 0x46, 0x20, 0xb8, 0x58, 0xb3, 0xc9, 0xc4, 0xeb, 0xe2, 0x78, 0x2c, 0xdb, 0xeb, 0x2a, 0x37, 0x7e, - 0x02, 0xe2, 0xc4, 0x11, 0xfe, 0x09, 0xe2, 0xd4, 0x23, 0x07, 0x4e, 0x1c, 0x16, 0x14, 0x2e, 0xfd, - 0x03, 0xdc, 0xd1, 0x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, 0x7d, 0x5c, - 0xdf, 0xc2, 0x26, 0x68, 0xf6, 0x78, 0x3c, 0xaa, 0x23, 0x5c, 0x01, 0xdd, 0x39, 0x9a, 0xec, 0x3f, - 0xa8, 0x6f, 0xe3, 0x2a, 0x18, 0xc3, 0xd1, 0xf8, 0x91, 0x38, 0x94, 0x04, 0xda, 0x76, 0x8e, 0x1e, - 0x91, 0xaf, 0xea, 0xda, 0x9d, 0x77, 0xa1, 0xfa, 0xc2, 0x97, 0x0e, 0xd7, 0xc0, 0x7c, 0xfc, 0x89, - 0x33, 0x3a, 0x70, 0xc7, 0xc3, 0xfa, 0x16, 0xae, 0x43, 0x6d, 0x38, 0x1e, 0x8d, 0xc6, 0x5f, 0x1e, - 0xbb, 0x43, 0x32, 0x3e, 0xac, 0x23, 0xfb, 0xde, 0xb3, 0x55, 0x13, 0xfd, 0xba, 0x6a, 0xa2, 0x3f, - 0x57, 0x4d, 0xf4, 0xf3, 0x5f, 0x4d, 0x04, 0x7b, 0x3e, 0x57, 0x05, 0x8b, 0x6f, 0x8d, 0x1f, 0x7a, - 0xaa, 0xee, 0xaf, 0x75, 0xf9, 0xdf, 0x7e, 0x52, 0x96, 0xdb, 0xf5, 0xde, 0x3f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x45, 0x93, 0xae, 0x51, 0xeb, 0x07, 0x00, 0x00, + // 950 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xc1, 0x6f, 0xe3, 0xc4, + 0x17, 0xee, 0xc4, 0x76, 0xec, 0xbc, 0xa4, 0x55, 0x34, 0xfb, 0xfb, 0x6d, 0xbd, 0x01, 0x35, 0x21, + 0x2b, 0xa4, 0xb0, 0x5a, 0xd2, 0xdd, 0xb2, 0xdb, 0x03, 0x42, 0x5a, 0xad, 0xb7, 0x04, 0x0c, 0x69, + 0x83, 0xa6, 0x11, 0x08, 0x2e, 0xd6, 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c6, 0x1c, + 0xfa, 0x17, 0xe6, 0xf6, 0x2f, 0x26, 0x53, 0xf9, 0xa7, 0xc9, 0xa8, 0xb2, 0x4a, 0x70, 0xf7, 0x29, + 0x18, 0x0e, 0xcd, 0x26, 0xa7, 0xaf, 0xc2, 0xc9, 0x2b, 0xbd, 0x85, 0x56, 0x6f, 0xdd, 0x79, 0x1f, + 0x6a, 0xab, 0xaf, 0x0f, 0x06, 0xa8, 0x1e, 0x8f, 0x89, 0x7b, 0xf4, 0x41, 0x73, 0x03, 0x5b, 0xa0, + 0x3b, 0xa3, 0xd1, 0xb0, 0x89, 0x70, 0x0d, 0x0c, 0xf7, 0x68, 0xbc, 0xff, 0xa0, 0x59, 0xc1, 0x75, + 0x30, 0x07, 0xc3, 0xd1, 0x63, 0x71, 0xd1, 0x04, 0xda, 0x71, 0x8f, 0x1e, 0x93, 0xcf, 0x9b, 0xfa, + 0x9d, 0xb7, 0xa1, 0xfe, 0xd2, 0x3f, 0x1f, 0x6e, 0x80, 0xf5, 0xe4, 0x43, 0x77, 0x78, 0xe0, 0x8d, + 0x06, 0xcd, 0x0d, 0xdc, 0x84, 0xc6, 0x60, 0x34, 0x1c, 0x8e, 0x3e, 0x3b, 0xf6, 0x06, 0x64, 0x74, + 0xd8, 0x44, 0xce, 0xbd, 0xe7, 0xcb, 0x1d, 0xf4, 0xd3, 0x72, 0x07, 0xfd, 0xb6, 0xdc, 0x41, 0x3f, + 0xfc, 0xbe, 0x83, 0x60, 0x3b, 0xe0, 0xaa, 0x60, 0xf1, 0xdf, 0x13, 0x44, 0xbe, 0xaa, 0xfb, 0x0b, + 0x43, 0x7e, 0xeb, 0x4f, 0xaa, 0x72, 0xdb, 0xde, 0xf9, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x88, 0x13, + 0x14, 0xb2, 0xfb, 0x07, 0x00, 0x00, } diff --git a/model/proto/model.proto b/model/proto/model.proto index f594ddadd4d..f27ed7536da 100644 --- a/model/proto/model.proto +++ b/model/proto/model.proto @@ -137,8 +137,12 @@ message Span { } message TraceID { - uint64 low = 1; - uint64 high = 2; + uint64 low = 1 [ + (gogoproto.jsontag) = "lo" + ]; + uint64 high = 2 [ + (gogoproto.jsontag) = "hi" + ]; } message Trace { From d2091e22ecf1cf23b0d618d4dbda8038b0d42a73 Mon Sep 17 00:00:00 2001 From: Olivier Boucher Date: Fri, 14 Dec 2018 13:03:35 -0500 Subject: [PATCH 09/11] Fixed issue introduced moving TraceID to model.proto Added proper annotations to storage.proto instead of exposing TraceID in model.proto. Tests are back to green. Signed-off-by: Olivier Boucher --- cmd/collector/app/span_processor.go | 2 +- cmd/noop-grpc-plugin/main.go | 2 +- model/ids.go | 36 +++ model/model.pb.go | 300 +++++------------- model/proto/model.proto | 13 +- .../cassandra/spanstore/dbmodel/model.go | 3 +- plugin/storage/grpc/proto/storage.pb.go | 157 +++++---- plugin/storage/grpc/proto/storage.proto | 13 +- proto-gen/openapi/api_v2.swagger.json | 19 +- 9 files changed, 197 insertions(+), 348 deletions(-) diff --git a/cmd/collector/app/span_processor.go b/cmd/collector/app/span_processor.go index b8bffdaebb4..faf59b04060 100644 --- a/cmd/collector/app/span_processor.go +++ b/cmd/collector/app/span_processor.go @@ -103,7 +103,7 @@ func (sp *spanProcessor) saveSpan(span *model.Span) { sp.metrics.SavedErrBySvc.ReportServiceNameForSpan(span) } else { sp.logger.Debug("Span written to the storage by the collector", - zap.Stringer("trace-id", &span.TraceID), zap.Stringer("span-id", span.SpanID)) + zap.Stringer("trace-id", span.TraceID), zap.Stringer("span-id", span.SpanID)) sp.metrics.SavedOkBySvc.ReportServiceNameForSpan(span) } sp.metrics.SaveLatency.Record(time.Since(startTime)) diff --git a/cmd/noop-grpc-plugin/main.go b/cmd/noop-grpc-plugin/main.go index 44863d84ab7..d01c8a7840f 100644 --- a/cmd/noop-grpc-plugin/main.go +++ b/cmd/noop-grpc-plugin/main.go @@ -79,7 +79,7 @@ func (*noopStore) FindTraces(ctx context.Context, query *spanstore.TraceQueryPar } func (*noopStore) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error) { - panic("implement me") + return nil, nil } func (*noopStore) WriteSpan(span *model.Span) error { diff --git a/model/ids.go b/model/ids.go index 50aa79b68dc..1cb1849ecb2 100644 --- a/model/ids.go +++ b/model/ids.go @@ -23,6 +23,12 @@ import ( "github.com/gogo/protobuf/jsonpb" ) +// TraceID is a random 128bit identifier for a trace +type TraceID struct { + Low uint64 `json:"lo"` + High uint64 `json:"hi"` +} + // SpanID is a random 64bit identifier for a span type SpanID uint64 @@ -33,6 +39,13 @@ func NewTraceID(high, low uint64) TraceID { return TraceID{High: high, Low: low} } +func (t TraceID) String() string { + if t.High == 0 { + return fmt.Sprintf("%x", t.Low) + } + return fmt.Sprintf("%x%016x", t.High, t.Low) +} + // TraceIDFromString creates a TraceID from a hexadecimal string func TraceIDFromString(s string) (TraceID, error) { var hi, lo uint64 @@ -65,6 +78,29 @@ func (t *TraceID) UnmarshalText(text []byte) error { return fmt.Errorf("unsupported method TraceID.UnmarshalText; please use github.com/gogo/protobuf/jsonpb for marshalling") } +// Size returns the size of this datum in protobuf. It is always 16 bytes. +func (t *TraceID) Size() int { + return 16 +} + +// MarshalTo converts trace ID into a binary representation. Called by protobuf serialization. +func (t *TraceID) MarshalTo(data []byte) (n int, err error) { + var b [16]byte + binary.BigEndian.PutUint64(b[:8], uint64(t.High)) + binary.BigEndian.PutUint64(b[8:], uint64(t.Low)) + return marshalBytes(data, b[:]) +} + +// Unmarshal inflates this trace ID from binary representation. Called by protobuf serialization. +func (t *TraceID) Unmarshal(data []byte) error { + if len(data) < 16 { + return fmt.Errorf("buffer is too short") + } + t.High = binary.BigEndian.Uint64(data[:8]) + t.Low = binary.BigEndian.Uint64(data[8:]) + return nil +} + func marshalBytes(dst []byte, src []byte) (n int, err error) { if len(dst) < len(src) { return 0, fmt.Errorf("buffer is too short") diff --git a/model/model.pb.go b/model/model.pb.go index 5d8569a9380..a2877bd5feb 100644 --- a/model/model.pb.go +++ b/model/model.pb.go @@ -13,7 +13,6 @@ SpanRef Process Span - TraceID Trace Batch */ @@ -190,7 +189,7 @@ func (m *Log) GetFields() []KeyValue { } type SpanRef struct { - TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,customtype=TraceID" json:"trace_id"` + TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"` SpanID SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=SpanID" json:"span_id"` RefType SpanRefType `protobuf:"varint,3,opt,name=ref_type,json=refType,proto3,enum=jaeger.api_v2.SpanRefType" json:"ref_type,omitempty"` } @@ -232,7 +231,7 @@ func (m *Process) GetTags() []KeyValue { } type Span struct { - TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,customtype=TraceID" json:"trace_id"` + TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"` SpanID SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=SpanID" json:"span_id"` OperationName string `protobuf:"bytes,3,opt,name=operation_name,json=operationName,proto3" json:"operation_name,omitempty"` References []SpanRef `protobuf:"bytes,4,rep,name=references" json:"references"` @@ -314,30 +313,6 @@ func (m *Span) GetWarnings() []string { return nil } -type TraceID struct { - Low uint64 `protobuf:"varint,1,opt,name=low,proto3" json:"lo"` - High uint64 `protobuf:"varint,2,opt,name=high,proto3" json:"hi"` -} - -func (m *TraceID) Reset() { *m = TraceID{} } -func (m *TraceID) String() string { return proto.CompactTextString(m) } -func (*TraceID) ProtoMessage() {} -func (*TraceID) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{5} } - -func (m *TraceID) GetLow() uint64 { - if m != nil { - return m.Low - } - return 0 -} - -func (m *TraceID) GetHigh() uint64 { - if m != nil { - return m.High - } - return 0 -} - type Trace struct { Spans []*Span `protobuf:"bytes,1,rep,name=spans" json:"spans,omitempty"` ProcessMap []Trace_ProcessMapping `protobuf:"bytes,2,rep,name=process_map,json=processMap" json:"process_map"` @@ -347,7 +322,7 @@ type Trace struct { func (m *Trace) Reset() { *m = Trace{} } func (m *Trace) String() string { return proto.CompactTextString(m) } func (*Trace) ProtoMessage() {} -func (*Trace) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{6} } +func (*Trace) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{5} } func (m *Trace) GetSpans() []*Span { if m != nil { @@ -378,7 +353,7 @@ type Trace_ProcessMapping struct { func (m *Trace_ProcessMapping) Reset() { *m = Trace_ProcessMapping{} } func (m *Trace_ProcessMapping) String() string { return proto.CompactTextString(m) } func (*Trace_ProcessMapping) ProtoMessage() {} -func (*Trace_ProcessMapping) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{6, 0} } +func (*Trace_ProcessMapping) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{5, 0} } func (m *Trace_ProcessMapping) GetProcessID() string { if m != nil { @@ -402,7 +377,7 @@ type Batch struct { func (m *Batch) Reset() { *m = Batch{} } func (m *Batch) String() string { return proto.CompactTextString(m) } func (*Batch) ProtoMessage() {} -func (*Batch) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{7} } +func (*Batch) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{6} } func (m *Batch) GetSpans() []*Span { if m != nil { @@ -429,8 +404,6 @@ func init() { golang_proto.RegisterType((*Process)(nil), "jaeger.api_v2.Process") proto.RegisterType((*Span)(nil), "jaeger.api_v2.Span") golang_proto.RegisterType((*Span)(nil), "jaeger.api_v2.Span") - proto.RegisterType((*TraceID)(nil), "jaeger.api_v2.TraceID") - golang_proto.RegisterType((*TraceID)(nil), "jaeger.api_v2.TraceID") proto.RegisterType((*Trace)(nil), "jaeger.api_v2.Trace") golang_proto.RegisterType((*Trace)(nil), "jaeger.api_v2.Trace") proto.RegisterType((*Trace_ProcessMapping)(nil), "jaeger.api_v2.Trace.ProcessMapping") @@ -859,34 +832,6 @@ func (m *Span) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *TraceID) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TraceID) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Low != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintModel(dAtA, i, uint64(m.Low)) - } - if m.High != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintModel(dAtA, i, uint64(m.High)) - } - return i, nil -} - func (m *Trace) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1151,18 +1096,6 @@ func (m *Span) Size() (n int) { return n } -func (m *TraceID) Size() (n int) { - var l int - _ = l - if m.Low != 0 { - n += 1 + sovModel(uint64(m.Low)) - } - if m.High != 0 { - n += 1 + sovModel(uint64(m.High)) - } - return n -} - func (m *Trace) Size() (n int) { var l int _ = l @@ -1580,7 +1513,7 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModel @@ -1590,15 +1523,15 @@ func (m *SpanRef) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthModel } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } @@ -1819,7 +1752,7 @@ func (m *Span) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModel @@ -1829,15 +1762,15 @@ func (m *Span) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthModel } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } @@ -2188,94 +2121,6 @@ func (m *Span) Unmarshal(dAtA []byte) error { } return nil } -func (m *TraceID) 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 ErrIntOverflowModel - } - 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: TraceID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TraceID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Low", wireType) - } - m.Low = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Low |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field High", wireType) - } - m.High = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.High |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipModel(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthModel - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *Trace) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2749,65 +2594,62 @@ func init() { proto.RegisterFile("model.proto", fileDescriptorModel) } func init() { golang_proto.RegisterFile("model.proto", fileDescriptorModel) } var fileDescriptorModel = []byte{ - // 950 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xc1, 0x6f, 0xe3, 0xc4, - 0x17, 0xee, 0xc4, 0x76, 0xec, 0xbc, 0xa4, 0x55, 0x34, 0xfb, 0xfb, 0x6d, 0xbd, 0x01, 0x35, 0x21, - 0x2b, 0xa4, 0xb0, 0x5a, 0xd2, 0xdd, 0xb2, 0xdb, 0x03, 0x42, 0x5a, 0xad, 0xb7, 0x04, 0x0c, 0x69, - 0x83, 0xa6, 0x11, 0x08, 0x2e, 0xd6, 0x34, 0x99, 0xb8, 0x5e, 0x1c, 0x8f, 0x65, 0xbb, 0x5e, 0xe5, - 0xc6, 0x9f, 0x80, 0x38, 0x71, 0x84, 0xff, 0x04, 0x71, 0xda, 0x23, 0x07, 0x4e, 0x1c, 0x0a, 0x0a, - 0x97, 0x15, 0x77, 0xee, 0x68, 0xc6, 0xe3, 0x74, 0x1b, 0x2a, 0xe8, 0xde, 0x38, 0x65, 0xe6, 0xbd, - 0xef, 0xbd, 0x79, 0xef, 0x7b, 0xdf, 0x8b, 0xa1, 0x3e, 0xe7, 0x53, 0x16, 0xf6, 0xe3, 0x84, 0x67, - 0x1c, 0x6f, 0x3e, 0xa5, 0xcc, 0x67, 0x49, 0x9f, 0xc6, 0x81, 0x97, 0xef, 0xb5, 0xfe, 0xe7, 0x73, - 0x9f, 0x4b, 0xcf, 0xae, 0x38, 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0x93, 0xcf, 0x9b, 0xfa, - 0x9d, 0xb7, 0xa1, 0xfe, 0xd2, 0x3f, 0x1f, 0x6e, 0x80, 0xf5, 0xe4, 0x43, 0x77, 0x78, 0xe0, 0x8d, - 0x06, 0xcd, 0x0d, 0xdc, 0x84, 0xc6, 0x60, 0x34, 0x1c, 0x8e, 0x3e, 0x3b, 0xf6, 0x06, 0x64, 0x74, - 0xd8, 0x44, 0xce, 0xbd, 0xe7, 0xcb, 0x1d, 0xf4, 0xd3, 0x72, 0x07, 0xfd, 0xb6, 0xdc, 0x41, 0x3f, - 0xfc, 0xbe, 0x83, 0x60, 0x3b, 0xe0, 0xaa, 0x60, 0xf1, 0xdf, 0x13, 0x44, 0xbe, 0xaa, 0xfb, 0x0b, - 0x43, 0x7e, 0xeb, 0x4f, 0xaa, 0x72, 0xdb, 0xde, 0xf9, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x88, 0x13, - 0x14, 0xb2, 0xfb, 0x07, 0x00, 0x00, + // 905 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x41, 0x8f, 0xdb, 0x44, + 0x14, 0xde, 0x49, 0xec, 0xd8, 0x79, 0x49, 0x56, 0xd1, 0x14, 0x58, 0x37, 0xa0, 0x24, 0xa4, 0x42, + 0x0a, 0x55, 0x49, 0xda, 0xd0, 0xee, 0x01, 0x21, 0xa1, 0xba, 0x4b, 0xc0, 0x90, 0xdd, 0xa0, 0xd9, + 0x08, 0x04, 0x17, 0x6b, 0x36, 0x99, 0x18, 0x17, 0xc7, 0x63, 0xd9, 0x5e, 0xa3, 0xdc, 0xf8, 0x09, + 0x88, 0x13, 0x47, 0xb8, 0xf2, 0x2b, 0x38, 0xf6, 0xc8, 0x81, 0x13, 0x12, 0x0b, 0x0a, 0x97, 0xfe, + 0x0c, 0x34, 0xe3, 0x71, 0xb6, 0x1b, 0x2a, 0xd8, 0x5e, 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xec, 0xf0, 0xab, 0x50, 0xcd, 0xdc, 0x65, 0xc0, 0xa9, 0x08, 0x55, 0xba, 0xa8, 0x8f, 0x88, 0x99, + 0x8d, 0xf3, 0x3d, 0xbe, 0x09, 0x66, 0xe6, 0x9e, 0xf9, 0x21, 0x8d, 0xd7, 0x96, 0xd1, 0x45, 0xfd, + 0x3a, 0x31, 0x32, 0x5b, 0x6e, 0xdf, 0x31, 0x9f, 0xfe, 0xd0, 0x41, 0x4f, 0x7f, 0xec, 0xa0, 0xde, + 0x37, 0x08, 0xca, 0x13, 0xee, 0x61, 0x1b, 0xaa, 0x5b, 0x45, 0x64, 0x5f, 0xb5, 0x51, 0x6b, 0x90, + 0x4b, 0x32, 0x28, 0x24, 0x19, 0xcc, 0x0a, 0x84, 0x6d, 0x3e, 0xb9, 0xe8, 0xec, 0x7d, 0xfb, 0x47, + 0x07, 0x91, 0xcb, 0x34, 0xfc, 0x00, 0x2a, 0x4b, 0x9f, 0x05, 0x8b, 0xc4, 0x2a, 0x75, 0xcb, 0xfd, + 0xda, 0xe8, 0x60, 0x47, 0x83, 0x42, 0x3e, 0x5b, 0x13, 0xd9, 0x44, 0x81, 0x7b, 0x3f, 0x21, 0x30, + 0x4e, 0x23, 0x1a, 0x12, 0xb6, 0xc4, 0x0f, 0xc0, 0x4c, 0x63, 0x3a, 0x67, 0xae, 0xbf, 0x90, 0x2c, + 0xea, 0x76, 0x4b, 0x60, 0x7f, 0xbb, 0xe8, 0x18, 0x33, 0x71, 0xee, 0x1c, 0x6d, 0x2e, 0x97, 0xc4, + 0x90, 0x58, 0x67, 0x81, 0xef, 0x81, 0x91, 0x44, 0x34, 0x14, 0x59, 0x25, 0x99, 0x65, 0xa9, 0xac, + 0x8a, 0x28, 0x2c, 0x93, 0xd4, 0x8a, 0x54, 0x04, 0xd0, 0x59, 0x88, 0x9b, 0x62, 0xb6, 0xcc, 0x47, + 0x56, 0x96, 0x23, 0x6b, 0xed, 0xd0, 0x55, 0x9c, 0xe4,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xfd, 0x16, 0xd4, 0x9e, 0xf9, 0x40, 0xe1, 0x3a, 0x98, 0x8f, 0x3e, 0x74, + 0x26, 0x47, 0xee, 0x74, 0xdc, 0xdc, 0xc3, 0x4d, 0xa8, 0x8f, 0xa7, 0x93, 0xc9, 0xf4, 0xb3, 0x53, + 0x77, 0x4c, 0xa6, 0xc7, 0x4d, 0x64, 0xdf, 0x7d, 0xb2, 0x69, 0xa3, 0x5f, 0x36, 0x6d, 0xf4, 0xe7, + 0xa6, 0x8d, 0x7e, 0xfe, 0xab, 0x8d, 0xe0, 0xc0, 0xe7, 0x8a, 0xb0, 0xf8, 0x74, 0xf8, 0xa1, 0xa7, + 0x78, 0x7f, 0xa1, 0xcb, 0x5f, 0xef, 0x59, 0x45, 0xbe, 0x2c, 0x6f, 0xff, 0x1d, 0x00, 0x00, 0xff, + 0xff, 0xc9, 0x46, 0x02, 0x11, 0x8a, 0x07, 0x00, 0x00, } diff --git a/model/proto/model.proto b/model/proto/model.proto index f27ed7536da..3bce8a1ac5a 100644 --- a/model/proto/model.proto +++ b/model/proto/model.proto @@ -76,7 +76,7 @@ enum SpanRefType { }; message SpanRef { - TraceID trace_id = 1 [ + bytes trace_id = 1 [ (gogoproto.nullable) = false, (gogoproto.customtype) = "TraceID", (gogoproto.customname) = "TraceID" @@ -97,7 +97,7 @@ message Process { } message Span { - TraceID trace_id = 1 [ + bytes trace_id = 1 [ (gogoproto.nullable) = false, (gogoproto.customtype) = "TraceID", (gogoproto.customname) = "TraceID" @@ -136,15 +136,6 @@ message Span { repeated string warnings = 12; } -message TraceID { - uint64 low = 1 [ - (gogoproto.jsontag) = "lo" - ]; - uint64 high = 2 [ - (gogoproto.jsontag) = "hi" - ]; -} - message Trace { message ProcessMapping { string process_id = 1 [ diff --git a/plugin/storage/cassandra/spanstore/dbmodel/model.go b/plugin/storage/cassandra/spanstore/dbmodel/model.go index 3056882f1c7..ffc76b315f1 100644 --- a/plugin/storage/cassandra/spanstore/dbmodel/model.go +++ b/plugin/storage/cassandra/spanstore/dbmodel/model.go @@ -117,6 +117,5 @@ func (dbTraceID TraceID) ToDomain() model.TraceID { // String returns hex string representation of the trace ID. func (dbTraceID TraceID) String() string { - t := dbTraceID.ToDomain() - return t.String() + return dbTraceID.ToDomain().String() } diff --git a/plugin/storage/grpc/proto/storage.pb.go b/plugin/storage/grpc/proto/storage.pb.go index 2ac17979e33..cbe9ac0e3a1 100644 --- a/plugin/storage/grpc/proto/storage.pb.go +++ b/plugin/storage/grpc/proto/storage.pb.go @@ -40,6 +40,7 @@ import jaeger_api_v2 "github.com/jaegertracing/jaeger/model" import _ "github.com/gogo/protobuf/types" import _ "github.com/gogo/protobuf/types" +import github_com_jaegertracing_jaeger_model "github.com/jaegertracing/jaeger/model" import time "time" import context "golang.org/x/net/context" @@ -202,7 +203,7 @@ func _WriteSpanResponse_OneofSizer(msg proto1.Message) (n int) { } type GetTraceRequest struct { - TraceID jaeger_api_v2.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId" json:"trace_id"` + TraceID github_com_jaegertracing_jaeger_model.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=github.com/jaegertracing/jaeger/model.TraceID" json:"trace_id"` } func (m *GetTraceRequest) Reset() { *m = GetTraceRequest{} } @@ -210,13 +211,6 @@ func (m *GetTraceRequest) String() string { return proto1.CompactText func (*GetTraceRequest) ProtoMessage() {} func (*GetTraceRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{2} } -func (m *GetTraceRequest) GetTraceID() jaeger_api_v2.TraceID { - if m != nil { - return m.TraceID - } - return jaeger_api_v2.TraceID{} -} - type GetTraceSuccess struct { Trace *jaeger_api_v2.Trace `protobuf:"bytes,1,opt,name=trace" json:"trace,omitempty"` } @@ -902,7 +896,7 @@ func (m *FindTraceIDsRequest) GetQuery() *TraceQueryParameters { } type FindTraceIDsSuccess struct { - TraceIDs []jaeger_api_v2.TraceID `protobuf:"bytes,1,rep,name=traceIDs" json:"traceIDs"` + TraceIDs []github_com_jaegertracing_jaeger_model.TraceID `protobuf:"bytes,1,rep,name=trace_id,json=traceId,customtype=github.com/jaegertracing/jaeger/model.TraceID" json:"trace_id"` } func (m *FindTraceIDsSuccess) Reset() { *m = FindTraceIDsSuccess{} } @@ -910,13 +904,6 @@ func (m *FindTraceIDsSuccess) String() string { return proto1.Compact func (*FindTraceIDsSuccess) ProtoMessage() {} func (*FindTraceIDsSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{16} } -func (m *FindTraceIDsSuccess) GetTraceIDs() []jaeger_api_v2.TraceID { - if m != nil { - return m.TraceIDs - } - return nil -} - type FindTraceIDsResponse struct { // Types that are valid to be assigned to Response: // *FindTraceIDsResponse_Success @@ -2673,7 +2660,7 @@ func (m *GetTraceRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStorage @@ -2683,15 +2670,15 @@ func (m *GetTraceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthStorage } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } @@ -4191,7 +4178,7 @@ func (m *FindTraceIDsSuccess) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TraceIDs", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStorage @@ -4201,19 +4188,20 @@ func (m *FindTraceIDsSuccess) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthStorage } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } - m.TraceIDs = append(m.TraceIDs, jaeger_api_v2.TraceID{}) + 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 } @@ -4591,64 +4579,65 @@ func init() { proto1.RegisterFile("storage.proto", fileDescriptorStorage) } func init() { golang_proto.RegisterFile("storage.proto", fileDescriptorStorage) } var fileDescriptorStorage = []byte{ - // 929 bytes of a gzipped FileDescriptorProto + // 953 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x24, 0x76, 0x6c, 0x3f, 0xc7, 0x4d, 0x3a, 0x31, 0xb0, 0x58, 0x60, 0x3b, 0x53, 0x10, - 0x11, 0x82, 0x4d, 0x15, 0x24, 0x48, 0x0b, 0x05, 0xd5, 0x4a, 0x9a, 0x06, 0x44, 0x9a, 0x6e, 0x82, - 0x2a, 0xf5, 0x62, 0x0d, 0xf1, 0xb0, 0x5a, 0xc8, 0xee, 0xba, 0x33, 0xb3, 0x51, 0xf2, 0x15, 0x38, - 0x71, 0x00, 0x09, 0x84, 0x10, 0x07, 0xbe, 0x08, 0xc7, 0x1e, 0xf9, 0x04, 0x05, 0x85, 0x2f, 0x82, - 0x76, 0x76, 0x66, 0xe3, 0x1d, 0xff, 0x39, 0x54, 0xf8, 0x64, 0xcf, 0xcc, 0xef, 0xfd, 0xde, 0x7b, - 0xbf, 0x99, 0xf7, 0xde, 0x42, 0x43, 0xc8, 0x98, 0x53, 0x9f, 0xb9, 0x43, 0x1e, 0xcb, 0x18, 0x37, - 0xbe, 0xa5, 0xcc, 0x67, 0xdc, 0xa5,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x20, 0x72, 0x08, 0x37, 0x1f, 0x04, 0xd1, 0x20, 0xa3, 0x31, - 0xe5, 0x72, 0x07, 0xca, 0xcf, 0xd2, 0x7b, 0x9b, 0xf2, 0x80, 0x27, 0x5d, 0xac, 0x97, 0x59, 0x90, - 0xfb, 0xa3, 0x7c, 0xa6, 0x98, 0xde, 0x83, 0x65, 0x1d, 0x38, 0x52, 0x2f, 0x65, 0x72, 0x07, 0xd5, - 0x18, 0xf2, 0x0b, 0x02, 0x3c, 0x1a, 0x93, 0xae, 0xab, 0x4f, 0xec, 0xba, 0xea, 0x5a, 0x2c, 0x63, - 0x7e, 0xe7, 0x50, 0x54, 0x47, 0xb0, 0x9e, 0xbb, 0x39, 0xd8, 0xfd, 0x3f, 0x04, 0x7b, 0x54, 0x64, - 0x34, 0x92, 0xed, 0xe8, 0x51, 0x76, 0xb0, 0x6b, 0x44, 0x9b, 0x36, 0xca, 0x4a, 0xe9, 0x83, 0xf1, - 0x72, 0x34, 0xf9, 0x0d, 0x41, 0xb3, 0x18, 0xa3, 0x16, 0xf0, 0x53, 0x5b, 0x40, 0x32, 0x4d, 0xc0, - 0xeb, 0x38, 0xe6, 0x20, 0xe1, 0x2a, 0x34, 0x0a, 0x9f, 0x06, 0xc4, 0x05, 0x3c, 0x6e, 0x9b, 0xb6, - 0xec, 0x90, 0x09, 0x41, 0xfd, 0xbc, 0x65, 0xeb, 0xe5, 0xf6, 0xf7, 0x25, 0x68, 0x14, 0x0c, 0xf0, - 0x21, 0xd4, 0xf2, 0x0f, 0x14, 0xdc, 0xb1, 0xe2, 0xb2, 0x3f, 0x7c, 0x5a, 0xdd, 0xe9, 0x00, 0xad, - 0xd4, 0x17, 0x50, 0x35, 0x13, 0x19, 0x4f, 0x1b, 0xd5, 0x86, 0xad, 0x33, 0xf5, 0x5c, 0x93, 0x9d, - 0x40, 0x7d, 0x64, 0xf6, 0xe1, 0x19, 0x73, 0xd1, 0x50, 0x92, 0x59, 0x10, 0xcd, 0xfa, 0x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, 0x67, 0xe7, 0xed, 0xa5, 0xbf, 0xce, 0xdb, 0x77, 0x5c, + 0x8f, 0x7f, 0x1d, 0x3f, 0xb7, 0x87, 0xa1, 0xdf, 0x93, 0xee, 0x12, 0xa0, 0x17, 0xb8, 0x6a, 0xd5, + 0x93, 0x72, 0x0b, 0xb6, 0xdd, 0xad, 0x8b, 0xf3, 0x76, 0x51, 0xfd, 0x75, 0x8a, 0x82, 0x71, 0x77, + 0x64, 0x3d, 0xbc, 0xf4, 0x77, 0xa0, 0x32, 0x79, 0x0b, 0x0a, 0xe2, 0x54, 0x29, 0x50, 0x37, 0x32, + 0x91, 0xb1, 0x49, 0x88, 0xf5, 0x23, 0x82, 0xd5, 0xcb, 0x78, 0x95, 0x88, 0x0f, 0x4c, 0x11, 0x5b, + 0x06, 0x85, 0xe1, 0x71, 0x01, 0x32, 0xd6, 0x01, 0xef, 0x50, 0x7e, 0x40, 0xa3, 0x63, 0x6f, 0x48, + 0x99, 0x52, 0xd2, 0xba, 0x9b, 0xd9, 0xd5, 0xf9, 0x36, 0xa1, 0xc4, 0xd4, 0x56, 0x03, 0x75, 0x72, + 0xdd, 0xb2, 0x93, 0xae, 0xad, 0x5f, 0x10, 0xac, 0x65, 0x88, 0x54, 0x8a, 0x0f, 0xcd, 0x14, 0xd7, + 0xa7, 0x53, 0x34, 0xfc, 0x2c, 0x20, 0xcb, 0xbb, 0x50, 0xdf, 0xa1, 0xfc, 0xf3, 0x31, 0x95, 0x65, + 0xa1, 0xf3, 0xc4, 0x0d, 0x28, 0xaa, 0x0c, 0x44, 0x74, 0x65, 0x47, 0x2f, 0xad, 0x77, 0x0d, 0x0b, + 0xad, 0x41, 0x0b, 0x20, 0x4c, 0x37, 0x95, 0x0a, 0x13, 0x3b, 0xd6, 0x6f, 0x08, 0x5e, 0x32, 0x5c, + 0x29, 0x25, 0x3e, 0x32, 0x95, 0xb8, 0x3d, 0xad, 0xc4, 0x94, 0xbf, 0x05, 0x68, 0xf1, 0x7b, 0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xa4, 0xa7, 0x36, 0x9e, 0x35, + 0xce, 0x35, 0x5b, 0x7b, 0xe6, 0xb9, 0x22, 0x3b, 0x84, 0xca, 0xc4, 0x7c, 0xc4, 0x73, 0x66, 0xa7, + 0xa6, 0xb4, 0xe6, 0x41, 0x14, 0xeb, 0x33, 0xa8, 0x65, 0x66, 0x0d, 0x9e, 0x3b, 0x89, 0x34, 0xf3, + 0xeb, 0xf3, 0x41, 0x8a, 0xfb, 0x09, 0xc0, 0x65, 0xbd, 0xe1, 0xd9, 0xa5, 0xa8, 0x59, 0xd7, 0xe7, + 0x20, 0x14, 0xe5, 0x53, 0xa8, 0x4e, 0xbe, 0x2e, 0x3c, 0xef, 0xe9, 0x69, 0xda, 0xdb, 0x73, 0x31, + 0x92, 0xb8, 0xff, 0xf2, 0xd9, 0x45, 0x0b, 0xfd, 0x79, 0xd1, 0x42, 0xff, 0x5c, 0xb4, 0xd0, 0x1f, + 0xff, 0xb6, 0xd0, 0xb3, 0x82, 0xec, 0xbb, 0x2b, 0xe2, 0xe7, 0x9d, 0xff, 0x02, 0x00, 0x00, 0xff, + 0xff, 0xab, 0x39, 0x5b, 0xdc, 0xba, 0x0b, 0x00, 0x00, } diff --git a/plugin/storage/grpc/proto/storage.proto b/plugin/storage/grpc/proto/storage.proto index 45a1086d39c..d81c3bbff34 100644 --- a/plugin/storage/grpc/proto/storage.proto +++ b/plugin/storage/grpc/proto/storage.proto @@ -95,9 +95,10 @@ message WriteSpanResponse { } message GetTraceRequest { - TraceID trace_id = 1 [ - (gogoproto.nullable) = false, - (gogoproto.customname) = "TraceID" + bytes trace_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/jaegertracing/jaeger/model.TraceID", + (gogoproto.customname) = "TraceID" ]; } @@ -183,8 +184,10 @@ message FindTraceIDsRequest { } message FindTraceIDsSuccess { - repeated TraceID traceIDs = 1 [ - (gogoproto.nullable) = false + repeated bytes trace_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/jaegertracing/jaeger/model.TraceID", + (gogoproto.customname) = "TraceIDs" ]; } diff --git a/proto-gen/openapi/api_v2.swagger.json b/proto-gen/openapi/api_v2.swagger.json index cf2c619ecc9..a476c054cd6 100644 --- a/proto-gen/openapi/api_v2.swagger.json +++ b/proto-gen/openapi/api_v2.swagger.json @@ -242,7 +242,8 @@ "type": "object", "properties": { "trace_id": { - "$ref": "#/definitions/api_v2TraceID" + "type": "string", + "format": "byte" }, "span_id": { "type": "string", @@ -298,7 +299,8 @@ "type": "object", "properties": { "trace_id": { - "$ref": "#/definitions/api_v2TraceID" + "type": "string", + "format": "byte" }, "span_id": { "type": "string", @@ -317,19 +319,6 @@ ], "default": "CHILD_OF" }, - "api_v2TraceID": { - "type": "object", - "properties": { - "low": { - "type": "string", - "format": "uint64" - }, - "high": { - "type": "string", - "format": "uint64" - } - } - }, "api_v2ValueType": { "type": "string", "enum": [ From b5a70072a28459683ad477fd579196a420c13f21 Mon Sep 17 00:00:00 2001 From: Olivier Boucher Date: Fri, 14 Dec 2018 14:12:57 -0500 Subject: [PATCH 10/11] Added tests for gRPC storage factory and options Moved DependencyLink to model.proto since it had to be used and the existing struct did not implement any Marshaler/Unmarshaler methods. Changed storage configuration to allow testing via mocks. Added DependencyReader interface to the StoragePlugin interface. Signed-off-by: Olivier Boucher --- cmd/noop-grpc-plugin/main.go | 5 + model/dependencies.go | 22 - model/model.pb.go | 332 ++++++-- model/proto/model.proto | 6 + pkg/grpc/config/config.go | 48 ++ plugin/storage/grpc/factory.go | 16 +- plugin/storage/grpc/factory_test.go | 105 +++ plugin/storage/grpc/options_test.go | 22 + plugin/storage/grpc/plugin.go | 52 +- plugin/storage/grpc/proto/storage.pb.go | 974 ++++++++++++++++++++---- plugin/storage/grpc/proto/storage.proto | 79 +- plugin/storage/grpc/shared/grpc.go | 76 +- plugin/storage/grpc/shared/interface.go | 2 + 13 files changed, 1371 insertions(+), 368 deletions(-) delete mode 100644 model/dependencies.go create mode 100644 plugin/storage/grpc/factory_test.go create mode 100644 plugin/storage/grpc/options_test.go diff --git a/cmd/noop-grpc-plugin/main.go b/cmd/noop-grpc-plugin/main.go index d01c8a7840f..ffa82e4b98b 100644 --- a/cmd/noop-grpc-plugin/main.go +++ b/cmd/noop-grpc-plugin/main.go @@ -25,6 +25,7 @@ import ( "github.com/spf13/viper" "path" "strings" + "time" ) var configPath string @@ -62,6 +63,10 @@ type noopStore struct { } +func (*noopStore) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { + return nil, nil +} + func (*noopStore) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) { return nil, nil } diff --git a/model/dependencies.go b/model/dependencies.go deleted file mode 100644 index c3e5ee56c76..00000000000 --- a/model/dependencies.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2017 Uber Technologies, Inc. -// -// 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 model - -// DependencyLink shows dependencies between services -type DependencyLink struct { - Parent string `json:"parent"` - Child string `json:"child"` - CallCount uint64 `json:"callCount"` -} diff --git a/model/model.pb.go b/model/model.pb.go index a2877bd5feb..3437bb82161 100644 --- a/model/model.pb.go +++ b/model/model.pb.go @@ -15,6 +15,7 @@ Span Trace Batch + DependencyLink */ package model @@ -393,6 +394,38 @@ func (m *Batch) GetProcess() *Process { return nil } +type DependencyLink struct { + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + Child string `protobuf:"bytes,2,opt,name=child,proto3" json:"child,omitempty"` + CallCount uint64 `protobuf:"varint,3,opt,name=call_count,json=callCount,proto3" json:"call_count,omitempty"` +} + +func (m *DependencyLink) Reset() { *m = DependencyLink{} } +func (m *DependencyLink) String() string { return proto.CompactTextString(m) } +func (*DependencyLink) ProtoMessage() {} +func (*DependencyLink) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{7} } + +func (m *DependencyLink) GetParent() string { + if m != nil { + return m.Parent + } + return "" +} + +func (m *DependencyLink) GetChild() string { + if m != nil { + return m.Child + } + return "" +} + +func (m *DependencyLink) GetCallCount() uint64 { + if m != nil { + return m.CallCount + } + return 0 +} + func init() { proto.RegisterType((*KeyValue)(nil), "jaeger.api_v2.KeyValue") golang_proto.RegisterType((*KeyValue)(nil), "jaeger.api_v2.KeyValue") @@ -410,6 +443,8 @@ func init() { golang_proto.RegisterType((*Trace_ProcessMapping)(nil), "jaeger.api_v2.Trace.ProcessMapping") proto.RegisterType((*Batch)(nil), "jaeger.api_v2.Batch") golang_proto.RegisterType((*Batch)(nil), "jaeger.api_v2.Batch") + proto.RegisterType((*DependencyLink)(nil), "jaeger.api_v2.DependencyLink") + golang_proto.RegisterType((*DependencyLink)(nil), "jaeger.api_v2.DependencyLink") proto.RegisterEnum("jaeger.api_v2.ValueType", ValueType_name, ValueType_value) golang_proto.RegisterEnum("jaeger.api_v2.ValueType", ValueType_name, ValueType_value) proto.RegisterEnum("jaeger.api_v2.SpanRefType", SpanRefType_name, SpanRefType_value) @@ -961,6 +996,41 @@ func (m *Batch) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *DependencyLink) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DependencyLink) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Parent) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintModel(dAtA, i, uint64(len(m.Parent))) + i += copy(dAtA[i:], m.Parent) + } + if len(m.Child) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintModel(dAtA, i, uint64(len(m.Child))) + i += copy(dAtA[i:], m.Child) + } + if m.CallCount != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintModel(dAtA, i, uint64(m.CallCount)) + } + return i, nil +} + func encodeVarintModel(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -1148,6 +1218,23 @@ func (m *Batch) Size() (n int) { return n } +func (m *DependencyLink) Size() (n int) { + var l int + _ = l + l = len(m.Parent) + if l > 0 { + n += 1 + l + sovModel(uint64(l)) + } + l = len(m.Child) + if l > 0 { + n += 1 + l + sovModel(uint64(l)) + } + if m.CallCount != 0 { + n += 1 + sovModel(uint64(m.CallCount)) + } + return n +} + func sovModel(x uint64) (n int) { for { n++ @@ -2485,6 +2572,133 @@ func (m *Batch) Unmarshal(dAtA []byte) error { } return nil } +func (m *DependencyLink) 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 ErrIntOverflowModel + } + 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: DependencyLink: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DependencyLink: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parent", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModel + } + 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 ErrInvalidLengthModel + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Parent = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Child", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModel + } + 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 ErrInvalidLengthModel + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Child = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CallCount", wireType) + } + m.CallCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CallCount |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipModel(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipModel(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 @@ -2594,62 +2808,66 @@ func init() { proto.RegisterFile("model.proto", fileDescriptorModel) } func init() { golang_proto.RegisterFile("model.proto", fileDescriptorModel) } var fileDescriptorModel = []byte{ - // 905 bytes of a gzipped FileDescriptorProto + // 964 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x41, 0x8f, 0xdb, 0x44, - 0x14, 0xde, 0x49, 0xec, 0xd8, 0x79, 0x49, 0x56, 0xd1, 0x14, 0x58, 0x37, 0xa0, 0x24, 0xa4, 0x42, - 0x0a, 0x55, 0x49, 0xda, 0xd0, 0xee, 0x01, 0x21, 0xa1, 0xba, 0x4b, 0xc0, 0x90, 0xdd, 0xa0, 0xd9, - 0x08, 0x04, 0x17, 0x6b, 0x36, 0x99, 0x18, 0x17, 0xc7, 0x63, 0xd9, 0x5e, 0xa3, 0xdc, 0xf8, 0x09, - 0x88, 0x13, 0x47, 0xb8, 0xf2, 0x2b, 0x38, 0xf6, 0xc8, 0x81, 0x13, 0x12, 0x0b, 0x0a, 0x97, 0xfe, - 0x0c, 0x34, 0xe3, 0x71, 0xb6, 0x1b, 0x2a, 0xd8, 0x5e, 0x38, 0x79, 0x66, 0xde, 0xf7, 0xde, 0x7c, - 0xef, 0x7b, 0x9f, 0x6d, 0xa8, 0xad, 0xf8, 0x82, 0x05, 0x83, 0x28, 0xe6, 0x29, 0xc7, 0x8d, 0xc7, - 0x94, 0x79, 0x2c, 0x1e, 0xd0, 0xc8, 0x77, 0xb3, 0x51, 0xeb, 0x25, 0x8f, 0x7b, 0x5c, 0x46, 0x86, - 0x62, 0x95, 0x83, 0x5a, 0xaf, 0x79, 0x9c, 0x7b, 0x01, 0x1b, 0xd2, 0xc8, 0x1f, 0xd2, 0x30, 0xe4, - 0x29, 0x4d, 0x7d, 0x1e, 0x26, 0x2a, 0xda, 0x51, 0x51, 0xb9, 0x3b, 0x3b, 0x5f, 0x0e, 0x53, 0x7f, - 0xc5, 0x92, 0x94, 0xae, 0x22, 0x05, 0x68, 0xef, 0x02, 0x16, 0xe7, 0xb1, 0xac, 0x90, 0xc7, 0x7b, - 0xbf, 0x22, 0x30, 0x3f, 0x66, 0xeb, 0x4f, 0x69, 0x70, 0xce, 0x70, 0x13, 0xca, 0x5f, 0xb1, 0xb5, - 0x85, 0xba, 0xa8, 0x5f, 0x25, 0x62, 0x89, 0x87, 0x50, 0xc9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, 0x00, 0xff, 0xff, 0x4c, 0x4c, 0xe8, 0xe0, + 0xe9, 0x07, 0x00, 0x00, } diff --git a/model/proto/model.proto b/model/proto/model.proto index 3bce8a1ac5a..22e1ff36dd6 100644 --- a/model/proto/model.proto +++ b/model/proto/model.proto @@ -158,3 +158,9 @@ message Batch { (gogoproto.nullable) = true ]; } + +message DependencyLink { + string parent = 1; + string child = 2; + uint64 call_count = 3; +} \ No newline at end of file diff --git a/pkg/grpc/config/config.go b/pkg/grpc/config/config.go index 28866633ac5..b265ea1e6b8 100644 --- a/pkg/grpc/config/config.go +++ b/pkg/grpc/config/config.go @@ -14,8 +14,56 @@ package config +import ( + "fmt" + "github.com/hashicorp/go-hclog" + "github.com/hashicorp/go-plugin" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" + "os/exec" + "runtime" +) + // Configuration describes the options to customize the storage behavior type Configuration struct { PluginBinary string `yaml:"binary"` PluginConfigurationFile string `yaml:"configuration-file"` } + +func (c *Configuration) Build() (shared.StoragePlugin, error) { + client := plugin.NewClient(&plugin.ClientConfig{ + HandshakeConfig: shared.Handshake, + VersionedPlugins: map[int]plugin.PluginSet{ + 1: shared.PluginMap, + }, + Cmd: exec.Command(c.PluginBinary, "--config", c.PluginConfigurationFile), + AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC}, + Logger: hclog.New(&hclog.LoggerOptions{ + Level: hclog.Warn, + }), + }) + + runtime.SetFinalizer(client, func(c *plugin.Client) { + c.Kill() + }) + + rpcClient, err := client.Client() + if err != nil { + return nil, fmt.Errorf("error attempting to connect to plugin rpc client: %s", err) + } + + raw, err := rpcClient.Dispense(shared.StoragePluginIdentifier) + if err != nil { + return nil, fmt.Errorf("unable to retrieve storage plugin instance: %s", err) + } + + storagePlugin, ok := raw.(shared.StoragePlugin) + if !ok { + return nil, fmt.Errorf("unexpected type for plugin \"%s\"", shared.StoragePluginIdentifier) + } + + return storagePlugin, nil +} + +type PluginBuilder interface { + Build() (shared.StoragePlugin, error) +} \ No newline at end of file diff --git a/plugin/storage/grpc/factory.go b/plugin/storage/grpc/factory.go index 4a316441134..29a928f4e56 100644 --- a/plugin/storage/grpc/factory.go +++ b/plugin/storage/grpc/factory.go @@ -16,6 +16,8 @@ package grpc import ( "flag" + "github.com/jaegertracing/jaeger/pkg/grpc/config" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" "github.com/jaegertracing/jaeger/storage/dependencystore" "github.com/spf13/viper" @@ -29,7 +31,10 @@ type Factory struct { options Options metricsFactory metrics.Factory logger *zap.Logger - store *Store + + builder config.PluginBuilder + + store shared.StoragePlugin } // NewFactory creates a new Factory. @@ -45,17 +50,20 @@ func (f *Factory) AddFlags(flagSet *flag.FlagSet) { // InitFromViper implements plugin.Configurable func (f *Factory) InitFromViper(v *viper.Viper) { f.options.InitFromViper(v) + f.builder = &f.options.Configuration } // Initialize implements storage.Factory func (f *Factory) Initialize(metricsFactory metrics.Factory, logger *zap.Logger) error { f.metricsFactory, f.logger = metricsFactory, logger - store, err := WithConfiguration(f.options.Configuration) + + store, err := f.builder.Build() if err != nil { return err } + f.store = store - logger.Info("External plugin storage configuration", zap.Any("configuration", f.store.config)) + logger.Info("External plugin storage configuration", zap.Any("configuration", f.options.Configuration)) return nil } @@ -71,5 +79,5 @@ func (f *Factory) CreateSpanWriter() (spanstore.Writer, error) { // CreateDependencyReader implements storage.Factory func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error) { - return nil, nil + return f.store, nil } diff --git a/plugin/storage/grpc/factory_test.go b/plugin/storage/grpc/factory_test.go new file mode 100644 index 00000000000..613fab54b01 --- /dev/null +++ b/plugin/storage/grpc/factory_test.go @@ -0,0 +1,105 @@ +package grpc + +import ( + "context" + "errors" + "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" + "github.com/jaegertracing/jaeger/storage/spanstore" + "github.com/spf13/viper" + "github.com/uber/jaeger-lib/metrics" + "go.uber.org/zap" + "testing" + "time" + + "github.com/jaegertracing/jaeger/pkg/config" + "github.com/jaegertracing/jaeger/storage" + "github.com/stretchr/testify/assert" +) + +var _ storage.Factory = new(Factory) + +type mockPluginBuilder struct { + plugin *mockPlugin + err error +} + +func (b *mockPluginBuilder) Build() (shared.StoragePlugin, error) { + if b.err != nil { + return nil, b.err + } + return b.plugin, nil +} + +type mockPlugin struct { + +} + +func (*mockPlugin) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { + panic("implement me") +} + +func (*mockPlugin) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) { + panic("implement me") +} + +func (*mockPlugin) GetServices(ctx context.Context) ([]string, error) { + panic("implement me") +} + +func (*mockPlugin) GetOperations(ctx context.Context, service string) ([]string, error) { + panic("implement me") +} + +func (*mockPlugin) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error) { + panic("implement me") +} + +func (*mockPlugin) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error) { + panic("implement me") +} + +func (*mockPlugin) WriteSpan(span *model.Span) error { + panic("implement me") +} + +func TestGRPCStorageFactory(t *testing.T) { + f := NewFactory() + v := viper.New() + f.InitFromViper(v) + + // after InitFromViper, f.builder points to a real plugin builder that will fail in unit tests, + // so we override it with a mock. + f.builder = &mockPluginBuilder{ + err: errors.New("made-up error"), + } + assert.EqualError(t, f.Initialize(metrics.NullFactory, zap.NewNop()), "made-up error") + + f.builder = &mockPluginBuilder{ + plugin: &mockPlugin{}, + } + assert.NoError(t, f.Initialize(metrics.NullFactory, zap.NewNop())) + + assert.NotNil(t, f.store) + reader, err := f.CreateSpanReader() + assert.NoError(t, err) + assert.Equal(t, f.store, reader) + writer, err := f.CreateSpanWriter() + assert.NoError(t, err) + assert.Equal(t, f.store, writer) + depReader, err := f.CreateDependencyReader() + assert.NoError(t, err) + assert.Equal(t, f.store, depReader) +} + +func TestWithConfiguration(t *testing.T) { + f := NewFactory() + v, command := config.Viperize(f.AddFlags) + command.ParseFlags([]string{ + "--grpc-storage-plugin.binary=noop-grpc-plugin", + "--grpc-storage-plugin.configuration-file=config.json", + }) + f.InitFromViper(v) + assert.Equal(t, f.options.Configuration.PluginBinary, "noop-grpc-plugin") + assert.Equal(t, f.options.Configuration.PluginConfigurationFile, "config.json") +} diff --git a/plugin/storage/grpc/options_test.go b/plugin/storage/grpc/options_test.go new file mode 100644 index 00000000000..225849d6891 --- /dev/null +++ b/plugin/storage/grpc/options_test.go @@ -0,0 +1,22 @@ +package grpc + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/jaegertracing/jaeger/pkg/config" +) + +func TestOptionsWithFlags(t *testing.T) { + opts := &Options{} + v, command := config.Viperize(opts.AddFlags) + command.ParseFlags([]string{ + "--grpc-storage-plugin.binary=noop-grpc-plugin", + "--grpc-storage-plugin.configuration-file=config.json", + }) + opts.InitFromViper(v) + + assert.Equal(t, opts.Configuration.PluginBinary, "noop-grpc-plugin") + assert.Equal(t, opts.Configuration.PluginConfigurationFile, "config.json") +} diff --git a/plugin/storage/grpc/plugin.go b/plugin/storage/grpc/plugin.go index 7c0ed4f38b8..34da046953b 100644 --- a/plugin/storage/grpc/plugin.go +++ b/plugin/storage/grpc/plugin.go @@ -16,16 +16,11 @@ package grpc import ( "context" - "fmt" - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-plugin" - "os/exec" - "runtime" - "github.com/jaegertracing/jaeger/model" "github.com/jaegertracing/jaeger/pkg/grpc/config" "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" "github.com/jaegertracing/jaeger/storage/spanstore" + "time" ) type Store struct { @@ -34,45 +29,6 @@ type Store struct { plugin shared.StoragePlugin } -// WithConfiguration creates a new plugin given the provided configuration -func WithConfiguration(configuration config.Configuration) (*Store, error) { - client := plugin.NewClient(&plugin.ClientConfig{ - HandshakeConfig: shared.Handshake, - VersionedPlugins: map[int]plugin.PluginSet{ - 1: shared.PluginMap, - }, - Cmd: exec.Command(configuration.PluginBinary, "--config", configuration.PluginConfigurationFile), - AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC}, - Logger: hclog.New(&hclog.LoggerOptions{ - Level: hclog.Warn, - }), - }) - - runtime.SetFinalizer(client, func(c *plugin.Client) { - c.Kill() - }) - - rpcClient, err := client.Client() - if err != nil { - return nil, fmt.Errorf("error attempting to connect to plugin rpc client: %s", err) - } - - raw, err := rpcClient.Dispense(shared.StoragePluginIdentifier) - if err != nil { - return nil, fmt.Errorf("unable to retrieve storage plugin instance: %s", err) - } - - storagePlugin, ok := raw.(shared.StoragePlugin) - if !ok { - return nil, fmt.Errorf("unexpected type for plugin \"%s\"", shared.StoragePluginIdentifier) - } - - return &Store{ - config: configuration, - plugin: storagePlugin, - }, nil -} - func (s *Store) WriteSpan(span *model.Span) error { return s.plugin.WriteSpan(span) } @@ -97,6 +53,6 @@ func (s *Store) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryPar return s.plugin.FindTraceIDs(ctx, query) } -//func (s *Store) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { -// return s.plugin.GetDependencies(endTs, lookback) -//} +func (s *Store) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { + return s.plugin.GetDependencies(endTs, lookback) +} diff --git a/plugin/storage/grpc/proto/storage.pb.go b/plugin/storage/grpc/proto/storage.pb.go index cbe9ac0e3a1..480cb5669ce 100644 --- a/plugin/storage/grpc/proto/storage.pb.go +++ b/plugin/storage/grpc/proto/storage.pb.go @@ -8,6 +8,9 @@ storage.proto It has these top-level messages: + GetDependenciesRequest + GetDependenciesSuccess + GetDependenciesResponse WriteSpanRequest WriteSpanResponse GetTraceRequest @@ -40,8 +43,8 @@ import jaeger_api_v2 "github.com/jaegertracing/jaeger/model" import _ "github.com/gogo/protobuf/types" import _ "github.com/gogo/protobuf/types" -import github_com_jaegertracing_jaeger_model "github.com/jaegertracing/jaeger/model" import time "time" +import github_com_jaegertracing_jaeger_model "github.com/jaegertracing/jaeger/model" import context "golang.org/x/net/context" import grpc "google.golang.org/grpc" @@ -63,6 +66,162 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto1.GoGoProtoPackageIsVersion2 // please upgrade the proto package +type GetDependenciesRequest struct { + EndTimestamp time.Time `protobuf:"bytes,1,opt,name=end_timestamp,json=endTimestamp,stdtime" json:"end_timestamp"` + Lookback time.Duration `protobuf:"bytes,2,opt,name=lookback,stdduration" json:"lookback"` +} + +func (m *GetDependenciesRequest) Reset() { *m = GetDependenciesRequest{} } +func (m *GetDependenciesRequest) String() string { return proto1.CompactTextString(m) } +func (*GetDependenciesRequest) ProtoMessage() {} +func (*GetDependenciesRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{0} } + +func (m *GetDependenciesRequest) GetEndTimestamp() time.Time { + if m != nil { + return m.EndTimestamp + } + return time.Time{} +} + +func (m *GetDependenciesRequest) GetLookback() time.Duration { + if m != nil { + return m.Lookback + } + return 0 +} + +type GetDependenciesSuccess struct { + Dependencies []github_com_jaegertracing_jaeger_model.DependencyLink `protobuf:"bytes,1,rep,name=dependencies,customtype=github.com/jaegertracing/jaeger/model.DependencyLink" json:"dependencies"` +} + +func (m *GetDependenciesSuccess) Reset() { *m = GetDependenciesSuccess{} } +func (m *GetDependenciesSuccess) String() string { return proto1.CompactTextString(m) } +func (*GetDependenciesSuccess) ProtoMessage() {} +func (*GetDependenciesSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{1} } + +type GetDependenciesResponse struct { + // Types that are valid to be assigned to Response: + // *GetDependenciesResponse_Success + // *GetDependenciesResponse_Error + Response isGetDependenciesResponse_Response `protobuf_oneof:"response"` +} + +func (m *GetDependenciesResponse) Reset() { *m = GetDependenciesResponse{} } +func (m *GetDependenciesResponse) String() string { return proto1.CompactTextString(m) } +func (*GetDependenciesResponse) ProtoMessage() {} +func (*GetDependenciesResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{2} } + +type isGetDependenciesResponse_Response interface { + isGetDependenciesResponse_Response() + MarshalTo([]byte) (int, error) + Size() int +} + +type GetDependenciesResponse_Success struct { + Success *GetDependenciesSuccess `protobuf:"bytes,1,opt,name=success,oneof"` +} +type GetDependenciesResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*GetDependenciesResponse_Success) isGetDependenciesResponse_Response() {} +func (*GetDependenciesResponse_Error) isGetDependenciesResponse_Response() {} + +func (m *GetDependenciesResponse) GetResponse() isGetDependenciesResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *GetDependenciesResponse) GetSuccess() *GetDependenciesSuccess { + if x, ok := m.GetResponse().(*GetDependenciesResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *GetDependenciesResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*GetDependenciesResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*GetDependenciesResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _GetDependenciesResponse_OneofMarshaler, _GetDependenciesResponse_OneofUnmarshaler, _GetDependenciesResponse_OneofSizer, []interface{}{ + (*GetDependenciesResponse_Success)(nil), + (*GetDependenciesResponse_Error)(nil), + } +} + +func _GetDependenciesResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*GetDependenciesResponse) + // response + switch x := m.Response.(type) { + case *GetDependenciesResponse_Success: + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *GetDependenciesResponse_Error: + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("GetDependenciesResponse.Response has unexpected type %T", x) + } + return nil +} + +func _GetDependenciesResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*GetDependenciesResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(GetDependenciesSuccess) + err := b.DecodeMessage(msg) + m.Response = &GetDependenciesResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &GetDependenciesResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _GetDependenciesResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*GetDependenciesResponse) + // response + switch x := m.Response.(type) { + case *GetDependenciesResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *GetDependenciesResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + type WriteSpanRequest struct { Span *jaeger_api_v2.Span `protobuf:"bytes,1,opt,name=span" json:"span,omitempty"` } @@ -70,7 +229,7 @@ type WriteSpanRequest struct { func (m *WriteSpanRequest) Reset() { *m = WriteSpanRequest{} } func (m *WriteSpanRequest) String() string { return proto1.CompactTextString(m) } func (*WriteSpanRequest) ProtoMessage() {} -func (*WriteSpanRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{0} } +func (*WriteSpanRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{3} } func (m *WriteSpanRequest) GetSpan() *jaeger_api_v2.Span { if m != nil { @@ -89,7 +248,7 @@ type WriteSpanResponse struct { func (m *WriteSpanResponse) Reset() { *m = WriteSpanResponse{} } func (m *WriteSpanResponse) String() string { return proto1.CompactTextString(m) } func (*WriteSpanResponse) ProtoMessage() {} -func (*WriteSpanResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{1} } +func (*WriteSpanResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{4} } type isWriteSpanResponse_Response interface { isWriteSpanResponse_Response() @@ -209,7 +368,7 @@ type GetTraceRequest struct { func (m *GetTraceRequest) Reset() { *m = GetTraceRequest{} } func (m *GetTraceRequest) String() string { return proto1.CompactTextString(m) } func (*GetTraceRequest) ProtoMessage() {} -func (*GetTraceRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{2} } +func (*GetTraceRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{5} } type GetTraceSuccess struct { Trace *jaeger_api_v2.Trace `protobuf:"bytes,1,opt,name=trace" json:"trace,omitempty"` @@ -218,7 +377,7 @@ type GetTraceSuccess struct { func (m *GetTraceSuccess) Reset() { *m = GetTraceSuccess{} } func (m *GetTraceSuccess) String() string { return proto1.CompactTextString(m) } func (*GetTraceSuccess) ProtoMessage() {} -func (*GetTraceSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{3} } +func (*GetTraceSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{6} } func (m *GetTraceSuccess) GetTrace() *jaeger_api_v2.Trace { if m != nil { @@ -237,7 +396,7 @@ type GetTraceResponse struct { func (m *GetTraceResponse) Reset() { *m = GetTraceResponse{} } func (m *GetTraceResponse) String() string { return proto1.CompactTextString(m) } func (*GetTraceResponse) ProtoMessage() {} -func (*GetTraceResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{4} } +func (*GetTraceResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{7} } type isGetTraceResponse_Response interface { isGetTraceResponse_Response() @@ -356,7 +515,7 @@ type GetServicesRequest struct { func (m *GetServicesRequest) Reset() { *m = GetServicesRequest{} } func (m *GetServicesRequest) String() string { return proto1.CompactTextString(m) } func (*GetServicesRequest) ProtoMessage() {} -func (*GetServicesRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{5} } +func (*GetServicesRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{8} } type GetServicesSuccess struct { Services []string `protobuf:"bytes,1,rep,name=services" json:"services,omitempty"` @@ -365,7 +524,7 @@ type GetServicesSuccess struct { func (m *GetServicesSuccess) Reset() { *m = GetServicesSuccess{} } func (m *GetServicesSuccess) String() string { return proto1.CompactTextString(m) } func (*GetServicesSuccess) ProtoMessage() {} -func (*GetServicesSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{6} } +func (*GetServicesSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{9} } func (m *GetServicesSuccess) GetServices() []string { if m != nil { @@ -384,7 +543,7 @@ type GetServicesResponse struct { func (m *GetServicesResponse) Reset() { *m = GetServicesResponse{} } func (m *GetServicesResponse) String() string { return proto1.CompactTextString(m) } func (*GetServicesResponse) ProtoMessage() {} -func (*GetServicesResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{7} } +func (*GetServicesResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{10} } type isGetServicesResponse_Response interface { isGetServicesResponse_Response() @@ -504,7 +663,7 @@ type GetOperationsRequest struct { func (m *GetOperationsRequest) Reset() { *m = GetOperationsRequest{} } func (m *GetOperationsRequest) String() string { return proto1.CompactTextString(m) } func (*GetOperationsRequest) ProtoMessage() {} -func (*GetOperationsRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{8} } +func (*GetOperationsRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{11} } func (m *GetOperationsRequest) GetService() string { if m != nil { @@ -520,7 +679,7 @@ type GetOperationsSuccess struct { func (m *GetOperationsSuccess) Reset() { *m = GetOperationsSuccess{} } func (m *GetOperationsSuccess) String() string { return proto1.CompactTextString(m) } func (*GetOperationsSuccess) ProtoMessage() {} -func (*GetOperationsSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{9} } +func (*GetOperationsSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{12} } func (m *GetOperationsSuccess) GetOperations() []string { if m != nil { @@ -539,7 +698,7 @@ type GetOperationsResponse struct { func (m *GetOperationsResponse) Reset() { *m = GetOperationsResponse{} } func (m *GetOperationsResponse) String() string { return proto1.CompactTextString(m) } func (*GetOperationsResponse) ProtoMessage() {} -func (*GetOperationsResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{10} } +func (*GetOperationsResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{13} } type isGetOperationsResponse_Response interface { isGetOperationsResponse_Response() @@ -666,7 +825,7 @@ type TraceQueryParameters struct { func (m *TraceQueryParameters) Reset() { *m = TraceQueryParameters{} } func (m *TraceQueryParameters) String() string { return proto1.CompactTextString(m) } func (*TraceQueryParameters) ProtoMessage() {} -func (*TraceQueryParameters) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{11} } +func (*TraceQueryParameters) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{14} } func (m *TraceQueryParameters) GetServiceName() string { if m != nil { @@ -731,7 +890,7 @@ type FindTracesRequest struct { func (m *FindTracesRequest) Reset() { *m = FindTracesRequest{} } func (m *FindTracesRequest) String() string { return proto1.CompactTextString(m) } func (*FindTracesRequest) ProtoMessage() {} -func (*FindTracesRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{12} } +func (*FindTracesRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{15} } func (m *FindTracesRequest) GetQuery() *TraceQueryParameters { if m != nil { @@ -747,7 +906,7 @@ type FindTracesSuccess struct { func (m *FindTracesSuccess) Reset() { *m = FindTracesSuccess{} } func (m *FindTracesSuccess) String() string { return proto1.CompactTextString(m) } func (*FindTracesSuccess) ProtoMessage() {} -func (*FindTracesSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{13} } +func (*FindTracesSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{16} } func (m *FindTracesSuccess) GetTraces() []*jaeger_api_v2.Trace { if m != nil { @@ -766,7 +925,7 @@ type FindTracesResponse struct { func (m *FindTracesResponse) Reset() { *m = FindTracesResponse{} } func (m *FindTracesResponse) String() string { return proto1.CompactTextString(m) } func (*FindTracesResponse) ProtoMessage() {} -func (*FindTracesResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{14} } +func (*FindTracesResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{17} } type isFindTracesResponse_Response interface { isFindTracesResponse_Response() @@ -886,7 +1045,7 @@ type FindTraceIDsRequest struct { func (m *FindTraceIDsRequest) Reset() { *m = FindTraceIDsRequest{} } func (m *FindTraceIDsRequest) String() string { return proto1.CompactTextString(m) } func (*FindTraceIDsRequest) ProtoMessage() {} -func (*FindTraceIDsRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{15} } +func (*FindTraceIDsRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{18} } func (m *FindTraceIDsRequest) GetQuery() *TraceQueryParameters { if m != nil { @@ -902,7 +1061,7 @@ type FindTraceIDsSuccess struct { func (m *FindTraceIDsSuccess) Reset() { *m = FindTraceIDsSuccess{} } func (m *FindTraceIDsSuccess) String() string { return proto1.CompactTextString(m) } func (*FindTraceIDsSuccess) ProtoMessage() {} -func (*FindTraceIDsSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{16} } +func (*FindTraceIDsSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{19} } type FindTraceIDsResponse struct { // Types that are valid to be assigned to Response: @@ -914,7 +1073,7 @@ type FindTraceIDsResponse struct { func (m *FindTraceIDsResponse) Reset() { *m = FindTraceIDsResponse{} } func (m *FindTraceIDsResponse) String() string { return proto1.CompactTextString(m) } func (*FindTraceIDsResponse) ProtoMessage() {} -func (*FindTraceIDsResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{17} } +func (*FindTraceIDsResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{20} } type isFindTraceIDsResponse_Response interface { isFindTraceIDsResponse_Response() @@ -1033,7 +1192,7 @@ type EmptyResponse struct { func (m *EmptyResponse) Reset() { *m = EmptyResponse{} } func (m *EmptyResponse) String() string { return proto1.CompactTextString(m) } func (*EmptyResponse) ProtoMessage() {} -func (*EmptyResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{18} } +func (*EmptyResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{21} } type StoragePluginError struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` @@ -1042,7 +1201,7 @@ type StoragePluginError struct { func (m *StoragePluginError) Reset() { *m = StoragePluginError{} } func (m *StoragePluginError) String() string { return proto1.CompactTextString(m) } func (*StoragePluginError) ProtoMessage() {} -func (*StoragePluginError) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{19} } +func (*StoragePluginError) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{22} } func (m *StoragePluginError) GetMessage() string { if m != nil { @@ -1052,6 +1211,12 @@ func (m *StoragePluginError) GetMessage() string { } func init() { + proto1.RegisterType((*GetDependenciesRequest)(nil), "jaeger.api_v2.GetDependenciesRequest") + golang_proto.RegisterType((*GetDependenciesRequest)(nil), "jaeger.api_v2.GetDependenciesRequest") + proto1.RegisterType((*GetDependenciesSuccess)(nil), "jaeger.api_v2.GetDependenciesSuccess") + golang_proto.RegisterType((*GetDependenciesSuccess)(nil), "jaeger.api_v2.GetDependenciesSuccess") + proto1.RegisterType((*GetDependenciesResponse)(nil), "jaeger.api_v2.GetDependenciesResponse") + golang_proto.RegisterType((*GetDependenciesResponse)(nil), "jaeger.api_v2.GetDependenciesResponse") proto1.RegisterType((*WriteSpanRequest)(nil), "jaeger.api_v2.WriteSpanRequest") golang_proto.RegisterType((*WriteSpanRequest)(nil), "jaeger.api_v2.WriteSpanRequest") proto1.RegisterType((*WriteSpanResponse)(nil), "jaeger.api_v2.WriteSpanResponse") @@ -1105,6 +1270,10 @@ const _ = grpc.SupportPackageIsVersion4 // Client API for StoragePlugin service type StoragePluginClient interface { + // dependencystore/Writer + // rpc WriteDependencies(WriteDependenciesRequest) returns (WriteDependenciesResponse); + // dependencystore/Reader + GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) // spanstore/Writer WriteSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) // spanstore/Reader @@ -1123,6 +1292,15 @@ func NewStoragePluginClient(cc *grpc.ClientConn) StoragePluginClient { return &storagePluginClient{cc} } +func (c *storagePluginClient) GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) { + out := new(GetDependenciesResponse) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/GetDependencies", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *storagePluginClient) WriteSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) { out := new(WriteSpanResponse) err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/WriteSpan", in, out, c.cc, opts...) @@ -1180,6 +1358,10 @@ func (c *storagePluginClient) FindTraceIDs(ctx context.Context, in *FindTraceIDs // Server API for StoragePlugin service type StoragePluginServer interface { + // dependencystore/Writer + // rpc WriteDependencies(WriteDependenciesRequest) returns (WriteDependenciesResponse); + // dependencystore/Reader + GetDependencies(context.Context, *GetDependenciesRequest) (*GetDependenciesResponse, error) // spanstore/Writer WriteSpan(context.Context, *WriteSpanRequest) (*WriteSpanResponse, error) // spanstore/Reader @@ -1194,6 +1376,24 @@ func RegisterStoragePluginServer(s *grpc.Server, srv StoragePluginServer) { s.RegisterService(&_StoragePlugin_serviceDesc, srv) } +func _StoragePlugin_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 interceptor == nil { + return srv.(StoragePluginServer).GetDependencies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.StoragePlugin/GetDependencies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).GetDependencies(ctx, req.(*GetDependenciesRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _StoragePlugin_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 { @@ -1306,6 +1506,10 @@ var _StoragePlugin_serviceDesc = grpc.ServiceDesc{ ServiceName: "jaeger.api_v2.StoragePlugin", HandlerType: (*StoragePluginServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "GetDependencies", + Handler: _StoragePlugin_GetDependencies_Handler, + }, { MethodName: "WriteSpan", Handler: _StoragePlugin_WriteSpan_Handler, @@ -1335,6 +1539,123 @@ var _StoragePlugin_serviceDesc = grpc.ServiceDesc{ Metadata: "storage.proto", } +func (m *GetDependenciesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDependenciesRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdTime(m.EndTimestamp))) + n1, err := types.StdTimeMarshalTo(m.EndTimestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdDuration(m.Lookback))) + n2, err := types.StdDurationMarshalTo(m.Lookback, dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + return i, nil +} + +func (m *GetDependenciesSuccess) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDependenciesSuccess) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Dependencies) > 0 { + for _, msg := range m.Dependencies { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *GetDependenciesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDependenciesResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Response != nil { + nn3, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn3 + } + return i, nil +} + +func (m *GetDependenciesResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Success != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n4, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} +func (m *GetDependenciesResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Error != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n5, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} func (m *WriteSpanRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1354,11 +1675,11 @@ func (m *WriteSpanRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintStorage(dAtA, i, uint64(m.Span.Size())) - n1, err := m.Span.MarshalTo(dAtA[i:]) + n6, err := m.Span.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n1 + i += n6 } return i, nil } @@ -1379,11 +1700,11 @@ func (m *WriteSpanResponse) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if m.Response != nil { - nn2, err := m.Response.MarshalTo(dAtA[i:]) + nn7, err := m.Response.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn2 + i += nn7 } return i, nil } @@ -1394,11 +1715,11 @@ func (m *WriteSpanResponse_Success) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) - n3, err := m.Success.MarshalTo(dAtA[i:]) + n8, err := m.Success.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n3 + i += n8 } return i, nil } @@ -1408,11 +1729,11 @@ func (m *WriteSpanResponse_Error) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) - n4, err := m.Error.MarshalTo(dAtA[i:]) + n9, err := m.Error.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n4 + i += n9 } return i, nil } @@ -1434,11 +1755,11 @@ func (m *GetTraceRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintStorage(dAtA, i, uint64(m.TraceID.Size())) - n5, err := m.TraceID.MarshalTo(dAtA[i:]) + n10, err := m.TraceID.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n5 + i += n10 return i, nil } @@ -1461,11 +1782,11 @@ func (m *GetTraceSuccess) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintStorage(dAtA, i, uint64(m.Trace.Size())) - n6, err := m.Trace.MarshalTo(dAtA[i:]) + n11, err := m.Trace.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n6 + i += n11 } return i, nil } @@ -1486,11 +1807,11 @@ func (m *GetTraceResponse) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if m.Response != nil { - nn7, err := m.Response.MarshalTo(dAtA[i:]) + nn12, err := m.Response.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn7 + i += nn12 } return i, nil } @@ -1501,11 +1822,11 @@ func (m *GetTraceResponse_Success) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) - n8, err := m.Success.MarshalTo(dAtA[i:]) + n13, err := m.Success.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n8 + i += n13 } return i, nil } @@ -1515,11 +1836,11 @@ func (m *GetTraceResponse_Error) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) - n9, err := m.Error.MarshalTo(dAtA[i:]) + n14, err := m.Error.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n14 } return i, nil } @@ -1590,11 +1911,11 @@ func (m *GetServicesResponse) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if m.Response != nil { - nn10, err := m.Response.MarshalTo(dAtA[i:]) + nn15, err := m.Response.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn10 + i += nn15 } return i, nil } @@ -1605,11 +1926,11 @@ func (m *GetServicesResponse_Success) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) - n11, err := m.Success.MarshalTo(dAtA[i:]) + n16, err := m.Success.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n16 } return i, nil } @@ -1619,11 +1940,11 @@ func (m *GetServicesResponse_Error) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) - n12, err := m.Error.MarshalTo(dAtA[i:]) + n17, err := m.Error.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n17 } return i, nil } @@ -1700,11 +2021,11 @@ func (m *GetOperationsResponse) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if m.Response != nil { - nn13, err := m.Response.MarshalTo(dAtA[i:]) + nn18, err := m.Response.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn13 + i += nn18 } return i, nil } @@ -1715,11 +2036,11 @@ func (m *GetOperationsResponse_Success) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) - n14, err := m.Success.MarshalTo(dAtA[i:]) + n19, err := m.Success.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n19 } return i, nil } @@ -1729,11 +2050,11 @@ func (m *GetOperationsResponse_Error) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) - n15, err := m.Error.MarshalTo(dAtA[i:]) + n20, err := m.Error.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n20 } return i, nil } @@ -1784,35 +2105,35 @@ func (m *TraceQueryParameters) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdTime(m.StartTimeMin))) - n16, err := types.StdTimeMarshalTo(m.StartTimeMin, dAtA[i:]) + n21, err := types.StdTimeMarshalTo(m.StartTimeMin, dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n21 dAtA[i] = 0x2a i++ i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdTime(m.StartTimeMax))) - n17, err := types.StdTimeMarshalTo(m.StartTimeMax, dAtA[i:]) + n22, err := types.StdTimeMarshalTo(m.StartTimeMax, dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n22 dAtA[i] = 0x32 i++ i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdDuration(m.DurationMin))) - n18, err := types.StdDurationMarshalTo(m.DurationMin, dAtA[i:]) + n23, err := types.StdDurationMarshalTo(m.DurationMin, dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n23 dAtA[i] = 0x3a i++ i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdDuration(m.DurationMax))) - n19, err := types.StdDurationMarshalTo(m.DurationMax, dAtA[i:]) + n24, err := types.StdDurationMarshalTo(m.DurationMax, dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n24 if m.NumTraces != 0 { dAtA[i] = 0x40 i++ @@ -1840,11 +2161,11 @@ func (m *FindTracesRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintStorage(dAtA, i, uint64(m.Query.Size())) - n20, err := m.Query.MarshalTo(dAtA[i:]) + n25, err := m.Query.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n25 } return i, nil } @@ -1895,11 +2216,11 @@ func (m *FindTracesResponse) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if m.Response != nil { - nn21, err := m.Response.MarshalTo(dAtA[i:]) + nn26, err := m.Response.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn21 + i += nn26 } return i, nil } @@ -1910,11 +2231,11 @@ func (m *FindTracesResponse_Success) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) - n22, err := m.Success.MarshalTo(dAtA[i:]) + n27, err := m.Success.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n22 + i += n27 } return i, nil } @@ -1924,11 +2245,11 @@ func (m *FindTracesResponse_Error) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) - n23, err := m.Error.MarshalTo(dAtA[i:]) + n28, err := m.Error.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n23 + i += n28 } return i, nil } @@ -1951,11 +2272,11 @@ func (m *FindTraceIDsRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintStorage(dAtA, i, uint64(m.Query.Size())) - n24, err := m.Query.MarshalTo(dAtA[i:]) + n29, err := m.Query.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n24 + i += n29 } return i, nil } @@ -2006,11 +2327,11 @@ func (m *FindTraceIDsResponse) MarshalTo(dAtA []byte) (int, error) { var l int _ = l if m.Response != nil { - nn25, err := m.Response.MarshalTo(dAtA[i:]) + nn30, err := m.Response.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += nn25 + i += nn30 } return i, nil } @@ -2021,11 +2342,11 @@ func (m *FindTraceIDsResponse_Success) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) - n26, err := m.Success.MarshalTo(dAtA[i:]) + n31, err := m.Success.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n26 + i += n31 } return i, nil } @@ -2035,11 +2356,11 @@ func (m *FindTraceIDsResponse_Error) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) - n27, err := m.Error.MarshalTo(dAtA[i:]) + n32, err := m.Error.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n27 + i += n32 } return i, nil } @@ -2094,26 +2415,75 @@ func encodeVarintStorage(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return offset + 1 } -func (m *WriteSpanRequest) Size() (n int) { +func (m *GetDependenciesRequest) Size() (n int) { var l int _ = l - if m.Span != nil { - l = m.Span.Size() - n += 1 + l + sovStorage(uint64(l)) - } + l = types.SizeOfStdTime(m.EndTimestamp) + n += 1 + l + sovStorage(uint64(l)) + l = types.SizeOfStdDuration(m.Lookback) + n += 1 + l + sovStorage(uint64(l)) return n } -func (m *WriteSpanResponse) Size() (n int) { +func (m *GetDependenciesSuccess) Size() (n int) { var l int _ = l - if m.Response != nil { - n += m.Response.Size() + if len(m.Dependencies) > 0 { + for _, e := range m.Dependencies { + l = e.Size() + n += 1 + l + sovStorage(uint64(l)) + } } return n } -func (m *WriteSpanResponse_Success) Size() (n int) { +func (m *GetDependenciesResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *GetDependenciesResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetDependenciesResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *WriteSpanRequest) Size() (n int) { + var l int + _ = l + if m.Span != nil { + l = m.Span.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + +func (m *WriteSpanResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *WriteSpanResponse_Success) Size() (n int) { var l int _ = l if m.Success != nil { @@ -2430,6 +2800,312 @@ func sovStorage(x uint64) (n int) { 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 EndTimestamp", 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 > l { + return io.ErrUnexpectedEOF + } + if err := types.StdTimeUnmarshal(&m.EndTimestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Lookback", 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 > l { + return io.ErrUnexpectedEOF + } + if err := types.StdDurationUnmarshal(&m.Lookback, 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 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetDependenciesSuccess) 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: GetDependenciesSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDependenciesSuccess: 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 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 > l { + return io.ErrUnexpectedEOF + } + var v github_com_jaegertracing_jaeger_model.DependencyLink + m.Dependencies = append(m.Dependencies, v) + 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 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + 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 Success", 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 > l { + return io.ErrUnexpectedEOF + } + v := &GetDependenciesSuccess{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetDependenciesResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", 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 > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetDependenciesResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *WriteSpanRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4579,65 +5255,73 @@ func init() { proto1.RegisterFile("storage.proto", fileDescriptorStorage) } func init() { golang_proto.RegisterFile("storage.proto", fileDescriptorStorage) } var fileDescriptorStorage = []byte{ - // 953 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x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42, 0xff, 0x5c, 0xb4, 0xd0, 0x1f, - 0xff, 0xb6, 0xd0, 0xb3, 0x82, 0xec, 0xbb, 0x2b, 0xe2, 0xe7, 0x9d, 0xff, 0x02, 0x00, 0x00, 0xff, - 0xff, 0xab, 0x39, 0x5b, 0xdc, 0xba, 0x0b, 0x00, 0x00, + // 1076 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdf, 0x6e, 0x1b, 0xc5, + 0x17, 0xce, 0x26, 0x71, 0x6c, 0x1f, 0xdb, 0x6d, 0x3a, 0xf1, 0xef, 0x57, 0x63, 0x81, 0xed, 0x6c, + 0x29, 0x44, 0x88, 0xae, 0xab, 0x80, 0xa0, 0x2d, 0x2d, 0x25, 0x56, 0xd2, 0x34, 0xfc, 0x09, 0xe9, + 0x26, 0x52, 0xa5, 0x82, 0xe4, 0x4e, 0xec, 0x61, 0x59, 0xe2, 0x9d, 0x75, 0x77, 0x66, 0xa3, 0x98, + 0xa7, 0xe0, 0x02, 0x24, 0x10, 0x42, 0x5c, 0x94, 0x07, 0xe1, 0xb2, 0x97, 0x5c, 0x73, 0x11, 0x50, + 0xb8, 0xe5, 0x21, 0xd0, 0xce, 0xce, 0x6c, 0xbc, 0xe3, 0xd8, 0x2d, 0x11, 0xbe, 0xda, 0x9d, 0x99, + 0xef, 0x7c, 0x73, 0xce, 0x77, 0xe6, 0xcc, 0x19, 0x28, 0x31, 0xee, 0x07, 0xd8, 0x21, 0x56, 0x3f, + 0xf0, 0xb9, 0x8f, 0x4a, 0x5f, 0x61, 0xe2, 0x90, 0xc0, 0xc2, 0x7d, 0xb7, 0x7d, 0xb8, 0x5a, 0x2d, + 0x3b, 0xbe, 0xe3, 0x8b, 0x95, 0x66, 0xf4, 0x17, 0x83, 0xaa, 0x05, 0xcf, 0xef, 0x92, 0x9e, 0x1c, + 0xd4, 0x1d, 0xdf, 0x77, 0x7a, 0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0xad, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x63, 0x7a, 0xfc, 0x43, + 0xe5, 0x0d, 0x00, 0x00, } diff --git a/plugin/storage/grpc/proto/storage.proto b/plugin/storage/grpc/proto/storage.proto index d81c3bbff34..dda869e98b8 100644 --- a/plugin/storage/grpc/proto/storage.proto +++ b/plugin/storage/grpc/proto/storage.proto @@ -27,61 +27,30 @@ option (gogoproto.goproto_registration) = true; // //} -//message GetDependenciesRequest { -// google.protobuf.Timestamp end_timestamp = 1; -// google.protobuf.Duration lookback = 2; -//} -// -//message GetDependenciesSuccess { -// repeated DependencyLink dependencies = 1; -//} -// -//message GetDependenciesResponse { -// oneof response { -// GetDependenciesSuccess success = 1; -// StoragePluginError error = 2; -// } -//} +message GetDependenciesRequest { + google.protobuf.Timestamp end_timestamp = 1 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false + ]; + google.protobuf.Duration lookback = 2 [ + (gogoproto.stdduration) = true, + (gogoproto.nullable) = false + ]; +} -//message InsertThroughputRequest { -// -//} -// -//message InsertThroughputResponse { -// -//} -// -//message InsertProbabilitiesAndQPSRequest { -// -//} -// -//message InsertProbabilitiesAndQPSResponse { -// -//} -// -//message GetThroughputRequest { -// -//} -// -//message GetThroughputResponse { -// -//} -// -//message GetProbabilitiesAndQPSRequest { -// -//} -// -//message GetProbabilitiesAndQPSResponse { -// -//} -// -//message GetLatestProbabilitiesRequest { -// -//} -// -//message GetLatestProbabilitiesResponse { -// -//} +message GetDependenciesSuccess { + repeated bytes dependencies = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/jaegertracing/jaeger/model.DependencyLink" + ]; +} + +message GetDependenciesResponse { + oneof response { + GetDependenciesSuccess success = 1; + StoragePluginError error = 2; + } +} message WriteSpanRequest { Span span = 1; @@ -210,7 +179,7 @@ service StoragePlugin { // dependencystore/Writer // rpc WriteDependencies(WriteDependenciesRequest) returns (WriteDependenciesResponse); // dependencystore/Reader -// rpc GetDependencies(GetDependenciesRequest) returns (GetDependenciesResponse); + rpc GetDependencies(GetDependenciesRequest) returns (GetDependenciesResponse); // TODO(olivierboucher): make theses available once the POC goes through // samplingstore/Store diff --git a/plugin/storage/grpc/shared/grpc.go b/plugin/storage/grpc/shared/grpc.go index 6a7cd74786a..be0e35e9fd4 100644 --- a/plugin/storage/grpc/shared/grpc.go +++ b/plugin/storage/grpc/shared/grpc.go @@ -17,6 +17,7 @@ package shared import ( "context" "fmt" + "time" "github.com/jaegertracing/jaeger/model" "github.com/jaegertracing/jaeger/plugin/storage/grpc/proto" @@ -151,48 +152,49 @@ func (c *GRPCClient) WriteSpan(span *model.Span) error { } } -//func (c *GRPCClient) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { -// resp, err := c.client.GetDependencies(context.Background(), &proto.GetDependenciesRequest{ -// EndTimestamp: TimeToProto(endTs), -// Lookback: DurationToProto(lookback), -// }) -// if err != nil { -// return nil, fmt.Errorf("grpc error: %s", err) -// } -// -// switch t := resp.Response.(type) { -// case *proto.GetDependenciesResponse_Success: -// return DependencyLinkSliceFromProto(t.Success.Dependencies), nil -// case *proto.GetDependenciesResponse_Error: -// return nil, fmt.Errorf("plugin error: %s", t.Error.Message) -// default: -// panic("unreachable") -// } -//} +func (c *GRPCClient) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { + resp, err := c.client.GetDependencies(context.Background(), &proto.GetDependenciesRequest{ + EndTimestamp: endTs, + Lookback: lookback, + }) + if err != nil { + return nil, fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.GetDependenciesResponse_Success: + return t.Success.Dependencies, nil + case *proto.GetDependenciesResponse_Error: + return nil, fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} type GRPCServer struct { Impl StoragePlugin } -//func (s *GRPCServer) GetDependencies(ctx context.Context, r *proto.GetDependenciesRequest) (*proto.GetDependenciesResponse, error) { -// deps, err := s.Impl.GetDependencies(TimeFromProto(r.EndTimestamp), DurationFromProto(r.Lookback)) -// if err != nil { -// return &proto.GetDependenciesResponse{ -// Response: &proto.GetDependenciesResponse_Error{ -// Error: &proto.StoragePluginError{ -// Message: err.Error(), -// }, -// }, -// }, nil -// } -// return &proto.GetDependenciesResponse{ -// Response: &proto.GetDependenciesResponse_Success{ -// Success: &proto.GetDependenciesSuccess{ -// Dependencies: DependencyLinkSliceToProto(deps), -// }, -// }, -// }, nil -//} + +func (s *GRPCServer) GetDependencies(ctx context.Context, r *proto.GetDependenciesRequest) (*proto.GetDependenciesResponse, error) { + deps, err := s.Impl.GetDependencies(r.EndTimestamp, r.Lookback) + if err != nil { + return &proto.GetDependenciesResponse{ + Response: &proto.GetDependenciesResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.GetDependenciesResponse{ + Response: &proto.GetDependenciesResponse_Success{ + Success: &proto.GetDependenciesSuccess{ + Dependencies: deps, + }, + }, + }, nil +} func (s *GRPCServer) WriteSpan(ctx context.Context, r *proto.WriteSpanRequest) (*proto.WriteSpanResponse, error) { err := s.Impl.WriteSpan(r.Span) diff --git a/plugin/storage/grpc/shared/interface.go b/plugin/storage/grpc/shared/interface.go index a2ab8c336a6..9b6ceeaff49 100644 --- a/plugin/storage/grpc/shared/interface.go +++ b/plugin/storage/grpc/shared/interface.go @@ -16,6 +16,7 @@ package shared import ( "context" + "github.com/jaegertracing/jaeger/storage/dependencystore" "github.com/hashicorp/go-plugin" "google.golang.org/grpc" @@ -42,6 +43,7 @@ var PluginMap = map[string]plugin.Plugin{ type StoragePlugin interface { spanstore.Reader spanstore.Writer + dependencystore.Reader } // This is the implementation of plugin.GRPCPlugin so we can serve/consume this. From 1a1436d7c2b331c994a12e9311ef8e23f89b1a9f Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Tue, 23 Apr 2019 18:48:30 -0400 Subject: [PATCH 11/11] Add empty test files to fix build Signed-off-by: Yuri Shkuro --- pkg/grpc/config/empty_test.go | 15 +++++++++++++++ plugin/storage/grpc/shared/empty_test.go | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 pkg/grpc/config/empty_test.go create mode 100644 plugin/storage/grpc/shared/empty_test.go diff --git a/pkg/grpc/config/empty_test.go b/pkg/grpc/config/empty_test.go new file mode 100644 index 00000000000..6e632bd9e87 --- /dev/null +++ b/pkg/grpc/config/empty_test.go @@ -0,0 +1,15 @@ +// Copyright (c) 2018 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 config diff --git a/plugin/storage/grpc/shared/empty_test.go b/plugin/storage/grpc/shared/empty_test.go new file mode 100644 index 00000000000..5f6014db2d3 --- /dev/null +++ b/plugin/storage/grpc/shared/empty_test.go @@ -0,0 +1,15 @@ +// Copyright (c) 2018 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