From a7c5ef0ee1321cc905b32f85b6b3e28565f591ae Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Thu, 4 Jan 2024 13:28:19 -0500 Subject: [PATCH] Add gogo/protobuf to OpenTelemetry OTLP data model (#5067) ## Which problem is this PR solving? - Resolves #5052 ## Description of the changes - Apply gogo annotations to OTLP proto for generating more efficient data model ## How was this change tested? - Unit tests --------- Signed-off-by: Yuri Shkuro --- cmd/query/app/apiv3/gateway_test.go | 12 +- cmd/query/app/apiv3/http_gateway.go | 11 - cmd/query/app/apiv3/snapshots/FindTraces.json | 6 +- cmd/query/app/apiv3/snapshots/GetTrace.json | 6 +- model/v2/customtype.go | 19 + model/v2/jsonid.go | 45 + model/v2/jsonid_test.go | 158 ++ model/v2/marshal_test.go | 53 + model/v2/package_test.go | 14 + model/v2/spanid.go | 90 + model/v2/traceid.go | 89 + otel_proto_patch.sed | 69 + pkg/gogocodec/codec.go | 18 +- pkg/gogocodec/codec_test.go | 16 + proto-gen/otel/common/v1/common.pb.go | 1494 ++++++++++- proto-gen/otel/resource/v1/resource.pb.go | 327 ++- proto-gen/otel/trace/v1/trace.pb.go | 2367 ++++++++++++++++- scripts/updateLicense.py | 13 +- 18 files changed, 4564 insertions(+), 243 deletions(-) create mode 100644 model/v2/customtype.go create mode 100644 model/v2/jsonid.go create mode 100644 model/v2/jsonid_test.go create mode 100644 model/v2/marshal_test.go create mode 100644 model/v2/package_test.go create mode 100644 model/v2/spanid.go create mode 100644 model/v2/traceid.go diff --git a/cmd/query/app/apiv3/gateway_test.go b/cmd/query/app/apiv3/gateway_test.go index 34bc38709da..24121ecfc3d 100644 --- a/cmd/query/app/apiv3/gateway_test.go +++ b/cmd/query/app/apiv3/gateway_test.go @@ -100,6 +100,10 @@ func makeTestTrace() (*model.Trace, model.TraceID) { TraceID: traceID, SpanID: model.NewSpanID(180), OperationName: "foobar", + Tags: []model.KeyValue{ + model.String("span.kind", "server"), + model.Bool("error", true), + }, }, }, }, traceID @@ -160,9 +164,9 @@ func (gw *testGateway) runGatewayGetTrace(t *testing.T) { parseResponse(t, body, &response) assert.Len(t, response.Result.ResourceSpans, 1) - assert.Equal(t, + assert.EqualValues(t, bytesOfTraceID(t, traceID.High, traceID.Low), - response.Result.ResourceSpans[0].ScopeSpans[0].Spans[0].TraceId) + response.Result.ResourceSpans[0].ScopeSpans[0].Spans[0].TraceID) } func (gw *testGateway) runGatewayFindTraces(t *testing.T) { @@ -179,9 +183,9 @@ func (gw *testGateway) runGatewayFindTraces(t *testing.T) { parseResponse(t, body, &response) assert.Len(t, response.Result.ResourceSpans, 1) - assert.Equal(t, + assert.EqualValues(t, bytesOfTraceID(t, traceID.High, traceID.Low), - response.Result.ResourceSpans[0].ScopeSpans[0].Spans[0].TraceId) + response.Result.ResourceSpans[0].ScopeSpans[0].Spans[0].TraceID) } func bytesOfTraceID(t *testing.T, high, low uint64) []byte { diff --git a/cmd/query/app/apiv3/http_gateway.go b/cmd/query/app/apiv3/http_gateway.go index 8261eac3e67..9aa09a07775 100644 --- a/cmd/query/app/apiv3/http_gateway.go +++ b/cmd/query/app/apiv3/http_gateway.go @@ -124,17 +124,6 @@ func (h *HTTPGateway) returnSpansTestable( if h.tryHandleError(w, err, http.StatusInternalServerError) { return } - for _, rs := range resourceSpans { - for _, ss := range rs.ScopeSpans { - for _, s := range ss.Spans { - if len(s.ParentSpanId) == 0 { - // If ParentSpanId is empty array then gogo/jsonpb renders it as empty string. - // To match the output with grpc-gateway we set it to nil and it won't be included. - s.ParentSpanId = nil - } - } - } - } response := &api_v3.GRPCGatewayWrapper{ Result: &api_v3.SpansResponseChunk{ ResourceSpans: resourceSpans, diff --git a/cmd/query/app/apiv3/snapshots/FindTraces.json b/cmd/query/app/apiv3/snapshots/FindTraces.json index 5883e50eb1f..a1f704a7aef 100644 --- a/cmd/query/app/apiv3/snapshots/FindTraces.json +++ b/cmd/query/app/apiv3/snapshots/FindTraces.json @@ -9,10 +9,14 @@ "spans": [ { "endTimeUnixNano": "11651379494838206464", + "kind": "SPAN_KIND_SERVER", "name": "foobar", + "parentSpanId": "", "spanId": "AAAAAAAAALQ=", "startTimeUnixNano": "11651379494838206464", - "status": {}, + "status": { + "code": "STATUS_CODE_ERROR" + }, "traceId": "AAAAAAAAAJYAAAAAAAAAoA==" } ] diff --git a/cmd/query/app/apiv3/snapshots/GetTrace.json b/cmd/query/app/apiv3/snapshots/GetTrace.json index 5883e50eb1f..a1f704a7aef 100644 --- a/cmd/query/app/apiv3/snapshots/GetTrace.json +++ b/cmd/query/app/apiv3/snapshots/GetTrace.json @@ -9,10 +9,14 @@ "spans": [ { "endTimeUnixNano": "11651379494838206464", + "kind": "SPAN_KIND_SERVER", "name": "foobar", + "parentSpanId": "", "spanId": "AAAAAAAAALQ=", "startTimeUnixNano": "11651379494838206464", - "status": {}, + "status": { + "code": "STATUS_CODE_ERROR" + }, "traceId": "AAAAAAAAAJYAAAAAAAAAoA==" } ] diff --git a/model/v2/customtype.go b/model/v2/customtype.go new file mode 100644 index 00000000000..8a2bde3d387 --- /dev/null +++ b/model/v2/customtype.go @@ -0,0 +1,19 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package model + +import "github.com/gogo/protobuf/proto" + +// gogoCustom is an interface that Gogo expects custom types to implement. +// https://github.com/gogo/protobuf/blob/master/custom_types.md +type gogoCustom interface { + Marshal() ([]byte, error) + MarshalTo(data []byte) (n int, err error) + Unmarshal(data []byte) error + + proto.Sizer + + MarshalJSON() ([]byte, error) + UnmarshalJSON(data []byte) error +} diff --git a/model/v2/jsonid.go b/model/v2/jsonid.go new file mode 100644 index 00000000000..b6a6d34a50c --- /dev/null +++ b/model/v2/jsonid.go @@ -0,0 +1,45 @@ +// Copyright (c) 2023 The Jaeger Authors. +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package model + +import ( + "encoding/base64" + "fmt" +) + +// marshalJSON converts trace id into a base64 string enclosed in quotes. +// Called by Protobuf JSON deserialization. +func marshalJSON(id []byte) ([]byte, error) { + // Plus 2 quote chars at the start and end. + hexLen := base64.StdEncoding.EncodedLen(len(id)) + 2 + + b := make([]byte, hexLen) + base64.StdEncoding.Encode(b[1:hexLen-1], id) + b[0], b[hexLen-1] = '"', '"' + + return b, nil +} + +// unmarshalJSON inflates trace id from base64 string, possibly enclosed in quotes. +// Called by Protobuf JSON deserialization. +func unmarshalJSON(dst []byte, src []byte) error { + if l := len(src); l >= 2 && src[0] == '"' && src[l-1] == '"' { + src = src[1 : l-1] + } + nLen := len(src) + if nLen == 0 { + return nil + } + + if l := base64.StdEncoding.DecodedLen(nLen); len(dst) != l { + return fmt.Errorf("invalid length for ID '%s', dst=%d, src=%d", string(src), len(dst), l) + } + + _, err := base64.StdEncoding.Decode(dst, src) + if err != nil { + return fmt.Errorf("cannot unmarshal ID from string '%s': %w", string(src), err) + } + return nil +} diff --git a/model/v2/jsonid_test.go b/model/v2/jsonid_test.go new file mode 100644 index 00000000000..23d36af1c01 --- /dev/null +++ b/model/v2/jsonid_test.go @@ -0,0 +1,158 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package model + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestUnmarshalJSON(t *testing.T) { + tests := []struct { + name string + dst []byte + src []byte + expErr string + }{ + { + name: "Valid input", + dst: make([]byte, 16+2), + src: []byte(`"AAAAAAAAAJYAAAAAAAAAoA=="`), + expErr: "", + }, + { + name: "Empty input", + dst: make([]byte, 16), + src: []byte(`""`), + expErr: "", + }, + { + name: "Invalid length", + dst: make([]byte, 16), + src: []byte(`"AAAAAAAAAJYAAAAAAAAAoA=="`), + expErr: "invalid length for ID", + }, + { + name: "Decode error", + dst: make([]byte, 16+2), + src: []byte(`"invalid_base64_length_18"`), + expErr: "cannot unmarshal ID from string", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := unmarshalJSON(tt.dst, tt.src) + if tt.expErr == "" { + require.NoError(t, err) + } else { + require.ErrorContains(t, err, tt.expErr) + } + }) + } +} + +func TestMarshal(t *testing.T) { + validSpanID := SpanID{1, 2, 3, 4, 5, 6, 7, 8} + validTraceID := TraceID{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1} + tests := []struct { + name string + id gogoCustom + expErr string + }{ + { + name: "Valid span id", + id: &validSpanID, + }, + { + name: "Valid trace id", + id: &validTraceID, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + d, err := tt.id.Marshal() + require.NoError(t, err) + assert.Len(t, d, tt.id.Size()) + }) + } +} + +func TestMarshalTo(t *testing.T) { + validSpanID := SpanID{1, 2, 3, 4, 5, 6, 7, 8} + validTraceID := TraceID{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1} + tests := []struct { + name string + id gogoCustom + len int + expErr string + }{ + { + name: "Valid span id buffer", + id: &validSpanID, + len: 8, + }, + { + name: "Valid trace id buffer", + id: &validTraceID, + len: 16, + }, + { + name: "Invalid span id buffer", + id: &validSpanID, + len: 4, + expErr: errMarshalSpanID.Error(), + }, + { + name: "Invalid trace id buffer", + id: &validTraceID, + len: 4, + expErr: errMarshalTraceID.Error(), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + buf := make([]byte, tt.len) + n, err := tt.id.MarshalTo(buf) + if tt.expErr == "" { + require.NoError(t, err) + assert.Equal(t, n, tt.id.Size()) + } else { + require.ErrorContains(t, err, tt.expErr) + } + }) + } +} + +func TestUnmarshalError(t *testing.T) { + validSpanID := SpanID{1, 2, 3, 4, 5, 6, 7, 8} + validTraceID := TraceID{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1} + tests := []struct { + name string + id gogoCustom + }{ + { + name: "span id", + id: &validSpanID, + }, + { + name: "trace id", + id: &validTraceID, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Run("Protobuf", func(t *testing.T) { + err := tt.id.Unmarshal([]byte("invalid")) + require.ErrorContains(t, err, "length") + }) + t.Run("JSON", func(t *testing.T) { + err := tt.id.UnmarshalJSON([]byte("invalid")) + require.ErrorContains(t, err, "length") + }) + }) + } +} diff --git a/model/v2/marshal_test.go b/model/v2/marshal_test.go new file mode 100644 index 00000000000..216b2278e5a --- /dev/null +++ b/model/v2/marshal_test.go @@ -0,0 +1,53 @@ +// Copyright (c) 2024 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package model_test + +import ( + "bytes" + "testing" + + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/jaegertracing/jaeger/model/v2" + tracev1 "github.com/jaegertracing/jaeger/proto-gen/otel/trace/v1" +) + +// TestMarshal ensures that we can marshal and unmarshal a Span using both JSON and Protobuf. +// Since it depends on proto-gen types, it's in the model_test package to avoid circular dependencies. +func TestMarshalSpan(t *testing.T) { + tests := []struct { + name string + span *tracev1.Span + }{ + {name: "valid IDs", span: &tracev1.Span{ + TraceID: model.TraceID{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}, + SpanID: model.SpanID{1, 2, 3, 4, 5, 6, 7, 8}, + }}, + {name: "invalid IDs", span: &tracev1.Span{ + TraceID: model.TraceID{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + SpanID: model.SpanID{0, 0, 0, 0, 0, 0, 0, 0}, + }}, + } + for _, tt := range tests { + t.Run(tt.name+"/Protobuf", func(t *testing.T) { + data, err := proto.Marshal(tt.span) + require.NoError(t, err) + + var span tracev1.Span + require.NoError(t, proto.Unmarshal(data, &span)) + assert.Equal(t, tt.span, &span) + }) + t.Run(tt.name+"/JSON", func(t *testing.T) { + var buf bytes.Buffer + require.NoError(t, new(jsonpb.Marshaler).Marshal(&buf, tt.span)) + + var span tracev1.Span + require.NoError(t, jsonpb.Unmarshal(&buf, &span)) + assert.Equal(t, tt.span, &span) + }) + } +} diff --git a/model/v2/package_test.go b/model/v2/package_test.go new file mode 100644 index 00000000000..581fd431fbd --- /dev/null +++ b/model/v2/package_test.go @@ -0,0 +1,14 @@ +// Copyright (c) 2023 The Jaeger Authors. +// SPDX-License-Identifier: Apache-2.0 + +package model + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/model/v2/spanid.go b/model/v2/spanid.go new file mode 100644 index 00000000000..097700f4af6 --- /dev/null +++ b/model/v2/spanid.go @@ -0,0 +1,90 @@ +// Copyright (c) 2023 The Jaeger Authors. +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package model + +import ( + "errors" +) + +const spanIDSize = 8 + +var ( + errMarshalSpanID = errors.New("marshal: invalid buffer length for SpanID") + errUnmarshalSpanID = errors.New("unmarshal: invalid SpanID length") +) + +// SpanID is a custom data type that is used for all span_id fields in OTLP +// Protobuf messages. +type SpanID [spanIDSize]byte + +var _ gogoCustom = (*SpanID)(nil) + +// Size returns the size of the data to serialize. +func (sid SpanID) Size() int { + if sid.IsEmpty() { + return 0 + } + return spanIDSize +} + +// IsEmpty returns true if id contains at least one non-zero byte. +func (sid SpanID) IsEmpty() bool { + return sid == [spanIDSize]byte{} +} + +// MarshalTo converts trace ID into a binary representation. +// Called by Protobuf serialization. +func (sid SpanID) MarshalTo(data []byte) (n int, err error) { + if sid.IsEmpty() { + return 0, nil + } + + if len(data) < spanIDSize { + return 0, errMarshalSpanID + } + + return copy(data, sid[:]), nil +} + +// Marshal implements gogoCustom. +func (sid SpanID) Marshal() ([]byte, error) { + return sid[:], nil +} + +// Unmarshal inflates this trace ID from binary representation. Called by Protobuf serialization. +func (sid *SpanID) Unmarshal(data []byte) error { + if len(data) == 0 { + *sid = [spanIDSize]byte{} + return nil + } + + if len(data) != spanIDSize { + return errUnmarshalSpanID + } + + copy(sid[:], data) + return nil +} + +// MarshalJSON converts SpanID into a hex string enclosed in quotes. +func (sid SpanID) MarshalJSON() ([]byte, error) { + if sid.IsEmpty() { + return []byte(`""`), nil + } + return marshalJSON(sid[:]) +} + +// UnmarshalJSON decodes SpanID from hex string, possibly enclosed in quotes. +// Called by Protobuf JSON deserialization. +func (sid *SpanID) UnmarshalJSON(data []byte) error { + // in base64 encoding an 8-byte array is padded to 9 bytes + buf := [spanIDSize + 1]byte{} + if err := unmarshalJSON(buf[:], data); err != nil { + return err + } + *sid = [spanIDSize]byte{} + copy(sid[:], buf[:spanIDSize]) + return nil +} diff --git a/model/v2/traceid.go b/model/v2/traceid.go new file mode 100644 index 00000000000..873955391ab --- /dev/null +++ b/model/v2/traceid.go @@ -0,0 +1,89 @@ +// Copyright (c) 2023 The Jaeger Authors. +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package model + +import ( + "errors" +) + +const traceIDSize = 16 + +var ( + errMarshalTraceID = errors.New("marshal: invalid buffer length for TraceID") + errUnmarshalTraceID = errors.New("unmarshal: invalid TraceID length") +) + +// TraceID is a custom data type that is used for all trace_id fields in OTLP +// Protobuf messages. +type TraceID [traceIDSize]byte + +var _ gogoCustom = (*TraceID)(nil) + +// Size returns the size of the data to serialize. +func (tid TraceID) Size() int { + if tid.IsEmpty() { + return 0 + } + return traceIDSize +} + +// IsEmpty returns true if id contains at leas one non-zero byte. +func (tid TraceID) IsEmpty() bool { + return tid == [traceIDSize]byte{} +} + +// Marshal implements gogoCustom. +func (tid *TraceID) Marshal() ([]byte, error) { + return tid[:], nil +} + +// MarshalTo converts trace ID into a binary representation. Called by Protobuf serialization. +func (tid TraceID) MarshalTo(data []byte) (n int, err error) { + if tid.IsEmpty() { + return 0, nil + } + + if len(data) < traceIDSize { + return 0, errMarshalTraceID + } + + return copy(data, tid[:]), nil +} + +// Unmarshal inflates this trace ID from binary representation. Called by Protobuf serialization. +func (tid *TraceID) Unmarshal(data []byte) error { + if len(data) == 0 { + *tid = [traceIDSize]byte{} + return nil + } + + if len(data) != traceIDSize { + return errUnmarshalTraceID + } + + copy(tid[:], data) + return nil +} + +// MarshalJSON converts trace id into a hex string enclosed in quotes. +func (tid TraceID) MarshalJSON() ([]byte, error) { + if tid.IsEmpty() { + return []byte(`""`), nil + } + return marshalJSON(tid[:]) +} + +// UnmarshalJSON inflates trace id from hex string, possibly enclosed in quotes. +// Called by Protobuf JSON deserialization. +func (tid *TraceID) UnmarshalJSON(data []byte) error { + // in base64 encoding a 16-byte array is padded to 18 bytes + buf := [traceIDSize + 2]byte{} + if err := unmarshalJSON(buf[:], data); err != nil { + return err + } + *tid = [traceIDSize]byte{} + copy(tid[:], buf[:traceIDSize]) + return nil +} diff --git a/otel_proto_patch.sed b/otel_proto_patch.sed index 9821ab8d072..2f4701b65f6 100644 --- a/otel_proto_patch.sed +++ b/otel_proto_patch.sed @@ -6,3 +6,72 @@ s| opentelemetry.proto| jaeger|g # Remove opentelemetry/proto prefix from imports. s|import "opentelemetry/proto/|import "|g + +# Below instructions are copied (and modified) from OTel collector +# https://github.com/open-telemetry/opentelemetry-collector/blob/main/proto_patch.sed +s|^package \(.*\)\;|package \1;\ +\ +import "gogoproto/gogo.proto";\ +\ +// Enable gogoprotobuf extensions (https://github.com/gogo/protobuf/blob/master/extensions.md).\ +// Enable custom Marshal method.\ +option (gogoproto.marshaler_all) = true;\ +// Enable custom Unmarshal method.\ +option (gogoproto.unmarshaler_all) = true;\ +// Enable custom Size method (Required by Marshal and Unmarshal).\ +option (gogoproto.sizer_all) = true;\ +| + +s+bytes trace_id = \(.*\);+bytes trace_id = \1\ + [\ + // Use custom TraceId data type for this field.\ + (gogoproto.nullable) = false,\ + (gogoproto.customtype) = "github.com/jaegertracing/jaeger/model/v2.TraceID",\ + (gogoproto.customname) = "TraceID"\ + ];+g + +s+bytes span_id = \(.*\);+bytes span_id = \1\ + [\ + // Use custom SpanId data type for this field.\ + (gogoproto.nullable) = false,\ + (gogoproto.customtype) = "github.com/jaegertracing/jaeger/model/v2.SpanID",\ + (gogoproto.customname) = "SpanID"\ + ];+g + +s+bytes parent_span_id = \(.*\);+bytes parent_span_id = \1\ + [\ + // Use custom SpanId data type for this field.\ + (gogoproto.nullable) = false,\ + (gogoproto.customtype) = "github.com/jaegertracing/jaeger/model/v2.SpanID",\ + (gogoproto.customname) = "ParentSpanID"\ + ];+g + +s+repeated opentelemetry.proto.common.v1.KeyValue \(.*\);+repeated opentelemetry.proto.common.v1.KeyValue \1\ + [ (gogoproto.nullable) = false ];+g + +s+repeated KeyValue \(.*\);+repeated KeyValue \1\ + [ (gogoproto.nullable) = false ];+g + +s+AnyValue \(.*\);+AnyValue \1\ + [ (gogoproto.nullable) = false ];+g + +s+opentelemetry.proto.resource.v1.Resource resource = \(.*\);+opentelemetry.proto.resource.v1.Resource resource = \1\ + [ (gogoproto.nullable) = false ];+g + +s+opentelemetry.proto.common.v1.InstrumentationScope scope = \(.*\);+opentelemetry.proto.common.v1.InstrumentationScope scope = \1\ + [ (gogoproto.nullable) = false ];+g + +s+Status \(.*\);+Status \1\ + [ (gogoproto.nullable) = false ];+g + +s+repeated Exemplar exemplars = \(.*\);+repeated Exemplar exemplars = \1\ + [ (gogoproto.nullable) = false ];+g + +s+Buckets \(.*\)tive = \(.*\);+Buckets \1tive = \2\ + [ (gogoproto.nullable) = false ];+g + +# optional fixed64 foo = 1 -> oneof foo_ { fixed64 foo = 1;} +s+optional \(.*\) \(.*\) = \(.*\);+ oneof \2_ { \1 \2 = \3;}+g + +s+\(.*\)PartialSuccess partial_success = \(.*\);+\1PartialSuccess partial_success = \2\ + [ (gogoproto.nullable) = false ];+g diff --git a/pkg/gogocodec/codec.go b/pkg/gogocodec/codec.go index 9f834f02728..ac6a59a1f5f 100644 --- a/pkg/gogocodec/codec.go +++ b/pkg/gogocodec/codec.go @@ -26,6 +26,7 @@ import ( const ( jaegerProtoGenPkgPath = "github.com/jaegertracing/jaeger/proto-gen" jaegerModelPkgPath = "github.com/jaegertracing/jaeger/model" + jaegerModelV2PkgPath = "github.com/jaegertracing/jaeger/model/v2" ) var defaultCodec encoding.Codec @@ -65,7 +66,7 @@ func (c *gogoCodec) Marshal(v interface{}) ([]byte, error) { // Unmarshal implements encoding.Codec func (c *gogoCodec) Unmarshal(data []byte, v interface{}) error { t := reflect.TypeOf(v) - elem := t.Elem() + elem := t.Elem() // only for collections // use gogo proto only for Jaeger types if useGogo(elem) { return gogoproto.Unmarshal(data, v.(gogoproto.Message)) @@ -74,5 +75,18 @@ func (c *gogoCodec) Unmarshal(data []byte, v interface{}) error { } func useGogo(t reflect.Type) bool { - return t != nil && (strings.HasPrefix(t.PkgPath(), jaegerProtoGenPkgPath) || strings.HasPrefix(t.PkgPath(), jaegerModelPkgPath)) + if t == nil { + return false + } + pkg := t.PkgPath() + if strings.HasPrefix(pkg, jaegerProtoGenPkgPath) { + return true + } + if strings.HasPrefix(pkg, jaegerModelV2PkgPath) { + return true + } + if strings.HasPrefix(pkg, jaegerModelPkgPath) { + return true + } + return false } diff --git a/pkg/gogocodec/codec_test.go b/pkg/gogocodec/codec_test.go index 5dfd85c23b2..aae8c87a33d 100644 --- a/pkg/gogocodec/codec_test.go +++ b/pkg/gogocodec/codec_test.go @@ -15,6 +15,7 @@ package gogocodec import ( + "reflect" "testing" "github.com/stretchr/testify/assert" @@ -24,6 +25,8 @@ import ( "google.golang.org/protobuf/types/known/emptypb" "github.com/jaegertracing/jaeger/model" + modelv2 "github.com/jaegertracing/jaeger/model/v2" + tracev1 "github.com/jaegertracing/jaeger/proto-gen/otel/trace/v1" ) func TestCodecMarshallAndUnmarshall_jaeger_type(t *testing.T) { @@ -69,6 +72,19 @@ func TestWireCompatibility(t *testing.T) { assert.Equal(t, s1, s2) } +func TestUseGogo(t *testing.T) { + assert.False(t, useGogo(nil)) + + var span model.Span + assert.True(t, useGogo(reflect.TypeOf(span))) + + var id modelv2.SpanID + assert.True(t, useGogo(reflect.TypeOf(id))) + + var scopeSpans tracev1.ScopeSpans + assert.True(t, useGogo(reflect.TypeOf(scopeSpans))) +} + func TestMain(m *testing.M) { goleak.VerifyTestMain(m) } diff --git a/proto-gen/otel/common/v1/common.pb.go b/proto-gen/otel/common/v1/common.pb.go index 02892d7108d..e6cce554720 100644 --- a/proto-gen/otel/common/v1/common.pb.go +++ b/proto-gen/otel/common/v1/common.pb.go @@ -4,9 +4,13 @@ package v1 import ( + encoding_binary "encoding/binary" fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -48,16 +52,25 @@ func (*AnyValue) Descriptor() ([]byte, []int) { return fileDescriptor_92d5df4519b8f2e3, []int{0} } func (m *AnyValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AnyValue.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *AnyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AnyValue.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_AnyValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *AnyValue) XXX_Merge(src proto.Message) { xxx_messageInfo_AnyValue.Merge(m, src) } func (m *AnyValue) XXX_Size() int { - return xxx_messageInfo_AnyValue.Size(m) + return m.Size() } func (m *AnyValue) XXX_DiscardUnknown() { xxx_messageInfo_AnyValue.DiscardUnknown(m) @@ -67,6 +80,8 @@ var xxx_messageInfo_AnyValue proto.InternalMessageInfo type isAnyValue_Value interface { isAnyValue_Value() + MarshalTo([]byte) (int, error) + Size() int } type AnyValue_StringValue struct { @@ -172,10 +187,10 @@ func (*AnyValue) XXX_OneofWrappers() []interface{} { // since oneof in AnyValue does not allow repeated fields. type ArrayValue struct { // Array of values. The array may be empty (contain 0 elements). - Values []*AnyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Values []AnyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ArrayValue) Reset() { *m = ArrayValue{} } @@ -185,16 +200,25 @@ func (*ArrayValue) Descriptor() ([]byte, []int) { return fileDescriptor_92d5df4519b8f2e3, []int{1} } func (m *ArrayValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ArrayValue.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ArrayValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ArrayValue.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ArrayValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *ArrayValue) XXX_Merge(src proto.Message) { xxx_messageInfo_ArrayValue.Merge(m, src) } func (m *ArrayValue) XXX_Size() int { - return xxx_messageInfo_ArrayValue.Size(m) + return m.Size() } func (m *ArrayValue) XXX_DiscardUnknown() { xxx_messageInfo_ArrayValue.DiscardUnknown(m) @@ -202,7 +226,7 @@ func (m *ArrayValue) XXX_DiscardUnknown() { var xxx_messageInfo_ArrayValue proto.InternalMessageInfo -func (m *ArrayValue) GetValues() []*AnyValue { +func (m *ArrayValue) GetValues() []AnyValue { if m != nil { return m.Values } @@ -219,10 +243,10 @@ type KeyValueList struct { // contain 0 elements). // The keys MUST be unique (it is not allowed to have more than one // value with the same key). - Values []*KeyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Values []KeyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *KeyValueList) Reset() { *m = KeyValueList{} } @@ -232,16 +256,25 @@ func (*KeyValueList) Descriptor() ([]byte, []int) { return fileDescriptor_92d5df4519b8f2e3, []int{2} } func (m *KeyValueList) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_KeyValueList.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *KeyValueList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_KeyValueList.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_KeyValueList.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *KeyValueList) XXX_Merge(src proto.Message) { xxx_messageInfo_KeyValueList.Merge(m, src) } func (m *KeyValueList) XXX_Size() int { - return xxx_messageInfo_KeyValueList.Size(m) + return m.Size() } func (m *KeyValueList) XXX_DiscardUnknown() { xxx_messageInfo_KeyValueList.DiscardUnknown(m) @@ -249,7 +282,7 @@ func (m *KeyValueList) XXX_DiscardUnknown() { var xxx_messageInfo_KeyValueList proto.InternalMessageInfo -func (m *KeyValueList) GetValues() []*KeyValue { +func (m *KeyValueList) GetValues() []KeyValue { if m != nil { return m.Values } @@ -259,11 +292,11 @@ func (m *KeyValueList) GetValues() []*KeyValue { // KeyValue is a key-value pair that is used to store Span attributes, Link // attributes, etc. type KeyValue struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value *AnyValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value AnyValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *KeyValue) Reset() { *m = KeyValue{} } @@ -273,16 +306,25 @@ func (*KeyValue) Descriptor() ([]byte, []int) { return fileDescriptor_92d5df4519b8f2e3, []int{3} } func (m *KeyValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_KeyValue.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *KeyValue) XXX_Merge(src proto.Message) { xxx_messageInfo_KeyValue.Merge(m, src) } func (m *KeyValue) XXX_Size() int { - return xxx_messageInfo_KeyValue.Size(m) + return m.Size() } func (m *KeyValue) XXX_DiscardUnknown() { xxx_messageInfo_KeyValue.DiscardUnknown(m) @@ -297,11 +339,11 @@ func (m *KeyValue) GetKey() string { return "" } -func (m *KeyValue) GetValue() *AnyValue { +func (m *KeyValue) GetValue() AnyValue { if m != nil { return m.Value } - return nil + return AnyValue{} } // InstrumentationScope is a message representing the instrumentation scope information @@ -313,11 +355,11 @@ type InstrumentationScope struct { // Additional attributes that describe the scope. [Optional]. // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). - Attributes []*KeyValue `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"` - DroppedAttributesCount uint32 `protobuf:"varint,4,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Attributes []KeyValue `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes"` + DroppedAttributesCount uint32 `protobuf:"varint,4,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *InstrumentationScope) Reset() { *m = InstrumentationScope{} } @@ -327,16 +369,25 @@ func (*InstrumentationScope) Descriptor() ([]byte, []int) { return fileDescriptor_92d5df4519b8f2e3, []int{4} } func (m *InstrumentationScope) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InstrumentationScope.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *InstrumentationScope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InstrumentationScope.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_InstrumentationScope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *InstrumentationScope) XXX_Merge(src proto.Message) { xxx_messageInfo_InstrumentationScope.Merge(m, src) } func (m *InstrumentationScope) XXX_Size() int { - return xxx_messageInfo_InstrumentationScope.Size(m) + return m.Size() } func (m *InstrumentationScope) XXX_DiscardUnknown() { xxx_messageInfo_InstrumentationScope.DiscardUnknown(m) @@ -358,7 +409,7 @@ func (m *InstrumentationScope) GetVersion() string { return "" } -func (m *InstrumentationScope) GetAttributes() []*KeyValue { +func (m *InstrumentationScope) GetAttributes() []KeyValue { if m != nil { return m.Attributes } @@ -383,36 +434,1339 @@ func init() { func init() { proto.RegisterFile("common/v1/common.proto", fileDescriptor_92d5df4519b8f2e3) } var fileDescriptor_92d5df4519b8f2e3 = []byte{ - // 485 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xcb, 0x6e, 0xd3, 0x40, - 0x14, 0xcd, 0x24, 0x6d, 0x1e, 0xd7, 0x41, 0xaa, 0x46, 0xa8, 0x8a, 0x10, 0x05, 0x13, 0x36, 0xde, - 0x60, 0x93, 0xb0, 0xa9, 0xd8, 0x40, 0x92, 0x4d, 0x10, 0x08, 0x2a, 0x83, 0xba, 0x60, 0x13, 0xd9, - 0xc9, 0x55, 0x18, 0x6a, 0xcf, 0x58, 0xe3, 0xb1, 0x25, 0x7f, 0x03, 0x7f, 0xc2, 0x27, 0xf0, 0x01, - 0x7c, 0x17, 0x9a, 0x47, 0x9c, 0x0a, 0x10, 0x74, 0x77, 0xef, 0xb9, 0xe7, 0x9e, 0x73, 0xec, 0x99, - 0x81, 0xf3, 0xad, 0xc8, 0x73, 0xc1, 0xa3, 0x7a, 0x16, 0xd9, 0x2a, 0x2c, 0xa4, 0x50, 0x82, 0x9e, - 0x7d, 0x4d, 0x70, 0x8f, 0x32, 0x74, 0x60, 0x3d, 0x9b, 0xfe, 0xec, 0xc2, 0x70, 0xc1, 0x9b, 0xeb, - 0x24, 0xab, 0x90, 0x3e, 0x85, 0x71, 0xa9, 0x24, 0xe3, 0xfb, 0x4d, 0xad, 0xfb, 0x09, 0xf1, 0x49, - 0x30, 0x5a, 0x77, 0x62, 0xcf, 0xa2, 0x96, 0xf4, 0x18, 0x20, 0x15, 0x22, 0x73, 0x94, 0xae, 0x4f, - 0x82, 0xe1, 0xba, 0x13, 0x8f, 0x34, 0x66, 0x09, 0x17, 0x30, 0x62, 0x5c, 0xb9, 0x79, 0xcf, 0x27, - 0x41, 0x6f, 0xdd, 0x89, 0x87, 0x8c, 0xab, 0xd6, 0x64, 0x27, 0xaa, 0x34, 0x43, 0xc7, 0x38, 0xf1, - 0x49, 0x40, 0xb4, 0x89, 0x45, 0x2d, 0xe9, 0x15, 0x78, 0x89, 0x94, 0x49, 0xe3, 0x38, 0xa7, 0x3e, - 0x09, 0xbc, 0xf9, 0xc3, 0xf0, 0xf7, 0xf8, 0xe1, 0x42, 0x93, 0xcc, 0xca, 0xba, 0x13, 0x43, 0xd2, -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 0xf9, 0xa2, 0x1d, 0xaf, 0xf4, 0x74, 0xf9, 0x8d, 0x80, 0xcf, - 0x44, 0x28, 0x0a, 0xe4, 0x0a, 0x33, 0xcc, 0x51, 0xc9, 0xc6, 0x3e, 0x84, 0xa3, 0xe7, 0xd2, 0x5b, - 0x99, 0xf2, 0x4a, 0xc3, 0x57, 0xe4, 0xf3, 0xe5, 0x9e, 0xa9, 0x2f, 0x55, 0xaa, 0x09, 0x91, 0xcd, - 0xa7, 0x64, 0xb2, 0x65, 0x7c, 0xef, 0xba, 0xc8, 0xec, 0x3f, 0xdb, 0x23, 0x8f, 0x84, 0xc2, 0x2c, - 0x6a, 0x1f, 0xda, 0xf7, 0xee, 0xc5, 0x87, 0x02, 0xf9, 0xa7, 0xd6, 0xc8, 0x28, 0x86, 0x56, 0x3d, - 0xbc, 0x9e, 0xa5, 0x7d, 0xb3, 0xf9, 0xe2, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xae, 0x68, 0xa0, - 0xac, 0x9c, 0x03, 0x00, 0x00, + // 518 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xcb, 0x6a, 0xdb, 0x40, + 0x14, 0xf5, 0xc4, 0x8e, 0x1f, 0x57, 0x2e, 0x84, 0x21, 0x04, 0x13, 0x1a, 0x47, 0x75, 0x37, 0xda, + 0x54, 0xc2, 0x29, 0x14, 0xef, 0x5a, 0xdb, 0x50, 0x5c, 0x5a, 0x68, 0x50, 0x43, 0x16, 0xdd, 0x18, + 0xc9, 0x1e, 0xd4, 0x69, 0xe4, 0x19, 0x31, 0x1a, 0x09, 0xf4, 0x25, 0xfd, 0x87, 0x7e, 0x45, 0x57, + 0x25, 0xcb, 0x7e, 0x41, 0x29, 0xfe, 0x92, 0x32, 0x0f, 0xcb, 0x21, 0xed, 0xc2, 0xbb, 0x7b, 0xcf, + 0x39, 0xf7, 0xdc, 0x33,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0x92, 0x59, 0x07, 0x8e, 0x35, 0x39, + 0x7a, 0x0b, 0xb0, 0x0f, 0x83, 0x27, 0xd0, 0xd6, 0x70, 0x3e, 0x40, 0x6e, 0xd3, 0x73, 0xae, 0xce, + 0xff, 0x13, 0xdd, 0x7e, 0xf5, 0x59, 0xeb, 0xfe, 0xf7, 0x65, 0x23, 0xb4, 0xfa, 0xd1, 0x02, 0xfa, + 0x0f, 0x23, 0x1d, 0xe2, 0xb4, 0xd3, 0x3f, 0x72, 0xba, 0x81, 0xee, 0x8e, 0xc1, 0x27, 0xd0, 0xbc, + 0x23, 0x95, 0xf9, 0xa1, 0xa1, 0x2a, 0xf1, 0x2b, 0x1b, 0x5c, 0xff, 0xc1, 0x43, 0x02, 0xda, 0x73, + 0xfe, 0x40, 0x70, 0xfa, 0x8e, 0xe5, 0x52, 0x14, 0x1b, 0xc2, 0x64, 0x24, 0x29, 0x67, 0x9f, 0x56, + 0x3c, 0x23, 0x18, 0x43, 0x8b, 0x45, 0x1b, 0x7b, 0x69, 0x42, 0x5d, 0xe3, 0x01, 0x74, 0x4a, 0x22, + 0x72, 0xca, 0x99, 0x5e, 0xd3, 0x0b, 0x77, 0x2d, 0x7e, 0x03, 0x10, 0x49, 0x29, 0x68, 0x5c, 0x48, + 0x92, 0x0f, 0x9a, 0x07, 0x1e, 0xed, 0xc1, 0x0c, 0x9e, 0xc0, 0x60, 0x2d, 0x78, 0x96, 0x91, 0xf5, + 0x72, 0x8f, 0x2e, 0x57, 0xbc, 0x60, 0x52, 0xdf, 0xa9, 0x27, 0xe1, 0x99, 0xe5, 0xa7, 0x35, 0x3d, + 0x57, 0xec, 0xec, 0x1b, 0xba, 0xdf, 0x0e, 0xd1, 0xaf, 0xed, 0x10, 0xfd, 0xd9, 0x0e, 0x11, 0xb8, + 0x94, 0xfb, 0x3c, 0x23, 0x4c, 0x92, 0x94, 0x6c, 0x88, 0x14, 0x95, 0x79, 0x1a, 0xfb, 0x14, 0x33, + 0x67, 0xae, 0xcb, 0x6b, 0x05, 0x5f, 0xa3, 0xcf, 0x93, 0x84, 0xca, 0x2f, 0x45, 0xac, 0x04, 0x81, + 0x49, 0x2c, 0x45, 0xb4, 0xa2, 0x2c, 0xb1, 0x5d, 0xa0, 0xe7, 0x5f, 0x24, 0x84, 0x05, 0x5c, 0x92, + 0x34, 0xa8, 0x9f, 0xe8, 0xf7, 0xa3, 0x8b, 0x8f, 0x19, 0x61, 0x37, 0xf5, 0x22, 0xed, 0xe8, 0x1b, + 0x77, 0xff, 0x76, 0x1c, 0xb7, 0xf5, 0xe4, 0xcb, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xe9, + 0xb4, 0x81, 0xd6, 0x03, 0x00, 0x00, +} + +func (m *AnyValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AnyValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AnyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *AnyValue_StringValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AnyValue_StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.StringValue) + copy(dAtA[i:], m.StringValue) + i = encodeVarintCommon(dAtA, i, uint64(len(m.StringValue))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} +func (m *AnyValue_BoolValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AnyValue_BoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i-- + if m.BoolValue { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + return len(dAtA) - i, nil +} +func (m *AnyValue_IntValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AnyValue_IntValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintCommon(dAtA, i, uint64(m.IntValue)) + i-- + dAtA[i] = 0x18 + return len(dAtA) - i, nil +} +func (m *AnyValue_DoubleValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AnyValue_DoubleValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DoubleValue)))) + i-- + dAtA[i] = 0x21 + return len(dAtA) - i, nil +} +func (m *AnyValue_ArrayValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AnyValue_ArrayValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ArrayValue != nil { + { + size, err := m.ArrayValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *AnyValue_KvlistValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AnyValue_KvlistValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.KvlistValue != nil { + { + size, err := m.KvlistValue.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *AnyValue_BytesValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AnyValue_BytesValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.BytesValue != nil { + i -= len(m.BytesValue) + copy(dAtA[i:], m.BytesValue) + i = encodeVarintCommon(dAtA, i, uint64(len(m.BytesValue))) + i-- + dAtA[i] = 0x3a + } + return len(dAtA) - i, nil +} +func (m *ArrayValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ArrayValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ArrayValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *KeyValueList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KeyValueList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KeyValueList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *KeyValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintCommon(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *InstrumentationScope) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InstrumentationScope) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InstrumentationScope) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.DroppedAttributesCount != 0 { + i = encodeVarintCommon(dAtA, i, uint64(m.DroppedAttributesCount)) + i-- + dAtA[i] = 0x20 + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintCommon(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintCommon(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } + +func encodeVarintCommon(dAtA []byte, offset int, v uint64) int { + offset -= sovCommon(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AnyValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != nil { + n += m.Value.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnyValue_StringValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StringValue) + n += 1 + l + sovCommon(uint64(l)) + return n +} +func (m *AnyValue_BoolValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *AnyValue_IntValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovCommon(uint64(m.IntValue)) + return n +} +func (m *AnyValue_DoubleValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *AnyValue_ArrayValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ArrayValue != nil { + l = m.ArrayValue.Size() + n += 1 + l + sovCommon(uint64(l)) + } + return n +} +func (m *AnyValue_KvlistValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.KvlistValue != nil { + l = m.KvlistValue.Size() + n += 1 + l + sovCommon(uint64(l)) + } + return n +} +func (m *AnyValue_BytesValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BytesValue != nil { + l = len(m.BytesValue) + n += 1 + l + sovCommon(uint64(l)) + } + return n +} +func (m *ArrayValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + for _, e := range m.Values { + l = e.Size() + n += 1 + l + sovCommon(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *KeyValueList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + for _, e := range m.Values { + l = e.Size() + n += 1 + l + sovCommon(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *KeyValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovCommon(uint64(l)) + } + l = m.Value.Size() + n += 1 + l + sovCommon(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *InstrumentationScope) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovCommon(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovCommon(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovCommon(uint64(l)) + } + } + if m.DroppedAttributesCount != 0 { + n += 1 + sovCommon(uint64(m.DroppedAttributesCount)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCommon(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCommon(x uint64) (n int) { + return sovCommon(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AnyValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + 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: AnyValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnyValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + 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 ErrInvalidLengthCommon + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = &AnyValue_StringValue{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Value = &AnyValue_BoolValue{b} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IntValue", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Value = &AnyValue_IntValue{v} + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DoubleValue", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Value = &AnyValue_DoubleValue{float64(math.Float64frombits(v))} + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ArrayValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ArrayValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AnyValue_ArrayValue{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KvlistValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &KeyValueList{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &AnyValue_KvlistValue{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BytesValue", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCommon + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.Value = &AnyValue_BytesValue{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommon(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ArrayValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + 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: ArrayValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ArrayValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Values = append(m.Values, AnyValue{}) + if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommon(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KeyValueList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + 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: KeyValueList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KeyValueList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Values = append(m.Values, KeyValue{}) + if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommon(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KeyValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + 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: KeyValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + 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 ErrInvalidLengthCommon + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommon(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InstrumentationScope) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + 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: InstrumentationScope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InstrumentationScope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + 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 ErrInvalidLengthCommon + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + 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 ErrInvalidLengthCommon + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, KeyValue{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + m.DroppedAttributesCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DroppedAttributesCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipCommon(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCommon(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommon + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommon + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommon + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthCommon + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCommon + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCommon + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCommon = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCommon = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCommon = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto-gen/otel/resource/v1/resource.pb.go b/proto-gen/otel/resource/v1/resource.pb.go index bcbde34f821..cfb3d72b134 100644 --- a/proto-gen/otel/resource/v1/resource.pb.go +++ b/proto-gen/otel/resource/v1/resource.pb.go @@ -5,9 +5,12 @@ package v1 import ( fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" v1 "github.com/jaegertracing/jaeger/proto-gen/otel/common/v1" + io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -42,16 +45,25 @@ func (*Resource) Descriptor() ([]byte, []int) { return fileDescriptor_cebae6241f1ea243, []int{0} } func (m *Resource) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Resource.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Resource.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Resource.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Resource) XXX_Merge(src proto.Message) { xxx_messageInfo_Resource.Merge(m, src) } func (m *Resource) XXX_Size() int { - return xxx_messageInfo_Resource.Size(m) + return m.Size() } func (m *Resource) XXX_DiscardUnknown() { xxx_messageInfo_Resource.DiscardUnknown(m) @@ -80,21 +92,296 @@ func init() { func init() { proto.RegisterFile("resource/v1/resource.proto", fileDescriptor_cebae6241f1ea243) } var fileDescriptor_cebae6241f1ea243 = []byte{ - // 252 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xb1, 0x4e, 0xc3, 0x30, - 0x10, 0x86, 0xe5, 0x22, 0x21, 0x64, 0xd4, 0x25, 0x43, 0x15, 0x65, 0xa1, 0xea, 0xd4, 0x05, 0x5b, - 0x81, 0x05, 0x75, 0xa3, 0x8c, 0x0c, 0x54, 0x11, 0xea, 0xc0, 0x52, 0x25, 0xe9, 0x29, 0x04, 0x25, - 0x3e, 0xeb, 0x7a, 0x8e, 0x94, 0x8d, 0x77, 0xe0, 0x2d, 0x78, 0x4a, 0x94, 0xc4, 0x09, 0xd9, 0xce, - 0xf7, 0xff, 0xf7, 0xdf, 0xe7, 0x93, 0x11, 0xc1, 0x05, 0x1d, 0xe5, 0xa0, 0x9b, 0x58, 0x8f, 0xb5, - 0xb2, 0x84, 0x8c, 0x41, 0xf0, 0x95, 0x42, 0x01, 0xa4, 0xa6, 0x76, 0x13, 0x47, 0xab, 0x1c, 0xeb, - 0x1a, 0x4d, 0xe7, 0x1e, 0xaa, 0xc1, 0xbb, 0xf9, 0x16, 0xf2, 0x26, 0xf1, 0xbe, 0x60, 0x27, 0x65, - 0xca, 0x4c, 0x65, 0xe6, 0x18, 0x2e, 0xa1, 0x58, 0x5f, 0x6d, 0x6f, 0x1f, 0x22, 0xe5, 0xd3, 0xfc, - 0x58, 0x13, 0xab, 0x57, 0x68, 0x8f, 0x69, 0xe5, 0x20, 0x99, 0xb9, 0x83, 0x27, 0x19, 0x9e, 0x09, - 0xad, 0x85, 0xf3, 0xe9, 0xbf, 0x7b, 0xca, 0xd1, 0x19, 0x0e, 0x17, 0x6b, 0xb1, 0x5d, 0x26, 0x2b, - 0xaf, 0x3f, 0x4f, 0xf2, 0x4b, 0xa7, 0xee, 0x7f, 0x84, 0xdc, 0x94, 0xa8, 0xd0, 0x82, 0x61, 0xa8, - 0xa0, 0x06, 0xa6, 0x76, 0xa0, 0x9b, 0xff, 0x60, 0xbf, 0x1c, 0x31, 0x0f, 0x9d, 0x74, 0x10, 0x1f, - 0xbb, 0xa2, 0xe4, 0x4f, 0x97, 0x75, 0x60, 0x7a, 0x60, 0x64, 0x4a, 0xf3, 0xd2, 0x14, 0xfe, 0xa5, - 0xfb, 0x8c, 0xfb, 0x02, 0x8c, 0x46, 0x86, 0x4a, 0xcf, 0x2e, 0xf6, 0xbb, 0xb8, 0x7b, 0xb3, 0x60, - 0xde, 0xa7, 0x75, 0x7d, 0xa6, 0x1a, 0x37, 0xa8, 0x63, 0x9c, 0x5d, 0xf7, 0xd3, 0x8f, 0x7f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x55, 0x91, 0xb4, 0x1d, 0x69, 0x01, 0x00, 0x00, + // 276 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x50, 0x3d, 0x4b, 0xc3, 0x40, + 0x18, 0xe6, 0x2a, 0x88, 0x9c, 0x74, 0x09, 0x52, 0x4a, 0x86, 0x58, 0x3a, 0x75, 0xf1, 0x8e, 0xe8, + 0x22, 0xdd, 0xac, 0xa3, 0x83, 0x25, 0x48, 0x07, 0x97, 0x92, 0xa4, 0x2f, 0x67, 0x24, 0xb9, 0x37, + 0x5c, 0xdf, 0x04, 0xba, 0xf9, 0x4f, 0xdc, 0xfd, 0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, 0x22, 0x41, 0x2e, + 0x47, 0x6f, 0xfa, 0x35, 0xb9, 0x7e, 0x2e, 0x41, 0xbf, 0x0c, 0x75, 0x5d, 0xa6, 0xe8, 0x1b, 0xc4, + 0x2e, 0x4c, 0xce, 0x3b, 0xf7, 0xdd, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x5d, 0x66, 0x60, + 0x8b, 0x01, 0x00, 0x00, +} + +func (m *Resource) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Resource) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.DroppedAttributesCount != 0 { + i = encodeVarintResource(dAtA, i, uint64(m.DroppedAttributesCount)) + i-- + dAtA[i] = 0x10 + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintResource(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintResource(dAtA []byte, offset int, v uint64) int { + offset -= sovResource(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base } +func (m *Resource) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovResource(uint64(l)) + } + } + if m.DroppedAttributesCount != 0 { + n += 1 + sovResource(uint64(m.DroppedAttributesCount)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovResource(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozResource(x uint64) (n int) { + return sovResource(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Resource) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + 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: Resource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthResource + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthResource + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &v1.KeyValue{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + m.DroppedAttributesCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResource + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DroppedAttributesCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipResource(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthResource + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipResource(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowResource + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowResource + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowResource + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthResource + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupResource + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthResource + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthResource = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowResource = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupResource = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto-gen/otel/trace/v1/trace.pb.go b/proto-gen/otel/trace/v1/trace.pb.go index e4cf6a6ba67..77e96634425 100644 --- a/proto-gen/otel/trace/v1/trace.pb.go +++ b/proto-gen/otel/trace/v1/trace.pb.go @@ -4,11 +4,16 @@ package v1 import ( + encoding_binary "encoding/binary" fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + github_com_jaegertracing_jaeger_model_v2 "github.com/jaegertracing/jaeger/model/v2" v11 "github.com/jaegertracing/jaeger/proto-gen/otel/common/v1" v1 "github.com/jaegertracing/jaeger/proto-gen/otel/resource/v1" + io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -138,16 +143,25 @@ func (*TracesData) Descriptor() ([]byte, []int) { return fileDescriptor_a52825641200f25e, []int{0} } func (m *TracesData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TracesData.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *TracesData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TracesData.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_TracesData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *TracesData) XXX_Merge(src proto.Message) { xxx_messageInfo_TracesData.Merge(m, src) } func (m *TracesData) XXX_Size() int { - return xxx_messageInfo_TracesData.Size(m) + return m.Size() } func (m *TracesData) XXX_DiscardUnknown() { xxx_messageInfo_TracesData.DiscardUnknown(m) @@ -184,16 +198,25 @@ func (*ResourceSpans) Descriptor() ([]byte, []int) { return fileDescriptor_a52825641200f25e, []int{1} } func (m *ResourceSpans) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResourceSpans.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ResourceSpans) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResourceSpans.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ResourceSpans.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *ResourceSpans) XXX_Merge(src proto.Message) { xxx_messageInfo_ResourceSpans.Merge(m, src) } func (m *ResourceSpans) XXX_Size() int { - return xxx_messageInfo_ResourceSpans.Size(m) + return m.Size() } func (m *ResourceSpans) XXX_DiscardUnknown() { xxx_messageInfo_ResourceSpans.DiscardUnknown(m) @@ -244,16 +267,25 @@ func (*ScopeSpans) Descriptor() ([]byte, []int) { return fileDescriptor_a52825641200f25e, []int{2} } func (m *ScopeSpans) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ScopeSpans.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *ScopeSpans) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ScopeSpans.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_ScopeSpans.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *ScopeSpans) XXX_Merge(src proto.Message) { xxx_messageInfo_ScopeSpans.Merge(m, src) } func (m *ScopeSpans) XXX_Size() int { - return xxx_messageInfo_ScopeSpans.Size(m) + return m.Size() } func (m *ScopeSpans) XXX_DiscardUnknown() { xxx_messageInfo_ScopeSpans.DiscardUnknown(m) @@ -292,21 +324,21 @@ type Span struct { // is zero-length and thus is also invalid). // // This field is required. - TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + TraceID github_com_jaegertracing_jaeger_model_v2.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=github.com/jaegertracing/jaeger/model/v2.TraceID" json:"trace_id"` // A unique identifier for a span within a trace, assigned when the span // is created. The ID is an 8-byte array. An ID with all zeroes OR of length // other than 8 bytes is considered invalid (empty string in OTLP/JSON // is zero-length and thus is also invalid). // // This field is required. - SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` + SpanID github_com_jaegertracing_jaeger_model_v2.SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=github.com/jaegertracing/jaeger/model/v2.SpanID" json:"span_id"` // trace_state conveys information about request position in multiple distributed tracing graphs. // It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header // See also https://github.com/w3c/distributed-tracing for more details about this field. TraceState string `protobuf:"bytes,3,opt,name=trace_state,json=traceState,proto3" json:"trace_state,omitempty"` // The `span_id` of this span's parent span. If this is a root span, then this // field must be empty. The ID is an 8-byte array. - ParentSpanId []byte `protobuf:"bytes,4,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"` + ParentSpanID github_com_jaegertracing_jaeger_model_v2.SpanID `protobuf:"bytes,4,opt,name=parent_span_id,json=parentSpanId,proto3,customtype=github.com/jaegertracing/jaeger/model/v2.SpanID" json:"parent_span_id"` // A description of the span's operation. // // For example, the name can be a qualified method name or a file name @@ -367,7 +399,7 @@ type Span struct { DroppedLinksCount uint32 `protobuf:"varint,14,opt,name=dropped_links_count,json=droppedLinksCount,proto3" json:"dropped_links_count,omitempty"` // An optional final status for this span. Semantically when Status isn't set, it means // span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0). - Status *Status `protobuf:"bytes,15,opt,name=status,proto3" json:"status,omitempty"` + Status Status `protobuf:"bytes,15,opt,name=status,proto3" json:"status"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -380,16 +412,25 @@ func (*Span) Descriptor() ([]byte, []int) { return fileDescriptor_a52825641200f25e, []int{3} } func (m *Span) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Span.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Span.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Span.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Span) XXX_Merge(src proto.Message) { xxx_messageInfo_Span.Merge(m, src) } func (m *Span) XXX_Size() int { - return xxx_messageInfo_Span.Size(m) + return m.Size() } func (m *Span) XXX_DiscardUnknown() { xxx_messageInfo_Span.DiscardUnknown(m) @@ -397,20 +438,6 @@ func (m *Span) XXX_DiscardUnknown() { var xxx_messageInfo_Span proto.InternalMessageInfo -func (m *Span) GetTraceId() []byte { - if m != nil { - return m.TraceId - } - return nil -} - -func (m *Span) GetSpanId() []byte { - if m != nil { - return m.SpanId - } - return nil -} - func (m *Span) GetTraceState() string { if m != nil { return m.TraceState @@ -418,13 +445,6 @@ func (m *Span) GetTraceState() string { return "" } -func (m *Span) GetParentSpanId() []byte { - if m != nil { - return m.ParentSpanId - } - return nil -} - func (m *Span) GetName() string { if m != nil { return m.Name @@ -495,11 +515,11 @@ func (m *Span) GetDroppedLinksCount() uint32 { return 0 } -func (m *Span) GetStatus() *Status { +func (m *Span) GetStatus() Status { if m != nil { return m.Status } - return nil + return Status{} } // Event is a time-stamped annotation of the span, consisting of user-supplied @@ -529,16 +549,25 @@ func (*Span_Event) Descriptor() ([]byte, []int) { return fileDescriptor_a52825641200f25e, []int{3, 0} } func (m *Span_Event) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Span_Event.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Span_Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Span_Event.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Span_Event.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Span_Event) XXX_Merge(src proto.Message) { xxx_messageInfo_Span_Event.Merge(m, src) } func (m *Span_Event) XXX_Size() int { - return xxx_messageInfo_Span_Event.Size(m) + return m.Size() } func (m *Span_Event) XXX_DiscardUnknown() { xxx_messageInfo_Span_Event.DiscardUnknown(m) @@ -581,9 +610,9 @@ func (m *Span_Event) GetDroppedAttributesCount() uint32 { type Span_Link struct { // A unique identifier of a trace that this linked span is part of. The ID is a // 16-byte array. - TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + TraceID github_com_jaegertracing_jaeger_model_v2.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=github.com/jaegertracing/jaeger/model/v2.TraceID" json:"trace_id"` // A unique identifier for the linked span. The ID is an 8-byte array. - SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` + SpanID github_com_jaegertracing_jaeger_model_v2.SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=github.com/jaegertracing/jaeger/model/v2.SpanID" json:"span_id"` // The trace_state associated with the link. TraceState string `protobuf:"bytes,3,opt,name=trace_state,json=traceState,proto3" json:"trace_state,omitempty"` // attributes is a collection of attribute key/value pairs on the link. @@ -605,16 +634,25 @@ func (*Span_Link) Descriptor() ([]byte, []int) { return fileDescriptor_a52825641200f25e, []int{3, 1} } func (m *Span_Link) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Span_Link.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Span_Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Span_Link.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Span_Link.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Span_Link) XXX_Merge(src proto.Message) { xxx_messageInfo_Span_Link.Merge(m, src) } func (m *Span_Link) XXX_Size() int { - return xxx_messageInfo_Span_Link.Size(m) + return m.Size() } func (m *Span_Link) XXX_DiscardUnknown() { xxx_messageInfo_Span_Link.DiscardUnknown(m) @@ -622,20 +660,6 @@ func (m *Span_Link) XXX_DiscardUnknown() { var xxx_messageInfo_Span_Link proto.InternalMessageInfo -func (m *Span_Link) GetTraceId() []byte { - if m != nil { - return m.TraceId - } - return nil -} - -func (m *Span_Link) GetSpanId() []byte { - if m != nil { - return m.SpanId - } - return nil -} - func (m *Span_Link) GetTraceState() string { if m != nil { return m.TraceState @@ -676,16 +700,25 @@ func (*Status) Descriptor() ([]byte, []int) { return fileDescriptor_a52825641200f25e, []int{4} } func (m *Status) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Status.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Status.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_Status.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *Status) XXX_Merge(src proto.Message) { xxx_messageInfo_Status.Merge(m, src) } func (m *Status) XXX_Size() int { - return xxx_messageInfo_Status.Size(m) + return m.Size() } func (m *Status) XXX_DiscardUnknown() { xxx_messageInfo_Status.DiscardUnknown(m) @@ -722,62 +755,2152 @@ func init() { func init() { proto.RegisterFile("trace/v1/trace.proto", fileDescriptor_a52825641200f25e) } var fileDescriptor_a52825641200f25e = []byte{ - // 898 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xd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x28, 0xe6, 0xa0, 0xd8, 0xe2, 0xaf, 0x41, 0x9b, 0x47, 0xbe, 0xba, 0xd0, 0xd6, - 0x59, 0xf7, 0x3d, 0xd3, 0x97, 0xff, 0x0d, 0x22, 0x9f, 0x12, 0xc9, 0xef, 0xda, 0x00, 0x6b, 0x0c, - 0x1f, 0xc3, 0xa1, 0x33, 0x3d, 0x9f, 0xce, 0x1c, 0x77, 0x30, 0x1e, 0x5a, 0xe2, 0xec, 0xd6, 0x54, - 0x7f, 0x80, 0x31, 0xb4, 0x36, 0xe1, 0xf1, 0x85, 0x8e, 0xee, 0x52, 0x2d, 0x42, 0xc6, 0x44, 0xaf, - 0xbc, 0xd6, 0x1a, 0x48, 0xaf, 0xbc, 0xfa, 0x09, 0xc1, 0x93, 0x20, 0x32, 0xa3, 0x98, 0x32, 0x4e, - 0x97, 0x34, 0xa4, 0x3c, 0x79, 0xa7, 0x1e, 0xcc, 0x95, 0xa3, 0x57, 0xea, 0xdd, 0x9c, 0x08, 0x70, - 0x82, 0x7e, 0xf8, 0x66, 0x11, 0xf0, 0x37, 0xd9, 0xb5, 0xe8, 0x70, 0x5f, 0x79, 0x17, 0xc4, 0x80, - 0x2d, 0xf2, 0x5d, 0x5f, 0x66, 0x7f, 0xb5, 0xa0, 0xac, 0x1f, 0x71, 0xba, 0xec, 0x17, 0x2f, 0xfa, - 0xaf, 0x95, 0xc7, 0xe3, 0x98, 0xb2, 0xe9, 0x4a, 0x45, 0x16, 0x34, 0x65, 0x6d, 0xf3, 0xea, 0xf4, - 0xba, 0x26, 0xf3, 0x9e, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x4c, 0xee, 0xb6, 0x03, 0x08, - 0x00, 0x00, + // 987 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xde, 0x49, 0x9d, 0x1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 0x70, 0x88, 0x9e, 0x7e, 0xf6, 0xa6, 0x31, 0x93, 0xd5, 0x1f, 0x4f, + 0x29, 0xd3, 0x7d, 0x4e, 0x67, 0x7a, 0xfa, 0x49, 0xf5, 0x63, 0xe6, 0xfe, 0x20, 0xa0, 0x6c, 0xb4, + 0xec, 0x22, 0x05, 0xe3, 0x51, 0x6f, 0x5e, 0x9c, 0x5c, 0xe6, 0x64, 0xdd, 0xc3, 0xbf, 0x03, 0x00, + 0x00, 0xff, 0xff, 0x2e, 0x63, 0xb5, 0x5e, 0x84, 0x09, 0x00, 0x00, +} + +func (m *TracesData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TracesData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TracesData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.ResourceSpans) > 0 { + for iNdEx := len(m.ResourceSpans) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ResourceSpans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ResourceSpans) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceSpans) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceSpans) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.SchemaUrl) > 0 { + i -= len(m.SchemaUrl) + copy(dAtA[i:], m.SchemaUrl) + i = encodeVarintTrace(dAtA, i, uint64(len(m.SchemaUrl))) + i-- + dAtA[i] = 0x1a + } + if len(m.ScopeSpans) > 0 { + for iNdEx := len(m.ScopeSpans) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ScopeSpans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Resource != nil { + { + size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ScopeSpans) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } + +func (m *ScopeSpans) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ScopeSpans) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.SchemaUrl) > 0 { + i -= len(m.SchemaUrl) + copy(dAtA[i:], m.SchemaUrl) + i = encodeVarintTrace(dAtA, i, uint64(len(m.SchemaUrl))) + i-- + dAtA[i] = 0x1a + } + if len(m.Spans) > 0 { + for iNdEx := len(m.Spans) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Spans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Scope != nil { + { + size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Span) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Span) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Span) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + if m.DroppedLinksCount != 0 { + i = encodeVarintTrace(dAtA, i, uint64(m.DroppedLinksCount)) + i-- + dAtA[i] = 0x70 + } + if len(m.Links) > 0 { + for iNdEx := len(m.Links) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Links[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + } + } + if m.DroppedEventsCount != 0 { + i = encodeVarintTrace(dAtA, i, uint64(m.DroppedEventsCount)) + i-- + dAtA[i] = 0x60 + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + } + if m.DroppedAttributesCount != 0 { + i = encodeVarintTrace(dAtA, i, uint64(m.DroppedAttributesCount)) + i-- + dAtA[i] = 0x50 + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if m.EndTimeUnixNano != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.EndTimeUnixNano)) + i-- + dAtA[i] = 0x41 + } + if m.StartTimeUnixNano != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) + i-- + dAtA[i] = 0x39 + } + if m.Kind != 0 { + i = encodeVarintTrace(dAtA, i, uint64(m.Kind)) + i-- + dAtA[i] = 0x30 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTrace(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x2a + } + { + size := m.ParentSpanID.Size() + i -= size + if _, err := m.ParentSpanID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.TraceState) > 0 { + i -= len(m.TraceState) + copy(dAtA[i:], m.TraceState) + i = encodeVarintTrace(dAtA, i, uint64(len(m.TraceState))) + i-- + dAtA[i] = 0x1a + } + { + size := m.SpanID.Size() + i -= size + if _, err := m.SpanID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.TraceID.Size() + i -= size + if _, err := m.TraceID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Span_Event) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Span_Event) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Span_Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.DroppedAttributesCount != 0 { + i = encodeVarintTrace(dAtA, i, uint64(m.DroppedAttributesCount)) + i-- + dAtA[i] = 0x20 + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTrace(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if m.TimeUnixNano != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *Span_Link) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Span_Link) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Span_Link) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.DroppedAttributesCount != 0 { + i = encodeVarintTrace(dAtA, i, uint64(m.DroppedAttributesCount)) + i-- + dAtA[i] = 0x28 + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.TraceState) > 0 { + i -= len(m.TraceState) + copy(dAtA[i:], m.TraceState) + i = encodeVarintTrace(dAtA, i, uint64(len(m.TraceState))) + i-- + dAtA[i] = 0x1a + } + { + size := m.SpanID.Size() + i -= size + if _, err := m.SpanID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.TraceID.Size() + i -= size + if _, err := m.TraceID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTrace(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Status) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Status) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Status) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Code != 0 { + i = encodeVarintTrace(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x18 + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintTrace(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} + +func encodeVarintTrace(dAtA []byte, offset int, v uint64) int { + offset -= sovTrace(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *TracesData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ResourceSpans) > 0 { + for _, e := range m.ResourceSpans { + l = e.Size() + n += 1 + l + sovTrace(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ResourceSpans) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Resource != nil { + l = m.Resource.Size() + n += 1 + l + sovTrace(uint64(l)) + } + if len(m.ScopeSpans) > 0 { + for _, e := range m.ScopeSpans { + l = e.Size() + n += 1 + l + sovTrace(uint64(l)) + } + } + l = len(m.SchemaUrl) + if l > 0 { + n += 1 + l + sovTrace(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ScopeSpans) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Scope != nil { + l = m.Scope.Size() + n += 1 + l + sovTrace(uint64(l)) + } + if len(m.Spans) > 0 { + for _, e := range m.Spans { + l = e.Size() + n += 1 + l + sovTrace(uint64(l)) + } + } + l = len(m.SchemaUrl) + if l > 0 { + n += 1 + l + sovTrace(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Span) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TraceID.Size() + n += 1 + l + sovTrace(uint64(l)) + l = m.SpanID.Size() + n += 1 + l + sovTrace(uint64(l)) + l = len(m.TraceState) + if l > 0 { + n += 1 + l + sovTrace(uint64(l)) + } + l = m.ParentSpanID.Size() + n += 1 + l + sovTrace(uint64(l)) + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTrace(uint64(l)) + } + if m.Kind != 0 { + n += 1 + sovTrace(uint64(m.Kind)) + } + if m.StartTimeUnixNano != 0 { + n += 9 + } + if m.EndTimeUnixNano != 0 { + n += 9 + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovTrace(uint64(l)) + } + } + if m.DroppedAttributesCount != 0 { + n += 1 + sovTrace(uint64(m.DroppedAttributesCount)) + } + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.Size() + n += 1 + l + sovTrace(uint64(l)) + } + } + if m.DroppedEventsCount != 0 { + n += 1 + sovTrace(uint64(m.DroppedEventsCount)) + } + if len(m.Links) > 0 { + for _, e := range m.Links { + l = e.Size() + n += 1 + l + sovTrace(uint64(l)) + } + } + if m.DroppedLinksCount != 0 { + n += 1 + sovTrace(uint64(m.DroppedLinksCount)) + } + l = m.Status.Size() + n += 1 + l + sovTrace(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Span_Event) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TimeUnixNano != 0 { + n += 9 + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTrace(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovTrace(uint64(l)) + } + } + if m.DroppedAttributesCount != 0 { + n += 1 + sovTrace(uint64(m.DroppedAttributesCount)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Span_Link) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TraceID.Size() + n += 1 + l + sovTrace(uint64(l)) + l = m.SpanID.Size() + n += 1 + l + sovTrace(uint64(l)) + l = len(m.TraceState) + if l > 0 { + n += 1 + l + sovTrace(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovTrace(uint64(l)) + } + } + if m.DroppedAttributesCount != 0 { + n += 1 + sovTrace(uint64(m.DroppedAttributesCount)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Status) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Message) + if l > 0 { + n += 1 + l + sovTrace(uint64(l)) + } + if m.Code != 0 { + n += 1 + sovTrace(uint64(m.Code)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTrace(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTrace(x uint64) (n int) { + return sovTrace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *TracesData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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: TracesData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TracesData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceSpans", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceSpans = append(m.ResourceSpans, &ResourceSpans{}) + if err := m.ResourceSpans[len(m.ResourceSpans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTrace(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTrace + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceSpans) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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: ResourceSpans: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceSpans: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Resource == nil { + m.Resource = &v1.Resource{} + } + if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScopeSpans", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ScopeSpans = append(m.ScopeSpans, &ScopeSpans{}) + if err := m.ScopeSpans[len(m.ScopeSpans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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 ErrInvalidLengthTrace + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SchemaUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTrace(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTrace + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ScopeSpans) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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: ScopeSpans: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ScopeSpans: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Scope == nil { + m.Scope = &v11.InstrumentationScope{} + } + if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Spans = append(m.Spans, &Span{}) + if err := m.Spans[len(m.Spans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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 ErrInvalidLengthTrace + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SchemaUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTrace(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTrace + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Span) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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: Span: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Span: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TraceID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SpanID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceState", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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 ErrInvalidLengthTrace + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TraceState = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParentSpanID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ParentSpanID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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 ErrInvalidLengthTrace + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + m.Kind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Kind |= Span_SpanKind(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) + } + m.StartTimeUnixNano = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTimeUnixNano", wireType) + } + m.EndTimeUnixNano = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.EndTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &v11.KeyValue{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + m.DroppedAttributesCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DroppedAttributesCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Span_Event{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedEventsCount", wireType) + } + m.DroppedEventsCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DroppedEventsCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Links = append(m.Links, &Span_Link{}) + if err := m.Links[len(m.Links)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedLinksCount", wireType) + } + m.DroppedLinksCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DroppedLinksCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTrace(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTrace + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Span_Event) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) + } + m.TimeUnixNano = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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 ErrInvalidLengthTrace + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &v11.KeyValue{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + m.DroppedAttributesCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DroppedAttributesCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTrace(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTrace + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Span_Link) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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: Link: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Link: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TraceID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SpanID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceState", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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 ErrInvalidLengthTrace + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TraceState = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTrace + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &v11.KeyValue{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + m.DroppedAttributesCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DroppedAttributesCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTrace(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTrace + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Status) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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: Status: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Status: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + 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 ErrInvalidLengthTrace + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTrace + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTrace + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= Status_StatusCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTrace(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTrace + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTrace(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTrace + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTrace + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTrace + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTrace + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTrace + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTrace + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTrace = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTrace = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTrace = fmt.Errorf("proto: unexpected end of group") +) diff --git a/scripts/updateLicense.py b/scripts/updateLicense.py index 7c8ed089377..5297861eaa0 100755 --- a/scripts/updateLicense.py +++ b/scripts/updateLicense.py @@ -11,18 +11,7 @@ CURRENT_YEAR = datetime.today().year LICENSE_BLOB = """Copyright (c) %d The Jaeger Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License.""" % CURRENT_YEAR +SPDX-License-Identifier: Apache-2.0""" % CURRENT_YEAR LICENSE_BLOB_LINES_GO = [ ('// ' + l).strip() + '\n' for l in LICENSE_BLOB.split('\n')