From 793f1d378b43a89fefd49ef2006c0c02a566378f Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:43:54 +0100 Subject: [PATCH 01/18] simple fix for #22 --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bcee0b9b..a3986ff5 100644 --- a/Makefile +++ b/Makefile @@ -14,9 +14,11 @@ protolint: gomodtidy: go mod tidy -v -generate: +generate_code: go generate ./... +generate: generate_code update-licenses + fieldalignment: go run golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@v0.4.0 -test=false $(shell go list ./... | grep -v modeldecoder/generator | grep -v test | grep -v model/modelpb) From 007123ce6de158beb0f77f91917d1b2451e08c08 Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:44:57 +0100 Subject: [PATCH 02/18] add otel_stacktrace --- model/proto/span.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/proto/span.proto b/model/proto/span.proto index df5fb4cd..34c0585a 100644 --- a/model/proto/span.proto +++ b/model/proto/span.proto @@ -41,6 +41,8 @@ message Span { repeated SpanLink links = 13; AggregatedDuration self_time = 14; double representative_count = 15; + + string otel_stacktrace = 16; } message DB { From 6c3075af477bf0fbe19ffb9a537b564942cc6551 Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:45:12 +0100 Subject: [PATCH 03/18] generate code for otel stacktrace --- model/modelpb/span.pb.go | 112 +++++++++++++++++-------------- model/modelpb/span_vtproto.pb.go | 46 +++++++++++++ 2 files changed, 107 insertions(+), 51 deletions(-) diff --git a/model/modelpb/span.pb.go b/model/modelpb/span.pb.go index e27e8e08..b7d4fcb5 100644 --- a/model/modelpb/span.pb.go +++ b/model/modelpb/span.pb.go @@ -107,6 +107,7 @@ type Span struct { Links []*SpanLink `protobuf:"bytes,13,rep,name=links,proto3" json:"links,omitempty"` SelfTime *AggregatedDuration `protobuf:"bytes,14,opt,name=self_time,json=selfTime,proto3" json:"self_time,omitempty"` RepresentativeCount float64 `protobuf:"fixed64,15,opt,name=representative_count,json=representativeCount,proto3" json:"representative_count,omitempty"` + OtelStacktrace string `protobuf:"bytes,16,opt,name=otel_stacktrace,json=otelStacktrace,proto3" json:"otel_stacktrace,omitempty"` } func (x *Span) Reset() { @@ -246,6 +247,13 @@ func (x *Span) GetRepresentativeCount() float64 { return 0 } +func (x *Span) GetOtelStacktrace() string { + if x != nil { + return x.OtelStacktrace + } + return "" +} + type DB struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -529,8 +537,8 @@ var file_span_proto_rawDesc = []byte{ 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, - 0x04, 0x0a, 0x04, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, + 0x05, 0x0a, 0x04, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x63, 0x6f, @@ -568,55 +576,57 @@ var file_span_proto_rawDesc = []byte{ 0x66, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x01, 0x52, 0x13, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, - 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x79, 0x6e, - 0x63, 0x22, 0xbf, 0x01, 0x0a, 0x02, 0x44, 0x42, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x77, 0x73, - 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, - 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x88, - 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, - 0x6b, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, - 0x74, 0x65, 0x64, 0x22, 0xa1, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x47, - 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, - 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x65, 0x12, 0x56, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x03, 0x73, 0x75, 0x6d, 0x22, 0x3e, 0x0a, 0x08, 0x53, 0x70, 0x61, 0x6e, 0x4c, 0x69, 0x6e, - 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, - 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x70, 0x61, 0x6e, 0x49, 0x64, 0x2a, 0x85, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x24, 0x0a, - 0x20, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, - 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, - 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x45, 0x58, 0x41, 0x43, - 0x54, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x4f, 0x4d, - 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, - 0x59, 0x5f, 0x53, 0x41, 0x4d, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x02, 0x42, 0x2b, 0x5a, - 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x61, 0x73, - 0x74, 0x69, 0x63, 0x2f, 0x61, 0x70, 0x6d, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6d, 0x6f, 0x64, - 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x74, 0x65, 0x6c, + 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x6f, 0x74, 0x65, 0x6c, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x22, 0xbf, 0x01, 0x0a, 0x02, 0x44, + 0x42, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, + 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, + 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0xa1, 0x01, 0x0a, + 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x8b, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x12, 0x56, + 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, + 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x73, 0x75, 0x6d, 0x22, 0x3e, + 0x0a, 0x08, 0x53, 0x70, 0x61, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x2a, 0x85, + 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, + 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, + 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, + 0x54, 0x45, 0x47, 0x59, 0x5f, 0x45, 0x58, 0x41, 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, + 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, + 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x53, 0x41, 0x4d, 0x45, 0x5f, + 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x02, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x61, 0x70, 0x6d, + 0x2d, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/model/modelpb/span_vtproto.pb.go b/model/modelpb/span_vtproto.pb.go index ed1af4c7..7d682e6e 100644 --- a/model/modelpb/span_vtproto.pb.go +++ b/model/modelpb/span_vtproto.pb.go @@ -56,6 +56,7 @@ func (m *Span) CloneVT() *Span { r.Name = m.Name r.SelfTime = m.SelfTime.CloneVT() r.RepresentativeCount = m.RepresentativeCount + r.OtelStacktrace = m.OtelStacktrace if rhs := m.Sync; rhs != nil { tmpVal := *rhs r.Sync = &tmpVal @@ -197,6 +198,15 @@ func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.OtelStacktrace) > 0 { + i -= len(m.OtelStacktrace) + copy(dAtA[i:], m.OtelStacktrace) + i = encodeVarint(dAtA, i, uint64(len(m.OtelStacktrace))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } if m.RepresentativeCount != 0 { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.RepresentativeCount)))) @@ -753,6 +763,10 @@ func (m *Span) SizeVT() (n int) { if m.RepresentativeCount != 0 { n += 9 } + l = len(m.OtelStacktrace) + if l > 0 { + n += 2 + l + sov(uint64(l)) + } n += len(m.unknownFields) return n } @@ -1368,6 +1382,38 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepresentativeCount = float64(math.Float64frombits(v)) + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OtelStacktrace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + 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 ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OtelStacktrace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) From 8a145f3aa565da28ce8ac69f53c4048081b36ddb Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:15:39 +0100 Subject: [PATCH 04/18] copy otel stacktrace to internal model --- input/otlp/traces.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/input/otlp/traces.go b/input/otlp/traces.go index 60460683..f6cb2e22 100644 --- a/input/otlp/traces.go +++ b/input/otlp/traces.go @@ -76,6 +76,7 @@ const ( attributeUrlFull = "url.full" attributeUserAgentOriginal = "user_agent.original" attributeDbElasticsearchClusterName = "db.elasticsearch.cluster.name" + attributeStackTrace = "code.stacktrace" // semconv 1.24 or laterd ) // ConsumeTracesResult contains the number of rejected spans and error message for partial success response. @@ -444,6 +445,9 @@ func TranslateTransaction( // should set this as a resource attribute (OTel) or tracer // tag (Jaeger). event.Service.Version = stringval + + case attributeStackTrace: + event.Span.OtelStacktrace = stringval default: modelpb.Labels(event.Labels).Set(k, stringval) } From 4ca15944ef7aa2eb496033e7f17af79ef833ceaa Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Wed, 22 Nov 2023 13:50:44 +0100 Subject: [PATCH 05/18] only relevant for spans not transactions --- input/otlp/traces.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/input/otlp/traces.go b/input/otlp/traces.go index f6cb2e22..ad147f34 100644 --- a/input/otlp/traces.go +++ b/input/otlp/traces.go @@ -76,7 +76,7 @@ const ( attributeUrlFull = "url.full" attributeUserAgentOriginal = "user_agent.original" attributeDbElasticsearchClusterName = "db.elasticsearch.cluster.name" - attributeStackTrace = "code.stacktrace" // semconv 1.24 or laterd + attributeStackTrace = "code.stacktrace" // semconv 1.24 or later ) // ConsumeTracesResult contains the number of rejected spans and error message for partial success response. @@ -445,9 +445,6 @@ func TranslateTransaction( // should set this as a resource attribute (OTel) or tracer // tag (Jaeger). event.Service.Version = stringval - - case attributeStackTrace: - event.Span.OtelStacktrace = stringval default: modelpb.Labels(event.Labels).Set(k, stringval) } @@ -750,6 +747,9 @@ func TranslateSpan(spanKind ptrace.SpanKind, attributes pcommon.Map, event *mode httpURL = stringval isHTTP = true + case attributeStackTrace: + event.Span.OtelStacktrace = stringval + // miscellaneous case "span.kind": // filter out case semconv.AttributePeerService: From 242cb462165cdbf27e5fd70a5880572cf38afdb0 Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Wed, 22 Nov 2023 15:53:45 +0100 Subject: [PATCH 06/18] add test --- input/otlp/traces_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/input/otlp/traces_test.go b/input/otlp/traces_test.go index 41556d0a..07209e55 100644 --- a/input/otlp/traces_test.go +++ b/input/otlp/traces_test.go @@ -1596,6 +1596,20 @@ func TestGRPCTransactionFromNodejsSDK(t *testing.T) { }) } +func TestSpanCodeStacktrace(t *testing.T) { + test := func(t *testing.T, expected string, attrs map[string]interface{}) { + t.Helper() + event := transformSpanWithAttributes(t, attrs) + assert.Equal(t, expected, event.Span.OtelStacktrace) + } + + t.Run("code stacktrace", func(t *testing.T) { + test(t, "stacktrace value", map[string]interface{}{ + "code.stacktrace": "stacktrace value", + }) + }) +} + func testJaegerLogs() []jaegermodel.Log { return []jaegermodel.Log{{ // errors that can be converted to elastic errors From a3cf3c13768104c2ac137bb100edf0c7f676ad77 Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Wed, 22 Nov 2023 16:29:45 +0100 Subject: [PATCH 07/18] go with a sub-object for span.code.stacktrace --- input/otlp/traces.go | 5 +- input/otlp/traces_test.go | 9 +- model/modelpb/span.pb.go | 252 +++++++++++++++++++------------ model/modelpb/span_vtproto.pb.go | 201 ++++++++++++++++++++++-- model/proto/span.proto | 6 +- 5 files changed, 361 insertions(+), 112 deletions(-) diff --git a/input/otlp/traces.go b/input/otlp/traces.go index ad147f34..47256bd6 100644 --- a/input/otlp/traces.go +++ b/input/otlp/traces.go @@ -748,7 +748,10 @@ func TranslateSpan(spanKind ptrace.SpanKind, attributes pcommon.Map, event *mode isHTTP = true case attributeStackTrace: - event.Span.OtelStacktrace = stringval + if event.Span.Code == nil { + event.Span.Code = modelpb.CodeFromVTPool() + } + event.Span.Code.Stacktrace = stringval // miscellaneous case "span.kind": // filter out diff --git a/input/otlp/traces_test.go b/input/otlp/traces_test.go index 07209e55..add7d8d1 100644 --- a/input/otlp/traces_test.go +++ b/input/otlp/traces_test.go @@ -1597,16 +1597,11 @@ func TestGRPCTransactionFromNodejsSDK(t *testing.T) { } func TestSpanCodeStacktrace(t *testing.T) { - test := func(t *testing.T, expected string, attrs map[string]interface{}) { - t.Helper() - event := transformSpanWithAttributes(t, attrs) - assert.Equal(t, expected, event.Span.OtelStacktrace) - } - t.Run("code stacktrace", func(t *testing.T) { - test(t, "stacktrace value", map[string]interface{}{ + event := transformSpanWithAttributes(t, map[string]interface{}{ "code.stacktrace": "stacktrace value", }) + assert.Equal(t, "stacktrace value", event.Span.Code.Stacktrace) }) } diff --git a/model/modelpb/span.pb.go b/model/modelpb/span.pb.go index b7d4fcb5..f3e53ee1 100644 --- a/model/modelpb/span.pb.go +++ b/model/modelpb/span.pb.go @@ -107,7 +107,7 @@ type Span struct { Links []*SpanLink `protobuf:"bytes,13,rep,name=links,proto3" json:"links,omitempty"` SelfTime *AggregatedDuration `protobuf:"bytes,14,opt,name=self_time,json=selfTime,proto3" json:"self_time,omitempty"` RepresentativeCount float64 `protobuf:"fixed64,15,opt,name=representative_count,json=representativeCount,proto3" json:"representative_count,omitempty"` - OtelStacktrace string `protobuf:"bytes,16,opt,name=otel_stacktrace,json=otelStacktrace,proto3" json:"otel_stacktrace,omitempty"` + Code *Code `protobuf:"bytes,16,opt,name=code,proto3" json:"code,omitempty"` } func (x *Span) Reset() { @@ -247,9 +247,56 @@ func (x *Span) GetRepresentativeCount() float64 { return 0 } -func (x *Span) GetOtelStacktrace() string { +func (x *Span) GetCode() *Code { if x != nil { - return x.OtelStacktrace + return x.Code + } + return nil +} + +type Code struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stacktrace string `protobuf:"bytes,1,opt,name=stacktrace,proto3" json:"stacktrace,omitempty"` +} + +func (x *Code) Reset() { + *x = Code{} + if protoimpl.UnsafeEnabled { + mi := &file_span_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Code) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Code) ProtoMessage() {} + +func (x *Code) ProtoReflect() protoreflect.Message { + mi := &file_span_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Code.ProtoReflect.Descriptor instead. +func (*Code) Descriptor() ([]byte, []int) { + return file_span_proto_rawDescGZIP(), []int{1} +} + +func (x *Code) GetStacktrace() string { + if x != nil { + return x.Stacktrace } return "" } @@ -270,7 +317,7 @@ type DB struct { func (x *DB) Reset() { *x = DB{} if protoimpl.UnsafeEnabled { - mi := &file_span_proto_msgTypes[1] + mi := &file_span_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -283,7 +330,7 @@ func (x *DB) String() string { func (*DB) ProtoMessage() {} func (x *DB) ProtoReflect() protoreflect.Message { - mi := &file_span_proto_msgTypes[1] + mi := &file_span_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -296,7 +343,7 @@ func (x *DB) ProtoReflect() protoreflect.Message { // Deprecated: Use DB.ProtoReflect.Descriptor instead. func (*DB) Descriptor() ([]byte, []int) { - return file_span_proto_rawDescGZIP(), []int{1} + return file_span_proto_rawDescGZIP(), []int{2} } func (x *DB) GetRowsAffected() uint32 { @@ -355,7 +402,7 @@ type DestinationService struct { func (x *DestinationService) Reset() { *x = DestinationService{} if protoimpl.UnsafeEnabled { - mi := &file_span_proto_msgTypes[2] + mi := &file_span_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -368,7 +415,7 @@ func (x *DestinationService) String() string { func (*DestinationService) ProtoMessage() {} func (x *DestinationService) ProtoReflect() protoreflect.Message { - mi := &file_span_proto_msgTypes[2] + mi := &file_span_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -381,7 +428,7 @@ func (x *DestinationService) ProtoReflect() protoreflect.Message { // Deprecated: Use DestinationService.ProtoReflect.Descriptor instead. func (*DestinationService) Descriptor() ([]byte, []int) { - return file_span_proto_rawDescGZIP(), []int{2} + return file_span_proto_rawDescGZIP(), []int{3} } func (x *DestinationService) GetType() string { @@ -425,7 +472,7 @@ type Composite struct { func (x *Composite) Reset() { *x = Composite{} if protoimpl.UnsafeEnabled { - mi := &file_span_proto_msgTypes[3] + mi := &file_span_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -438,7 +485,7 @@ func (x *Composite) String() string { func (*Composite) ProtoMessage() {} func (x *Composite) ProtoReflect() protoreflect.Message { - mi := &file_span_proto_msgTypes[3] + mi := &file_span_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -451,7 +498,7 @@ func (x *Composite) ProtoReflect() protoreflect.Message { // Deprecated: Use Composite.ProtoReflect.Descriptor instead. func (*Composite) Descriptor() ([]byte, []int) { - return file_span_proto_rawDescGZIP(), []int{3} + return file_span_proto_rawDescGZIP(), []int{4} } func (x *Composite) GetCompressionStrategy() CompressionStrategy { @@ -487,7 +534,7 @@ type SpanLink struct { func (x *SpanLink) Reset() { *x = SpanLink{} if protoimpl.UnsafeEnabled { - mi := &file_span_proto_msgTypes[4] + mi := &file_span_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -500,7 +547,7 @@ func (x *SpanLink) String() string { func (*SpanLink) ProtoMessage() {} func (x *SpanLink) ProtoReflect() protoreflect.Message { - mi := &file_span_proto_msgTypes[4] + mi := &file_span_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -513,7 +560,7 @@ func (x *SpanLink) ProtoReflect() protoreflect.Message { // Deprecated: Use SpanLink.ProtoReflect.Descriptor instead. func (*SpanLink) Descriptor() ([]byte, []int) { - return file_span_proto_rawDescGZIP(), []int{4} + return file_span_proto_rawDescGZIP(), []int{5} } func (x *SpanLink) GetTraceId() string { @@ -537,7 +584,7 @@ var file_span_proto_rawDesc = []byte{ 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, + 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x05, 0x0a, 0x04, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, @@ -576,57 +623,60 @@ var file_span_proto_rawDesc = []byte{ 0x66, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x01, 0x52, 0x13, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, - 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x74, 0x65, 0x6c, - 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x6f, 0x74, 0x65, 0x6c, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x22, 0xbf, 0x01, 0x0a, 0x02, 0x44, - 0x42, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, - 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, - 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0xa1, 0x01, 0x0a, - 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x22, 0x8b, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x12, 0x56, - 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, - 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, - 0x79, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x73, 0x75, 0x6d, 0x22, 0x3e, - 0x0a, 0x08, 0x53, 0x70, 0x61, 0x6e, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x2a, 0x85, - 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, - 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, - 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, - 0x54, 0x45, 0x47, 0x59, 0x5f, 0x45, 0x58, 0x41, 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, - 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, - 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x53, 0x41, 0x4d, 0x45, 0x5f, - 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x02, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x61, 0x70, 0x6d, - 0x2d, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, + 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x22, 0x26, 0x0a, 0x04, 0x43, + 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x02, 0x44, 0x42, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, + 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, + 0x69, 0x6e, 0x6b, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0xa1, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x47, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, + 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x09, 0x43, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x12, 0x56, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, + 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x03, 0x73, 0x75, 0x6d, 0x22, 0x3e, 0x0a, 0x08, 0x53, 0x70, 0x61, 0x6e, 0x4c, + 0x69, 0x6e, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, + 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x2a, 0x85, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, + 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, + 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x45, 0x58, + 0x41, 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x43, + 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, + 0x45, 0x47, 0x59, 0x5f, 0x53, 0x41, 0x4d, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x02, 0x42, + 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, + 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x61, 0x70, 0x6d, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -642,33 +692,35 @@ func file_span_proto_rawDescGZIP() []byte { } var file_span_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_span_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_span_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_span_proto_goTypes = []interface{}{ (CompressionStrategy)(0), // 0: elastic.apm.v1.CompressionStrategy (*Span)(nil), // 1: elastic.apm.v1.Span - (*DB)(nil), // 2: elastic.apm.v1.DB - (*DestinationService)(nil), // 3: elastic.apm.v1.DestinationService - (*Composite)(nil), // 4: elastic.apm.v1.Composite - (*SpanLink)(nil), // 5: elastic.apm.v1.SpanLink - (*Message)(nil), // 6: elastic.apm.v1.Message - (*StacktraceFrame)(nil), // 7: elastic.apm.v1.StacktraceFrame - (*AggregatedDuration)(nil), // 8: elastic.apm.v1.AggregatedDuration + (*Code)(nil), // 2: elastic.apm.v1.Code + (*DB)(nil), // 3: elastic.apm.v1.DB + (*DestinationService)(nil), // 4: elastic.apm.v1.DestinationService + (*Composite)(nil), // 5: elastic.apm.v1.Composite + (*SpanLink)(nil), // 6: elastic.apm.v1.SpanLink + (*Message)(nil), // 7: elastic.apm.v1.Message + (*StacktraceFrame)(nil), // 8: elastic.apm.v1.StacktraceFrame + (*AggregatedDuration)(nil), // 9: elastic.apm.v1.AggregatedDuration } var file_span_proto_depIdxs = []int32{ - 6, // 0: elastic.apm.v1.Span.message:type_name -> elastic.apm.v1.Message - 4, // 1: elastic.apm.v1.Span.composite:type_name -> elastic.apm.v1.Composite - 3, // 2: elastic.apm.v1.Span.destination_service:type_name -> elastic.apm.v1.DestinationService - 2, // 3: elastic.apm.v1.Span.db:type_name -> elastic.apm.v1.DB - 7, // 4: elastic.apm.v1.Span.stacktrace:type_name -> elastic.apm.v1.StacktraceFrame - 5, // 5: elastic.apm.v1.Span.links:type_name -> elastic.apm.v1.SpanLink - 8, // 6: elastic.apm.v1.Span.self_time:type_name -> elastic.apm.v1.AggregatedDuration - 8, // 7: elastic.apm.v1.DestinationService.response_time:type_name -> elastic.apm.v1.AggregatedDuration - 0, // 8: elastic.apm.v1.Composite.compression_strategy:type_name -> elastic.apm.v1.CompressionStrategy - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 7, // 0: elastic.apm.v1.Span.message:type_name -> elastic.apm.v1.Message + 5, // 1: elastic.apm.v1.Span.composite:type_name -> elastic.apm.v1.Composite + 4, // 2: elastic.apm.v1.Span.destination_service:type_name -> elastic.apm.v1.DestinationService + 3, // 3: elastic.apm.v1.Span.db:type_name -> elastic.apm.v1.DB + 8, // 4: elastic.apm.v1.Span.stacktrace:type_name -> elastic.apm.v1.StacktraceFrame + 6, // 5: elastic.apm.v1.Span.links:type_name -> elastic.apm.v1.SpanLink + 9, // 6: elastic.apm.v1.Span.self_time:type_name -> elastic.apm.v1.AggregatedDuration + 2, // 7: elastic.apm.v1.Span.code:type_name -> elastic.apm.v1.Code + 9, // 8: elastic.apm.v1.DestinationService.response_time:type_name -> elastic.apm.v1.AggregatedDuration + 0, // 9: elastic.apm.v1.Composite.compression_strategy:type_name -> elastic.apm.v1.CompressionStrategy + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_span_proto_init() } @@ -693,7 +745,7 @@ func file_span_proto_init() { } } file_span_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DB); i { + switch v := v.(*Code); i { case 0: return &v.state case 1: @@ -705,7 +757,7 @@ func file_span_proto_init() { } } file_span_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DestinationService); i { + switch v := v.(*DB); i { case 0: return &v.state case 1: @@ -717,7 +769,7 @@ func file_span_proto_init() { } } file_span_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Composite); i { + switch v := v.(*DestinationService); i { case 0: return &v.state case 1: @@ -729,6 +781,18 @@ func file_span_proto_init() { } } file_span_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Composite); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_span_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SpanLink); i { case 0: return &v.state @@ -742,14 +806,14 @@ func file_span_proto_init() { } } file_span_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_span_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_span_proto_msgTypes[2].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_span_proto_rawDesc, NumEnums: 1, - NumMessages: 5, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/model/modelpb/span_vtproto.pb.go b/model/modelpb/span_vtproto.pb.go index 7d682e6e..a1b33894 100644 --- a/model/modelpb/span_vtproto.pb.go +++ b/model/modelpb/span_vtproto.pb.go @@ -56,7 +56,7 @@ func (m *Span) CloneVT() *Span { r.Name = m.Name r.SelfTime = m.SelfTime.CloneVT() r.RepresentativeCount = m.RepresentativeCount - r.OtelStacktrace = m.OtelStacktrace + r.Code = m.Code.CloneVT() if rhs := m.Sync; rhs != nil { tmpVal := *rhs r.Sync = &tmpVal @@ -86,6 +86,23 @@ func (m *Span) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *Code) CloneVT() *Code { + if m == nil { + return (*Code)(nil) + } + r := CodeFromVTPool() + r.Stacktrace = m.Stacktrace + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Code) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *DB) CloneVT() *DB { if m == nil { return (*DB)(nil) @@ -198,10 +215,13 @@ func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.OtelStacktrace) > 0 { - i -= len(m.OtelStacktrace) - copy(dAtA[i:], m.OtelStacktrace) - i = encodeVarint(dAtA, i, uint64(len(m.OtelStacktrace))) + if m.Code != nil { + size, err := m.Code.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -342,6 +362,46 @@ func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Code) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Code) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Code) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Stacktrace) > 0 { + i -= len(m.Stacktrace) + copy(dAtA[i:], m.Stacktrace) + i = encodeVarint(dAtA, i, uint64(len(m.Stacktrace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *DB) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -596,6 +656,7 @@ func (m *Span) ResetVT() { } f1 := m.Links[:0] m.SelfTime.ReturnToVTPool() + m.Code.ReturnToVTPool() m.Reset() m.Stacktrace = f0 m.Links = f1 @@ -611,6 +672,27 @@ func SpanFromVTPool() *Span { return vtprotoPool_Span.Get().(*Span) } +var vtprotoPool_Code = sync.Pool{ + New: func() interface{} { + return &Code{} + }, +} + +func (m *Code) ResetVT() { + if m != nil { + m.Reset() + } +} +func (m *Code) ReturnToVTPool() { + if m != nil { + m.ResetVT() + vtprotoPool_Code.Put(m) + } +} +func CodeFromVTPool() *Code { + return vtprotoPool_Code.Get().(*Code) +} + var vtprotoPool_DB = sync.Pool{ New: func() interface{} { return &DB{} @@ -763,14 +845,28 @@ func (m *Span) SizeVT() (n int) { if m.RepresentativeCount != 0 { n += 9 } - l = len(m.OtelStacktrace) - if l > 0 { + if m.Code != nil { + l = m.Code.SizeVT() n += 2 + l + sov(uint64(l)) } n += len(m.unknownFields) return n } +func (m *Code) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Stacktrace) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + func (m *DB) SizeVT() (n int) { if m == nil { return 0 @@ -1384,7 +1480,94 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { m.RepresentativeCount = float64(math.Float64frombits(v)) case 16: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OtelStacktrace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Code == nil { + m.Code = CodeFromVTPool() + } + if err := m.Code.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Code) UnmarshalVT(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 ErrIntOverflow + } + 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: Code: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Code: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stacktrace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1412,7 +1595,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OtelStacktrace = string(dAtA[iNdEx:postIndex]) + m.Stacktrace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/model/proto/span.proto b/model/proto/span.proto index 34c0585a..f20a6a31 100644 --- a/model/proto/span.proto +++ b/model/proto/span.proto @@ -42,7 +42,11 @@ message Span { AggregatedDuration self_time = 14; double representative_count = 15; - string otel_stacktrace = 16; + Code code = 16; +} + +message Code { + string stacktrace = 1; } message DB { From 0012afdd1fc3210fbfd58a24775550924f0728d1 Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Thu, 23 Nov 2023 10:09:11 +0100 Subject: [PATCH 08/18] switch bach to a nested structure --- input/otlp/traces.go | 3 --- model/modeljson/internal/span.go | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/input/otlp/traces.go b/input/otlp/traces.go index 47256bd6..4a29f47f 100644 --- a/input/otlp/traces.go +++ b/input/otlp/traces.go @@ -748,9 +748,6 @@ func TranslateSpan(spanKind ptrace.SpanKind, attributes pcommon.Map, event *mode isHTTP = true case attributeStackTrace: - if event.Span.Code == nil { - event.Span.Code = modelpb.CodeFromVTPool() - } event.Span.Code.Stacktrace = stringval // miscellaneous diff --git a/model/modeljson/internal/span.go b/model/modeljson/internal/span.go index 832a3caf..2a84c9fc 100644 --- a/model/modeljson/internal/span.go +++ b/model/modeljson/internal/span.go @@ -22,6 +22,7 @@ type Span struct { Composite *SpanComposite `json:"composite,omitempty"` Destination *SpanDestination `json:"destination,omitempty"` DB *DB `json:"db,omitempty"` + Code *Code `json:"code,omitempty"` Sync *bool `json:"sync,omitempty"` Kind string `json:"kind,omitempty"` Action string `json:"action,omitempty"` @@ -35,6 +36,10 @@ type Span struct { RepresentativeCount float64 `json:"representative_count,omitempty"` } +type Code struct { + Stacktrace string `json:"stacktrace,omitempty"` +} + type SpanDestination struct { Service SpanDestinationService `json:"service"` } From 57692200674d0bc6f601b4141c91cab6223af3ce Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Thu, 23 Nov 2023 10:10:31 +0100 Subject: [PATCH 09/18] update generated code --- model/modeljson/internal/marshal_fastjson.go | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/model/modeljson/internal/marshal_fastjson.go b/model/modeljson/internal/marshal_fastjson.go index 3f486524..622bc818 100644 --- a/model/modeljson/internal/marshal_fastjson.go +++ b/model/modeljson/internal/marshal_fastjson.go @@ -2561,6 +2561,18 @@ func (v *Span) MarshalFastJSON(w *fastjson.Writer) error { } w.String(v.Action) } + if v.Code != nil { + const prefix = ",\"code\":" + if first { + first = false + w.RawString(prefix[1:]) + } else { + w.RawString(prefix) + } + if err := v.Code.MarshalFastJSON(w); err != nil && firstErr == nil { + firstErr = err + } + } if v.Composite != nil { const prefix = ",\"composite\":" if first { @@ -2733,6 +2745,16 @@ func (v *Span) MarshalFastJSON(w *fastjson.Writer) error { return firstErr } +func (v *Code) MarshalFastJSON(w *fastjson.Writer) error { + w.RawByte('{') + if v.Stacktrace != "" { + w.RawString("\"stacktrace\":") + w.String(v.Stacktrace) + } + w.RawByte('}') + return nil +} + func (v *SpanDestination) MarshalFastJSON(w *fastjson.Writer) error { var firstErr error w.RawByte('{') From 2738e90a02a6df44b32e956d010dd9ae42ae7dcc Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Thu, 23 Nov 2023 10:11:13 +0100 Subject: [PATCH 10/18] create nested object when reading pb --- model/modeljson/span.pb.json.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/model/modeljson/span.pb.json.go b/model/modeljson/span.pb.json.go index 29492a1c..4c0e3917 100644 --- a/model/modeljson/span.pb.json.go +++ b/model/modeljson/span.pb.json.go @@ -93,6 +93,12 @@ func SpanModelJSON(e *modelpb.Span, out *modeljson.Span) { } } } + if e.Code != nil { + out.Code = &modeljson.Code{ + Stacktrace: e.Code.Stacktrace, + } + } + if n := len(e.Links); n > 0 { out.Links = make([]modeljson.SpanLink, n) for i, link := range e.Links { From 4ad270d9bb0a4edd98fa956656129dc8b55fe2c3 Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Thu, 23 Nov 2023 10:29:18 +0100 Subject: [PATCH 11/18] fix rum tests --- input/elasticapm/internal/modeldecoder/rumv3/transaction_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/input/elasticapm/internal/modeldecoder/rumv3/transaction_test.go b/input/elasticapm/internal/modeldecoder/rumv3/transaction_test.go index 95fd6a60..6c727988 100644 --- a/input/elasticapm/internal/modeldecoder/rumv3/transaction_test.go +++ b/input/elasticapm/internal/modeldecoder/rumv3/transaction_test.go @@ -243,6 +243,7 @@ func TestDecodeMapToTransactionModel(t *testing.T) { "representative_count", "stacktrace.library_frame", "stacktrace.vars", + "code", // stacktrace original and sourcemap values are set when sourcemapping is applied "stacktrace.original", "stacktrace.sourcemap", From 98038e148fda2d1e468cfceb64ef4d196b5ce4a8 Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Thu, 23 Nov 2023 10:29:28 +0100 Subject: [PATCH 12/18] fix otel tests --- input/otlp/traces.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/input/otlp/traces.go b/input/otlp/traces.go index 4a29f47f..47256bd6 100644 --- a/input/otlp/traces.go +++ b/input/otlp/traces.go @@ -748,6 +748,9 @@ func TranslateSpan(spanKind ptrace.SpanKind, attributes pcommon.Map, event *mode isHTTP = true case attributeStackTrace: + if event.Span.Code == nil { + event.Span.Code = modelpb.CodeFromVTPool() + } event.Span.Code.Stacktrace = stringval // miscellaneous From 63485f17b0a2ee5e3d53783faf72f29a38b94dc7 Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Thu, 23 Nov 2023 10:30:32 +0100 Subject: [PATCH 13/18] fix intake v2 tests --- input/elasticapm/internal/modeldecoder/v2/span_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/input/elasticapm/internal/modeldecoder/v2/span_test.go b/input/elasticapm/internal/modeldecoder/v2/span_test.go index 82ed6852..7cceb9bb 100644 --- a/input/elasticapm/internal/modeldecoder/v2/span_test.go +++ b/input/elasticapm/internal/modeldecoder/v2/span_test.go @@ -112,6 +112,9 @@ func TestDecodeMapToSpanModel(t *testing.T) { // Derived using service.target.* "destination_service.Resource", + // only provided for otel-based agents + "code", + // Not set for spans: "destination_service.response_time", "destination_service.ResponseTime.Count", From 5bf498513764192d0bf7ce0d44dda2dc13f96274 Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Thu, 23 Nov 2023 11:55:15 +0100 Subject: [PATCH 14/18] move to top-level field --- .../modeldecoder/rumv3/transaction_test.go | 1 - .../internal/modeldecoder/v2/span_test.go | 3 - input/otlp/traces.go | 6 +- input/otlp/traces_test.go | 2 +- model/modeljson/span.pb.json.go | 5 - model/modelpb/apmevent.pb.go | 303 +++++++++--------- model/modelpb/apmevent_vtproto.pb.go | 54 ++++ model/modelpb/code.pb.go | 162 ++++++++++ model/modelpb/code_vtproto.pb.go | 213 ++++++++++++ model/modelpb/span.pb.go | 254 ++++++--------- model/modelpb/span_vtproto.pb.go | 229 ------------- model/proto/apmevent.proto | 2 + model/proto/code.proto | 26 ++ model/proto/span.proto | 6 - 14 files changed, 710 insertions(+), 556 deletions(-) create mode 100644 model/modelpb/code.pb.go create mode 100644 model/modelpb/code_vtproto.pb.go create mode 100644 model/proto/code.proto diff --git a/input/elasticapm/internal/modeldecoder/rumv3/transaction_test.go b/input/elasticapm/internal/modeldecoder/rumv3/transaction_test.go index 6c727988..95fd6a60 100644 --- a/input/elasticapm/internal/modeldecoder/rumv3/transaction_test.go +++ b/input/elasticapm/internal/modeldecoder/rumv3/transaction_test.go @@ -243,7 +243,6 @@ func TestDecodeMapToTransactionModel(t *testing.T) { "representative_count", "stacktrace.library_frame", "stacktrace.vars", - "code", // stacktrace original and sourcemap values are set when sourcemapping is applied "stacktrace.original", "stacktrace.sourcemap", diff --git a/input/elasticapm/internal/modeldecoder/v2/span_test.go b/input/elasticapm/internal/modeldecoder/v2/span_test.go index 7cceb9bb..82ed6852 100644 --- a/input/elasticapm/internal/modeldecoder/v2/span_test.go +++ b/input/elasticapm/internal/modeldecoder/v2/span_test.go @@ -112,9 +112,6 @@ func TestDecodeMapToSpanModel(t *testing.T) { // Derived using service.target.* "destination_service.Resource", - // only provided for otel-based agents - "code", - // Not set for spans: "destination_service.response_time", "destination_service.ResponseTime.Count", diff --git a/input/otlp/traces.go b/input/otlp/traces.go index 47256bd6..e2f79c3a 100644 --- a/input/otlp/traces.go +++ b/input/otlp/traces.go @@ -748,10 +748,10 @@ func TranslateSpan(spanKind ptrace.SpanKind, attributes pcommon.Map, event *mode isHTTP = true case attributeStackTrace: - if event.Span.Code == nil { - event.Span.Code = modelpb.CodeFromVTPool() + if event.Code == nil { + event.Code = modelpb.CodeFromVTPool() } - event.Span.Code.Stacktrace = stringval + event.Code.Stacktrace = stringval // miscellaneous case "span.kind": // filter out diff --git a/input/otlp/traces_test.go b/input/otlp/traces_test.go index add7d8d1..16f1f23d 100644 --- a/input/otlp/traces_test.go +++ b/input/otlp/traces_test.go @@ -1601,7 +1601,7 @@ func TestSpanCodeStacktrace(t *testing.T) { event := transformSpanWithAttributes(t, map[string]interface{}{ "code.stacktrace": "stacktrace value", }) - assert.Equal(t, "stacktrace value", event.Span.Code.Stacktrace) + assert.Equal(t, "stacktrace value", event.Code.Stacktrace) }) } diff --git a/model/modeljson/span.pb.json.go b/model/modeljson/span.pb.json.go index 4c0e3917..c269943d 100644 --- a/model/modeljson/span.pb.json.go +++ b/model/modeljson/span.pb.json.go @@ -93,11 +93,6 @@ func SpanModelJSON(e *modelpb.Span, out *modeljson.Span) { } } } - if e.Code != nil { - out.Code = &modeljson.Code{ - Stacktrace: e.Code.Stacktrace, - } - } if n := len(e.Links); n > 0 { out.Links = make([]modeljson.SpanLink, n) diff --git a/model/modelpb/apmevent.pb.go b/model/modelpb/apmevent.pb.go index ca819246..cc337bef 100644 --- a/model/modelpb/apmevent.pb.go +++ b/model/modelpb/apmevent.pb.go @@ -81,6 +81,7 @@ type APMEvent struct { Session *Session `protobuf:"bytes,31,opt,name=session,proto3" json:"session,omitempty"` Process *Process `protobuf:"bytes,32,opt,name=process,proto3" json:"process,omitempty"` Event *Event `protobuf:"bytes,33,opt,name=event,proto3" json:"event,omitempty"` + Code *Code `protobuf:"bytes,34,opt,name=code,proto3" json:"code,omitempty"` } func (x *APMEvent) Reset() { @@ -346,6 +347,13 @@ func (x *APMEvent) GetEvent() *Event { return nil } +func (x *APMEvent) GetCode() *Code { + if x != nil { + return x.Code + } + return nil +} + var File_apmevent_proto protoreflect.FileDescriptor var file_apmevent_proto_rawDesc = []byte{ @@ -353,145 +361,149 @@ var file_apmevent_proto_rawDesc = []byte{ 0x12, 0x0e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x0b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x64, 0x61, 0x74, 0x61, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x64, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, - 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x66, 0x61, 0x61, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x6b, 0x75, 0x62, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x09, 0x6c, 0x6f, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x65, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x0a, 0x73, 0x70, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x09, 0x75, 0x72, - 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x0e, 0x0a, 0x08, 0x41, 0x50, 0x4d, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x28, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x70, 0x61, 0x6e, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x52, 0x0a, 0x0e, 0x6e, 0x75, 0x6d, - 0x65, 0x72, 0x69, 0x63, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x50, 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x75, 0x6d, 0x65, - 0x72, 0x69, 0x63, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, - 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3c, 0x0a, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x75, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x0a, 0x66, 0x61, 0x61, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, + 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x09, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x0d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x0e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x0d, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x73, 0x70, + 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x09, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x0f, 0x75, 0x73, 0x65, 0x72, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xaa, 0x0e, 0x0a, 0x08, 0x41, 0x50, 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x28, 0x0a, 0x04, 0x73, + 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6c, 0x61, 0x73, + 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x52, + 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x52, 0x0a, 0x0e, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, + 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x50, 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x09, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x65, 0x74, 0x52, 0x09, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x12, 0x2b, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x12, 0x31, 0x0a, - 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x50, 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x65, + 0x72, 0x69, 0x63, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6c, 0x61, 0x73, + 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x50, 0x4d, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, + 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x09, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6c, 0x61, 0x73, + 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x65, 0x74, 0x52, 0x09, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x65, 0x74, 0x12, + 0x2b, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x28, 0x0a, 0x04, 0x66, 0x61, 0x61, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x46, 0x61, 0x61, 0x73, 0x52, 0x04, 0x66, 0x61, 0x61, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6c, - 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x37, 0x0a, - 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x09, 0x63, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, - 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, - 0x12, 0x2e, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x3a, 0x0a, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, - 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, - 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x08, - 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x08, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, - 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, - 0x2b, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2b, 0x0a, 0x05, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6c, + 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6c, 0x61, + 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x04, + 0x66, 0x61, 0x61, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6c, 0x61, + 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x61, 0x61, 0x73, + 0x52, 0x04, 0x66, 0x61, 0x61, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, + 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x37, 0x0a, 0x09, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, + 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x12, 0x28, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x06, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, + 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x0a, + 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x52, 0x0a, 0x6b, 0x75, + 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x08, 0x6f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x65, 0x6c, 0x61, + 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x52, 0x08, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x3b, + 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, + 0x0a, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x2b, 0x0a, 0x05, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6c, 0x61, + 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, + 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, + 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x04, 0x68, 0x74, + 0x74, 0x70, 0x12, 0x38, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, + 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x17, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x12, 0x28, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x04, - 0x68, 0x74, 0x74, 0x70, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6c, 0x61, - 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, - 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x38, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6c, 0x61, - 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, - 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x15, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, - 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x05, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x18, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x25, - 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6c, - 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x52, 0x4c, - 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x25, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x1a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x2e, 0x0a, 0x06, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, - 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x06, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, - 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x48, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x03, 0x75, 0x72, + 0x6c, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, + 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x52, 0x4c, 0x52, 0x03, 0x75, 0x72, + 0x6c, 0x12, 0x25, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6c, 0x61, 0x73, - 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x70, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, - 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x2b, - 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x63, 0x0a, 0x12, 0x4e, - 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x37, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0x55, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x61, 0x70, - 0x6d, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x64, - 0x65, 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4c, 0x6f, 0x67, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, + 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, + 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x52, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x49, 0x64, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6c, 0x61, + 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, + 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, + 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6c, 0x61, 0x73, + 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, + 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x1a, 0x63, 0x0a, 0x12, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x37, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, + 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, + 0x63, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, + 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x2b, 0x5a, + 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x61, 0x73, + 0x74, 0x69, 0x63, 0x2f, 0x61, 0x70, 0x6d, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -538,8 +550,9 @@ var file_apmevent_proto_goTypes = []interface{}{ (*Session)(nil), // 27: elastic.apm.v1.Session (*Process)(nil), // 28: elastic.apm.v1.Process (*Event)(nil), // 29: elastic.apm.v1.Event - (*NumericLabelValue)(nil), // 30: elastic.apm.v1.NumericLabelValue - (*LabelValue)(nil), // 31: elastic.apm.v1.LabelValue + (*Code)(nil), // 30: elastic.apm.v1.Code + (*NumericLabelValue)(nil), // 31: elastic.apm.v1.NumericLabelValue + (*LabelValue)(nil), // 32: elastic.apm.v1.LabelValue } var file_apmevent_proto_depIdxs = []int32{ 3, // 0: elastic.apm.v1.APMEvent.span:type_name -> elastic.apm.v1.Span @@ -571,13 +584,14 @@ var file_apmevent_proto_depIdxs = []int32{ 27, // 26: elastic.apm.v1.APMEvent.session:type_name -> elastic.apm.v1.Session 28, // 27: elastic.apm.v1.APMEvent.process:type_name -> elastic.apm.v1.Process 29, // 28: elastic.apm.v1.APMEvent.event:type_name -> elastic.apm.v1.Event - 30, // 29: elastic.apm.v1.APMEvent.NumericLabelsEntry.value:type_name -> elastic.apm.v1.NumericLabelValue - 31, // 30: elastic.apm.v1.APMEvent.LabelsEntry.value:type_name -> elastic.apm.v1.LabelValue - 31, // [31:31] is the sub-list for method output_type - 31, // [31:31] is the sub-list for method input_type - 31, // [31:31] is the sub-list for extension type_name - 31, // [31:31] is the sub-list for extension extendee - 0, // [0:31] is the sub-list for field type_name + 30, // 29: elastic.apm.v1.APMEvent.code:type_name -> elastic.apm.v1.Code + 31, // 30: elastic.apm.v1.APMEvent.NumericLabelsEntry.value:type_name -> elastic.apm.v1.NumericLabelValue + 32, // 31: elastic.apm.v1.APMEvent.LabelsEntry.value:type_name -> elastic.apm.v1.LabelValue + 32, // [32:32] is the sub-list for method output_type + 32, // [32:32] is the sub-list for method input_type + 32, // [32:32] is the sub-list for extension type_name + 32, // [32:32] is the sub-list for extension extendee + 0, // [0:32] is the sub-list for field type_name } func init() { file_apmevent_proto_init() } @@ -588,6 +602,7 @@ func file_apmevent_proto_init() { file_agent_proto_init() file_client_proto_init() file_cloud_proto_init() + file_code_proto_init() file_container_proto_init() file_datastream_proto_init() file_destination_proto_init() diff --git a/model/modelpb/apmevent_vtproto.pb.go b/model/modelpb/apmevent_vtproto.pb.go index a9b4e58e..ebb2bd01 100644 --- a/model/modelpb/apmevent_vtproto.pb.go +++ b/model/modelpb/apmevent_vtproto.pb.go @@ -72,6 +72,7 @@ func (m *APMEvent) CloneVT() *APMEvent { r.Session = m.Session.CloneVT() r.Process = m.Process.CloneVT() r.Event = m.Event.CloneVT() + r.Code = m.Code.CloneVT() if rhs := m.NumericLabels; rhs != nil { tmpContainer := make(map[string]*NumericLabelValue, len(rhs)) for k, v := range rhs { @@ -132,6 +133,18 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.Code != nil { + size, err := m.Code.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x92 + } if m.Event != nil { size, err := m.Event.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { @@ -549,6 +562,7 @@ func (m *APMEvent) ResetVT() { m.Session.ReturnToVTPool() m.Process.ReturnToVTPool() m.Event.ReturnToVTPool() + m.Code.ReturnToVTPool() m.Reset() m.ChildIds = f0 } @@ -719,6 +733,10 @@ func (m *APMEvent) SizeVT() (n int) { l = m.Event.SizeVT() n += 2 + l + sov(uint64(l)) } + if m.Code != nil { + l = m.Code.SizeVT() + n += 2 + l + sov(uint64(l)) + } n += len(m.unknownFields) return n } @@ -2097,6 +2115,42 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Code == nil { + m.Code = CodeFromVTPool() + } + if err := m.Code.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/model/modelpb/code.pb.go b/model/modelpb/code.pb.go new file mode 100644 index 00000000..68217697 --- /dev/null +++ b/model/modelpb/code.pb.go @@ -0,0 +1,162 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v4.24.3 +// source: code.proto + +package modelpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Code struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stacktrace string `protobuf:"bytes,1,opt,name=stacktrace,proto3" json:"stacktrace,omitempty"` +} + +func (x *Code) Reset() { + *x = Code{} + if protoimpl.UnsafeEnabled { + mi := &file_code_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Code) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Code) ProtoMessage() {} + +func (x *Code) ProtoReflect() protoreflect.Message { + mi := &file_code_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Code.ProtoReflect.Descriptor instead. +func (*Code) Descriptor() ([]byte, []int) { + return file_code_proto_rawDescGZIP(), []int{0} +} + +func (x *Code) GetStacktrace() string { + if x != nil { + return x.Stacktrace + } + return "" +} + +var File_code_proto protoreflect.FileDescriptor + +var file_code_proto_rawDesc = []byte{ + 0x0a, 0x0a, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x65, 0x6c, + 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x22, 0x26, 0x0a, 0x04, + 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x61, 0x70, 0x6d, 0x2d, 0x64, + 0x61, 0x74, 0x61, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_code_proto_rawDescOnce sync.Once + file_code_proto_rawDescData = file_code_proto_rawDesc +) + +func file_code_proto_rawDescGZIP() []byte { + file_code_proto_rawDescOnce.Do(func() { + file_code_proto_rawDescData = protoimpl.X.CompressGZIP(file_code_proto_rawDescData) + }) + return file_code_proto_rawDescData +} + +var file_code_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_code_proto_goTypes = []interface{}{ + (*Code)(nil), // 0: elastic.apm.v1.Code +} +var file_code_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_code_proto_init() } +func file_code_proto_init() { + if File_code_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_code_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Code); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_code_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_code_proto_goTypes, + DependencyIndexes: file_code_proto_depIdxs, + MessageInfos: file_code_proto_msgTypes, + }.Build() + File_code_proto = out.File + file_code_proto_rawDesc = nil + file_code_proto_goTypes = nil + file_code_proto_depIdxs = nil +} diff --git a/model/modelpb/code_vtproto.pb.go b/model/modelpb/code_vtproto.pb.go new file mode 100644 index 00000000..5e30a657 --- /dev/null +++ b/model/modelpb/code_vtproto.pb.go @@ -0,0 +1,213 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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-go-vtproto. DO NOT EDIT. +// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// source: code.proto + +package modelpb + +import ( + fmt "fmt" + io "io" + sync "sync" + + proto "google.golang.org/protobuf/proto" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +func (m *Code) CloneVT() *Code { + if m == nil { + return (*Code)(nil) + } + r := CodeFromVTPool() + r.Stacktrace = m.Stacktrace + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Code) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Code) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Code) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Code) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Stacktrace) > 0 { + i -= len(m.Stacktrace) + copy(dAtA[i:], m.Stacktrace) + i = encodeVarint(dAtA, i, uint64(len(m.Stacktrace))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +var vtprotoPool_Code = sync.Pool{ + New: func() interface{} { + return &Code{} + }, +} + +func (m *Code) ResetVT() { + if m != nil { + m.Reset() + } +} +func (m *Code) ReturnToVTPool() { + if m != nil { + m.ResetVT() + vtprotoPool_Code.Put(m) + } +} +func CodeFromVTPool() *Code { + return vtprotoPool_Code.Get().(*Code) +} +func (m *Code) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Stacktrace) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Code) UnmarshalVT(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 ErrIntOverflow + } + 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: Code: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Code: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stacktrace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + 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 ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Stacktrace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} diff --git a/model/modelpb/span.pb.go b/model/modelpb/span.pb.go index f3e53ee1..e27e8e08 100644 --- a/model/modelpb/span.pb.go +++ b/model/modelpb/span.pb.go @@ -107,7 +107,6 @@ type Span struct { Links []*SpanLink `protobuf:"bytes,13,rep,name=links,proto3" json:"links,omitempty"` SelfTime *AggregatedDuration `protobuf:"bytes,14,opt,name=self_time,json=selfTime,proto3" json:"self_time,omitempty"` RepresentativeCount float64 `protobuf:"fixed64,15,opt,name=representative_count,json=representativeCount,proto3" json:"representative_count,omitempty"` - Code *Code `protobuf:"bytes,16,opt,name=code,proto3" json:"code,omitempty"` } func (x *Span) Reset() { @@ -247,60 +246,6 @@ func (x *Span) GetRepresentativeCount() float64 { return 0 } -func (x *Span) GetCode() *Code { - if x != nil { - return x.Code - } - return nil -} - -type Code struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Stacktrace string `protobuf:"bytes,1,opt,name=stacktrace,proto3" json:"stacktrace,omitempty"` -} - -func (x *Code) Reset() { - *x = Code{} - if protoimpl.UnsafeEnabled { - mi := &file_span_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Code) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Code) ProtoMessage() {} - -func (x *Code) ProtoReflect() protoreflect.Message { - mi := &file_span_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Code.ProtoReflect.Descriptor instead. -func (*Code) Descriptor() ([]byte, []int) { - return file_span_proto_rawDescGZIP(), []int{1} -} - -func (x *Code) GetStacktrace() string { - if x != nil { - return x.Stacktrace - } - return "" -} - type DB struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -317,7 +262,7 @@ type DB struct { func (x *DB) Reset() { *x = DB{} if protoimpl.UnsafeEnabled { - mi := &file_span_proto_msgTypes[2] + mi := &file_span_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -330,7 +275,7 @@ func (x *DB) String() string { func (*DB) ProtoMessage() {} func (x *DB) ProtoReflect() protoreflect.Message { - mi := &file_span_proto_msgTypes[2] + mi := &file_span_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -343,7 +288,7 @@ func (x *DB) ProtoReflect() protoreflect.Message { // Deprecated: Use DB.ProtoReflect.Descriptor instead. func (*DB) Descriptor() ([]byte, []int) { - return file_span_proto_rawDescGZIP(), []int{2} + return file_span_proto_rawDescGZIP(), []int{1} } func (x *DB) GetRowsAffected() uint32 { @@ -402,7 +347,7 @@ type DestinationService struct { func (x *DestinationService) Reset() { *x = DestinationService{} if protoimpl.UnsafeEnabled { - mi := &file_span_proto_msgTypes[3] + mi := &file_span_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -415,7 +360,7 @@ func (x *DestinationService) String() string { func (*DestinationService) ProtoMessage() {} func (x *DestinationService) ProtoReflect() protoreflect.Message { - mi := &file_span_proto_msgTypes[3] + mi := &file_span_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -428,7 +373,7 @@ func (x *DestinationService) ProtoReflect() protoreflect.Message { // Deprecated: Use DestinationService.ProtoReflect.Descriptor instead. func (*DestinationService) Descriptor() ([]byte, []int) { - return file_span_proto_rawDescGZIP(), []int{3} + return file_span_proto_rawDescGZIP(), []int{2} } func (x *DestinationService) GetType() string { @@ -472,7 +417,7 @@ type Composite struct { func (x *Composite) Reset() { *x = Composite{} if protoimpl.UnsafeEnabled { - mi := &file_span_proto_msgTypes[4] + mi := &file_span_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -485,7 +430,7 @@ func (x *Composite) String() string { func (*Composite) ProtoMessage() {} func (x *Composite) ProtoReflect() protoreflect.Message { - mi := &file_span_proto_msgTypes[4] + mi := &file_span_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -498,7 +443,7 @@ func (x *Composite) ProtoReflect() protoreflect.Message { // Deprecated: Use Composite.ProtoReflect.Descriptor instead. func (*Composite) Descriptor() ([]byte, []int) { - return file_span_proto_rawDescGZIP(), []int{4} + return file_span_proto_rawDescGZIP(), []int{3} } func (x *Composite) GetCompressionStrategy() CompressionStrategy { @@ -534,7 +479,7 @@ type SpanLink struct { func (x *SpanLink) Reset() { *x = SpanLink{} if protoimpl.UnsafeEnabled { - mi := &file_span_proto_msgTypes[5] + mi := &file_span_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -547,7 +492,7 @@ func (x *SpanLink) String() string { func (*SpanLink) ProtoMessage() {} func (x *SpanLink) ProtoReflect() protoreflect.Message { - mi := &file_span_proto_msgTypes[5] + mi := &file_span_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -560,7 +505,7 @@ func (x *SpanLink) ProtoReflect() protoreflect.Message { // Deprecated: Use SpanLink.ProtoReflect.Descriptor instead. func (*SpanLink) Descriptor() ([]byte, []int) { - return file_span_proto_rawDescGZIP(), []int{5} + return file_span_proto_rawDescGZIP(), []int{4} } func (x *SpanLink) GetTraceId() string { @@ -584,8 +529,8 @@ var file_span_proto_rawDesc = []byte{ 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, - 0x05, 0x0a, 0x04, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, + 0x04, 0x0a, 0x04, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x63, 0x6f, @@ -623,60 +568,55 @@ var file_span_proto_rawDesc = []byte{ 0x66, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x01, 0x52, 0x13, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, - 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, - 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x22, 0x26, 0x0a, 0x04, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x02, 0x44, 0x42, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, - 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x88, 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, - 0x69, 0x6e, 0x6b, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0xa1, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x47, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, - 0x63, 0x2e, 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x09, 0x43, 0x6f, - 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x12, 0x56, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x72, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, - 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x70, - 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x03, 0x73, 0x75, 0x6d, 0x22, 0x3e, 0x0a, 0x08, 0x53, 0x70, 0x61, 0x6e, 0x4c, - 0x69, 0x6e, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, - 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x2a, 0x85, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, - 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, - 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, - 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, - 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x45, 0x58, - 0x41, 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x43, - 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, - 0x45, 0x47, 0x59, 0x5f, 0x53, 0x41, 0x4d, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x02, 0x42, - 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, - 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x61, 0x70, 0x6d, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x79, 0x6e, + 0x63, 0x22, 0xbf, 0x01, 0x0a, 0x02, 0x44, 0x42, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x77, 0x73, + 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, + 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x88, + 0x01, 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, + 0x6b, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x61, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x22, 0xa1, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x47, + 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, + 0x61, 0x70, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x65, 0x12, 0x56, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, 0x6c, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x61, 0x70, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x03, 0x73, 0x75, 0x6d, 0x22, 0x3e, 0x0a, 0x08, 0x53, 0x70, 0x61, 0x6e, 0x4c, 0x69, 0x6e, + 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, + 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x70, 0x61, 0x6e, 0x49, 0x64, 0x2a, 0x85, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x24, 0x0a, + 0x20, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, + 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, + 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x45, 0x58, 0x41, 0x43, + 0x54, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x4f, 0x4d, + 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, + 0x59, 0x5f, 0x53, 0x41, 0x4d, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x02, 0x42, 0x2b, 0x5a, + 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x61, 0x73, + 0x74, 0x69, 0x63, 0x2f, 0x61, 0x70, 0x6d, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -692,35 +632,33 @@ func file_span_proto_rawDescGZIP() []byte { } var file_span_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_span_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_span_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_span_proto_goTypes = []interface{}{ (CompressionStrategy)(0), // 0: elastic.apm.v1.CompressionStrategy (*Span)(nil), // 1: elastic.apm.v1.Span - (*Code)(nil), // 2: elastic.apm.v1.Code - (*DB)(nil), // 3: elastic.apm.v1.DB - (*DestinationService)(nil), // 4: elastic.apm.v1.DestinationService - (*Composite)(nil), // 5: elastic.apm.v1.Composite - (*SpanLink)(nil), // 6: elastic.apm.v1.SpanLink - (*Message)(nil), // 7: elastic.apm.v1.Message - (*StacktraceFrame)(nil), // 8: elastic.apm.v1.StacktraceFrame - (*AggregatedDuration)(nil), // 9: elastic.apm.v1.AggregatedDuration + (*DB)(nil), // 2: elastic.apm.v1.DB + (*DestinationService)(nil), // 3: elastic.apm.v1.DestinationService + (*Composite)(nil), // 4: elastic.apm.v1.Composite + (*SpanLink)(nil), // 5: elastic.apm.v1.SpanLink + (*Message)(nil), // 6: elastic.apm.v1.Message + (*StacktraceFrame)(nil), // 7: elastic.apm.v1.StacktraceFrame + (*AggregatedDuration)(nil), // 8: elastic.apm.v1.AggregatedDuration } var file_span_proto_depIdxs = []int32{ - 7, // 0: elastic.apm.v1.Span.message:type_name -> elastic.apm.v1.Message - 5, // 1: elastic.apm.v1.Span.composite:type_name -> elastic.apm.v1.Composite - 4, // 2: elastic.apm.v1.Span.destination_service:type_name -> elastic.apm.v1.DestinationService - 3, // 3: elastic.apm.v1.Span.db:type_name -> elastic.apm.v1.DB - 8, // 4: elastic.apm.v1.Span.stacktrace:type_name -> elastic.apm.v1.StacktraceFrame - 6, // 5: elastic.apm.v1.Span.links:type_name -> elastic.apm.v1.SpanLink - 9, // 6: elastic.apm.v1.Span.self_time:type_name -> elastic.apm.v1.AggregatedDuration - 2, // 7: elastic.apm.v1.Span.code:type_name -> elastic.apm.v1.Code - 9, // 8: elastic.apm.v1.DestinationService.response_time:type_name -> elastic.apm.v1.AggregatedDuration - 0, // 9: elastic.apm.v1.Composite.compression_strategy:type_name -> elastic.apm.v1.CompressionStrategy - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 6, // 0: elastic.apm.v1.Span.message:type_name -> elastic.apm.v1.Message + 4, // 1: elastic.apm.v1.Span.composite:type_name -> elastic.apm.v1.Composite + 3, // 2: elastic.apm.v1.Span.destination_service:type_name -> elastic.apm.v1.DestinationService + 2, // 3: elastic.apm.v1.Span.db:type_name -> elastic.apm.v1.DB + 7, // 4: elastic.apm.v1.Span.stacktrace:type_name -> elastic.apm.v1.StacktraceFrame + 5, // 5: elastic.apm.v1.Span.links:type_name -> elastic.apm.v1.SpanLink + 8, // 6: elastic.apm.v1.Span.self_time:type_name -> elastic.apm.v1.AggregatedDuration + 8, // 7: elastic.apm.v1.DestinationService.response_time:type_name -> elastic.apm.v1.AggregatedDuration + 0, // 8: elastic.apm.v1.Composite.compression_strategy:type_name -> elastic.apm.v1.CompressionStrategy + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_span_proto_init() } @@ -745,18 +683,6 @@ func file_span_proto_init() { } } file_span_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Code); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_span_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DB); i { case 0: return &v.state @@ -768,7 +694,7 @@ func file_span_proto_init() { return nil } } - file_span_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_span_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DestinationService); i { case 0: return &v.state @@ -780,7 +706,7 @@ func file_span_proto_init() { return nil } } - file_span_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_span_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Composite); i { case 0: return &v.state @@ -792,7 +718,7 @@ func file_span_proto_init() { return nil } } - file_span_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_span_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SpanLink); i { case 0: return &v.state @@ -806,14 +732,14 @@ func file_span_proto_init() { } } file_span_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_span_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_span_proto_msgTypes[1].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_span_proto_rawDesc, NumEnums: 1, - NumMessages: 6, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/model/modelpb/span_vtproto.pb.go b/model/modelpb/span_vtproto.pb.go index a1b33894..ed1af4c7 100644 --- a/model/modelpb/span_vtproto.pb.go +++ b/model/modelpb/span_vtproto.pb.go @@ -56,7 +56,6 @@ func (m *Span) CloneVT() *Span { r.Name = m.Name r.SelfTime = m.SelfTime.CloneVT() r.RepresentativeCount = m.RepresentativeCount - r.Code = m.Code.CloneVT() if rhs := m.Sync; rhs != nil { tmpVal := *rhs r.Sync = &tmpVal @@ -86,23 +85,6 @@ func (m *Span) CloneMessageVT() proto.Message { return m.CloneVT() } -func (m *Code) CloneVT() *Code { - if m == nil { - return (*Code)(nil) - } - r := CodeFromVTPool() - r.Stacktrace = m.Stacktrace - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Code) CloneMessageVT() proto.Message { - return m.CloneVT() -} - func (m *DB) CloneVT() *DB { if m == nil { return (*DB)(nil) @@ -215,18 +197,6 @@ func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Code != nil { - size, err := m.Code.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } if m.RepresentativeCount != 0 { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.RepresentativeCount)))) @@ -362,46 +332,6 @@ func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Code) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Code) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Code) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Stacktrace) > 0 { - i -= len(m.Stacktrace) - copy(dAtA[i:], m.Stacktrace) - i = encodeVarint(dAtA, i, uint64(len(m.Stacktrace))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *DB) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -656,7 +586,6 @@ func (m *Span) ResetVT() { } f1 := m.Links[:0] m.SelfTime.ReturnToVTPool() - m.Code.ReturnToVTPool() m.Reset() m.Stacktrace = f0 m.Links = f1 @@ -672,27 +601,6 @@ func SpanFromVTPool() *Span { return vtprotoPool_Span.Get().(*Span) } -var vtprotoPool_Code = sync.Pool{ - New: func() interface{} { - return &Code{} - }, -} - -func (m *Code) ResetVT() { - if m != nil { - m.Reset() - } -} -func (m *Code) ReturnToVTPool() { - if m != nil { - m.ResetVT() - vtprotoPool_Code.Put(m) - } -} -func CodeFromVTPool() *Code { - return vtprotoPool_Code.Get().(*Code) -} - var vtprotoPool_DB = sync.Pool{ New: func() interface{} { return &DB{} @@ -845,24 +753,6 @@ func (m *Span) SizeVT() (n int) { if m.RepresentativeCount != 0 { n += 9 } - if m.Code != nil { - l = m.Code.SizeVT() - n += 2 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Code) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Stacktrace) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } n += len(m.unknownFields) return n } @@ -1478,125 +1368,6 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.RepresentativeCount = float64(math.Float64frombits(v)) - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Code == nil { - m.Code = CodeFromVTPool() - } - if err := m.Code.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Code) UnmarshalVT(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 ErrIntOverflow - } - 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: Code: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Code: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stacktrace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - 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 ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Stacktrace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/model/proto/apmevent.proto b/model/proto/apmevent.proto index 3a0d7161..dcc2ce10 100644 --- a/model/proto/apmevent.proto +++ b/model/proto/apmevent.proto @@ -22,6 +22,7 @@ package elastic.apm.v1; import "agent.proto"; import "client.proto"; import "cloud.proto"; +import "code.proto"; import "container.proto"; import "datastream.proto"; import "destination.proto"; @@ -89,4 +90,5 @@ message APMEvent { Session session = 31; Process process = 32; Event event = 33; + Code code = 34; } diff --git a/model/proto/code.proto b/model/proto/code.proto new file mode 100644 index 00000000..a7e3dfc8 --- /dev/null +++ b/model/proto/code.proto @@ -0,0 +1,26 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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. + +syntax = "proto3"; + +package elastic.apm.v1; + +option go_package = "github.com/elastic/apm-data/model/modelpb"; + +message Code { + string stacktrace = 1; +} diff --git a/model/proto/span.proto b/model/proto/span.proto index f20a6a31..df5fb4cd 100644 --- a/model/proto/span.proto +++ b/model/proto/span.proto @@ -41,12 +41,6 @@ message Span { repeated SpanLink links = 13; AggregatedDuration self_time = 14; double representative_count = 15; - - Code code = 16; -} - -message Code { - string stacktrace = 1; } message DB { From 4bbf66c5e6e548c5e611a21b717ad5847e58a2d8 Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Thu, 23 Nov 2023 14:37:14 +0100 Subject: [PATCH 15/18] fix test and write to json doc --- input/elasticapm/internal/modeldecoder/v2/metadata_test.go | 2 ++ model/modeljson/apmevent.pb.json.go | 6 ++++++ model/modeljson/internal/document.go | 1 + 3 files changed, 9 insertions(+) diff --git a/input/elasticapm/internal/modeldecoder/v2/metadata_test.go b/input/elasticapm/internal/modeldecoder/v2/metadata_test.go index b298e191..f9a209d9 100644 --- a/input/elasticapm/internal/modeldecoder/v2/metadata_test.go +++ b/input/elasticapm/internal/modeldecoder/v2/metadata_test.go @@ -55,6 +55,8 @@ func isUnmappedMetadataField(key string) bool { "client.ip", "client.port", "cloud.origin", + "code", + "code.stacktrace", "container.runtime", "container.image_name", "container.image_tag", diff --git a/model/modeljson/apmevent.pb.json.go b/model/modeljson/apmevent.pb.json.go index 1a50583a..69f97bcc 100644 --- a/model/modeljson/apmevent.pb.json.go +++ b/model/modeljson/apmevent.pb.json.go @@ -248,5 +248,11 @@ func MarshalAPMEvent(e *modelpb.APMEvent, w *fastjson.Writer) error { } } + if e.Code != nil { + doc.Code = &modeljson.Code{ + Stacktrace: e.Code.Stacktrace, + } + } + return doc.MarshalFastJSON(w) } diff --git a/model/modeljson/internal/document.go b/model/modeljson/internal/document.go index 56f56eeb..b4465477 100644 --- a/model/modeljson/internal/document.go +++ b/model/modeljson/internal/document.go @@ -67,6 +67,7 @@ type Document struct { Session *Session `json:"session,omitempty"` Process *Process `json:"process,omitempty"` Event *Event `json:"event,omitempty"` + Code *Code `json:"code,omitempty"` Timestamp Time `json:"@timestamp"` DataStream *DataStream `json:"data_stream,omitempty"` From 4b09bd744b15071950e2324d47172a369f6bbb10 Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Thu, 23 Nov 2023 15:18:31 +0100 Subject: [PATCH 16/18] add missing bits --- model/modeljson/apmevent.pb.json_test.go | 3 +++ model/modeljson/internal/marshal_fastjson.go | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/model/modeljson/apmevent.pb.json_test.go b/model/modeljson/apmevent.pb.json_test.go index de8eecb4..ea7271d6 100644 --- a/model/modeljson/apmevent.pb.json_test.go +++ b/model/modeljson/apmevent.pb.json_test.go @@ -487,5 +487,8 @@ func fullEvent(t testing.TB) *modelpb.APMEvent { Duration: uint64(3 * time.Second), Severity: 4, }, + Code: &modelpb.Code{ + Stacktrace: "stacktrace", + }, } } diff --git a/model/modeljson/internal/marshal_fastjson.go b/model/modeljson/internal/marshal_fastjson.go index 622bc818..5a272416 100644 --- a/model/modeljson/internal/marshal_fastjson.go +++ b/model/modeljson/internal/marshal_fastjson.go @@ -601,6 +601,12 @@ func (v *Document) MarshalFastJSON(w *fastjson.Writer) error { firstErr = err } } + if v.Code != nil { + w.RawString(",\"code\":") + if err := v.Code.MarshalFastJSON(w); err != nil && firstErr == nil { + firstErr = err + } + } if v.Container != nil { w.RawString(",\"container\":") if err := v.Container.MarshalFastJSON(w); err != nil && firstErr == nil { From 4df83b826baf220cc25034be711c2155e2cb5dd7 Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:35:14 +0100 Subject: [PATCH 17/18] use untruncated value for code stacktrace --- input/otlp/traces.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/input/otlp/traces.go b/input/otlp/traces.go index 6cd1d0b9..84ebd2e7 100644 --- a/input/otlp/traces.go +++ b/input/otlp/traces.go @@ -759,7 +759,8 @@ func TranslateSpan(spanKind ptrace.SpanKind, attributes pcommon.Map, event *mode if event.Code == nil { event.Code = modelpb.CodeFromVTPool() } - event.Code.Stacktrace = stringval + // stacktrace is expected to be large thus un-truncated value is needed + event.Code.Stacktrace = v.Str() // miscellaneous case "span.kind": // filter out From 652b514d2faeea036d2e724fe3b229091620bc6d Mon Sep 17 00:00:00 2001 From: Sylvain Juge <763082+SylvainJuge@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:48:50 +0100 Subject: [PATCH 18/18] remove code from span --- model/modeljson/internal/marshal_fastjson.go | 12 ------------ model/modeljson/internal/span.go | 1 - 2 files changed, 13 deletions(-) diff --git a/model/modeljson/internal/marshal_fastjson.go b/model/modeljson/internal/marshal_fastjson.go index 5a272416..e316d732 100644 --- a/model/modeljson/internal/marshal_fastjson.go +++ b/model/modeljson/internal/marshal_fastjson.go @@ -2567,18 +2567,6 @@ func (v *Span) MarshalFastJSON(w *fastjson.Writer) error { } w.String(v.Action) } - if v.Code != nil { - const prefix = ",\"code\":" - if first { - first = false - w.RawString(prefix[1:]) - } else { - w.RawString(prefix) - } - if err := v.Code.MarshalFastJSON(w); err != nil && firstErr == nil { - firstErr = err - } - } if v.Composite != nil { const prefix = ",\"composite\":" if first { diff --git a/model/modeljson/internal/span.go b/model/modeljson/internal/span.go index 2a84c9fc..15a95ba4 100644 --- a/model/modeljson/internal/span.go +++ b/model/modeljson/internal/span.go @@ -22,7 +22,6 @@ type Span struct { Composite *SpanComposite `json:"composite,omitempty"` Destination *SpanDestination `json:"destination,omitempty"` DB *DB `json:"db,omitempty"` - Code *Code `json:"code,omitempty"` Sync *bool `json:"sync,omitempty"` Kind string `json:"kind,omitempty"` Action string `json:"action,omitempty"`