github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/util/tracing/recorded_span.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: util/tracing/recorded_span.proto 3 4 package tracing 5 6 import proto "github.com/gogo/protobuf/proto" 7 import fmt "fmt" 8 import math "math" 9 import types "github.com/gogo/protobuf/types" 10 11 import time "time" 12 13 import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" 14 import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 15 16 import io "io" 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 var _ = time.Kitchen 23 24 // This is a compile-time assertion to ensure that this generated file 25 // is compatible with the proto package it is being compiled against. 26 // A compilation error at this line likely means your copy of the 27 // proto package needs to be updated. 28 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 29 30 // LogRecord is a log message recorded in a traced span. 31 type LogRecord struct { 32 // Time of the log record. 33 Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time"` 34 // Fields with values converted to strings. 35 Fields []LogRecord_Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields"` 36 } 37 38 func (m *LogRecord) Reset() { *m = LogRecord{} } 39 func (m *LogRecord) String() string { return proto.CompactTextString(m) } 40 func (*LogRecord) ProtoMessage() {} 41 func (*LogRecord) Descriptor() ([]byte, []int) { 42 return fileDescriptor_recorded_span_ec83bd4619f89f60, []int{0} 43 } 44 func (m *LogRecord) XXX_Unmarshal(b []byte) error { 45 return m.Unmarshal(b) 46 } 47 func (m *LogRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 48 b = b[:cap(b)] 49 n, err := m.MarshalTo(b) 50 if err != nil { 51 return nil, err 52 } 53 return b[:n], nil 54 } 55 func (dst *LogRecord) XXX_Merge(src proto.Message) { 56 xxx_messageInfo_LogRecord.Merge(dst, src) 57 } 58 func (m *LogRecord) XXX_Size() int { 59 return m.Size() 60 } 61 func (m *LogRecord) XXX_DiscardUnknown() { 62 xxx_messageInfo_LogRecord.DiscardUnknown(m) 63 } 64 65 var xxx_messageInfo_LogRecord proto.InternalMessageInfo 66 67 type LogRecord_Field struct { 68 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 69 Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` 70 } 71 72 func (m *LogRecord_Field) Reset() { *m = LogRecord_Field{} } 73 func (m *LogRecord_Field) String() string { return proto.CompactTextString(m) } 74 func (*LogRecord_Field) ProtoMessage() {} 75 func (*LogRecord_Field) Descriptor() ([]byte, []int) { 76 return fileDescriptor_recorded_span_ec83bd4619f89f60, []int{0, 0} 77 } 78 func (m *LogRecord_Field) XXX_Unmarshal(b []byte) error { 79 return m.Unmarshal(b) 80 } 81 func (m *LogRecord_Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 82 b = b[:cap(b)] 83 n, err := m.MarshalTo(b) 84 if err != nil { 85 return nil, err 86 } 87 return b[:n], nil 88 } 89 func (dst *LogRecord_Field) XXX_Merge(src proto.Message) { 90 xxx_messageInfo_LogRecord_Field.Merge(dst, src) 91 } 92 func (m *LogRecord_Field) XXX_Size() int { 93 return m.Size() 94 } 95 func (m *LogRecord_Field) XXX_DiscardUnknown() { 96 xxx_messageInfo_LogRecord_Field.DiscardUnknown(m) 97 } 98 99 var xxx_messageInfo_LogRecord_Field proto.InternalMessageInfo 100 101 // RecordedSpan is a span that is part of a recording. It can be transferred 102 // over the wire for snowball tracing. 103 type RecordedSpan struct { 104 // ID of the trace; spans that are part of the same hierarchy share 105 // the same trace ID. 106 TraceID uint64 `protobuf:"varint,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` 107 // ID of the span. 108 SpanID uint64 `protobuf:"varint,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` 109 // Span ID of the parent span. 110 ParentSpanID uint64 `protobuf:"varint,3,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"` 111 // Operation name. 112 Operation string `protobuf:"bytes,4,opt,name=operation,proto3" json:"operation,omitempty"` 113 // Baggage items get passed from parent to child spans (even through gRPC). 114 // Notably, snowball tracing uses a special `sb` baggage item. 115 Baggage map[string]string `protobuf:"bytes,5,rep,name=baggage,proto3" json:"baggage,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 116 // Tags associated with the span. 117 Tags map[string]string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 118 // Time when the span was started. 119 StartTime time.Time `protobuf:"bytes,7,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"` 120 // Duration is the span's duration, measured from start to Finish(). 121 // 122 // A spans whose recording is collected before it's finished will have the 123 // duration set as the time of collection - start_time. Such a span will have 124 // an "unfinished" tag. 125 Duration time.Duration `protobuf:"bytes,8,opt,name=duration,proto3,stdduration" json:"duration"` 126 // Events logged in the span. 127 Logs []LogRecord `protobuf:"bytes,9,rep,name=logs,proto3" json:"logs"` 128 // Stats collected in this span. 129 Stats *types.Any `protobuf:"bytes,10,opt,name=stats,proto3" json:"stats,omitempty"` 130 } 131 132 func (m *RecordedSpan) Reset() { *m = RecordedSpan{} } 133 func (*RecordedSpan) ProtoMessage() {} 134 func (*RecordedSpan) Descriptor() ([]byte, []int) { 135 return fileDescriptor_recorded_span_ec83bd4619f89f60, []int{1} 136 } 137 func (m *RecordedSpan) XXX_Unmarshal(b []byte) error { 138 return m.Unmarshal(b) 139 } 140 func (m *RecordedSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 141 b = b[:cap(b)] 142 n, err := m.MarshalTo(b) 143 if err != nil { 144 return nil, err 145 } 146 return b[:n], nil 147 } 148 func (dst *RecordedSpan) XXX_Merge(src proto.Message) { 149 xxx_messageInfo_RecordedSpan.Merge(dst, src) 150 } 151 func (m *RecordedSpan) XXX_Size() int { 152 return m.Size() 153 } 154 func (m *RecordedSpan) XXX_DiscardUnknown() { 155 xxx_messageInfo_RecordedSpan.DiscardUnknown(m) 156 } 157 158 var xxx_messageInfo_RecordedSpan proto.InternalMessageInfo 159 160 // NormalizedSpan is a representation of a RecordedSpan from a trace with all 161 // its children embedded, recursively. This JSON serialization of this proto is 162 // used in the system.statement_diagnostics.trace column. 163 // 164 // See RecordedSpan for the description of the fields. 165 type NormalizedSpan struct { 166 Operation string `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` 167 Tags map[string]string `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 168 StartTime time.Time `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"` 169 Duration time.Duration `protobuf:"bytes,4,opt,name=duration,proto3,stdduration" json:"duration"` 170 Logs []LogRecord `protobuf:"bytes,5,rep,name=logs,proto3" json:"logs"` 171 Children []NormalizedSpan `protobuf:"bytes,6,rep,name=children,proto3" json:"children"` 172 } 173 174 func (m *NormalizedSpan) Reset() { *m = NormalizedSpan{} } 175 func (m *NormalizedSpan) String() string { return proto.CompactTextString(m) } 176 func (*NormalizedSpan) ProtoMessage() {} 177 func (*NormalizedSpan) Descriptor() ([]byte, []int) { 178 return fileDescriptor_recorded_span_ec83bd4619f89f60, []int{2} 179 } 180 func (m *NormalizedSpan) XXX_Unmarshal(b []byte) error { 181 return m.Unmarshal(b) 182 } 183 func (m *NormalizedSpan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 184 b = b[:cap(b)] 185 n, err := m.MarshalTo(b) 186 if err != nil { 187 return nil, err 188 } 189 return b[:n], nil 190 } 191 func (dst *NormalizedSpan) XXX_Merge(src proto.Message) { 192 xxx_messageInfo_NormalizedSpan.Merge(dst, src) 193 } 194 func (m *NormalizedSpan) XXX_Size() int { 195 return m.Size() 196 } 197 func (m *NormalizedSpan) XXX_DiscardUnknown() { 198 xxx_messageInfo_NormalizedSpan.DiscardUnknown(m) 199 } 200 201 var xxx_messageInfo_NormalizedSpan proto.InternalMessageInfo 202 203 func init() { 204 proto.RegisterType((*LogRecord)(nil), "cockroach.util.tracing.LogRecord") 205 proto.RegisterType((*LogRecord_Field)(nil), "cockroach.util.tracing.LogRecord.Field") 206 proto.RegisterType((*RecordedSpan)(nil), "cockroach.util.tracing.RecordedSpan") 207 proto.RegisterMapType((map[string]string)(nil), "cockroach.util.tracing.RecordedSpan.BaggageEntry") 208 proto.RegisterMapType((map[string]string)(nil), "cockroach.util.tracing.RecordedSpan.TagsEntry") 209 proto.RegisterType((*NormalizedSpan)(nil), "cockroach.util.tracing.NormalizedSpan") 210 proto.RegisterMapType((map[string]string)(nil), "cockroach.util.tracing.NormalizedSpan.TagsEntry") 211 } 212 func (m *LogRecord) Marshal() (dAtA []byte, err error) { 213 size := m.Size() 214 dAtA = make([]byte, size) 215 n, err := m.MarshalTo(dAtA) 216 if err != nil { 217 return nil, err 218 } 219 return dAtA[:n], nil 220 } 221 222 func (m *LogRecord) MarshalTo(dAtA []byte) (int, error) { 223 var i int 224 _ = i 225 var l int 226 _ = l 227 dAtA[i] = 0xa 228 i++ 229 i = encodeVarintRecordedSpan(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Time))) 230 n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i:]) 231 if err != nil { 232 return 0, err 233 } 234 i += n1 235 if len(m.Fields) > 0 { 236 for _, msg := range m.Fields { 237 dAtA[i] = 0x12 238 i++ 239 i = encodeVarintRecordedSpan(dAtA, i, uint64(msg.Size())) 240 n, err := msg.MarshalTo(dAtA[i:]) 241 if err != nil { 242 return 0, err 243 } 244 i += n 245 } 246 } 247 return i, nil 248 } 249 250 func (m *LogRecord_Field) Marshal() (dAtA []byte, err error) { 251 size := m.Size() 252 dAtA = make([]byte, size) 253 n, err := m.MarshalTo(dAtA) 254 if err != nil { 255 return nil, err 256 } 257 return dAtA[:n], nil 258 } 259 260 func (m *LogRecord_Field) MarshalTo(dAtA []byte) (int, error) { 261 var i int 262 _ = i 263 var l int 264 _ = l 265 if len(m.Key) > 0 { 266 dAtA[i] = 0xa 267 i++ 268 i = encodeVarintRecordedSpan(dAtA, i, uint64(len(m.Key))) 269 i += copy(dAtA[i:], m.Key) 270 } 271 if len(m.Value) > 0 { 272 dAtA[i] = 0x12 273 i++ 274 i = encodeVarintRecordedSpan(dAtA, i, uint64(len(m.Value))) 275 i += copy(dAtA[i:], m.Value) 276 } 277 return i, nil 278 } 279 280 func (m *RecordedSpan) Marshal() (dAtA []byte, err error) { 281 size := m.Size() 282 dAtA = make([]byte, size) 283 n, err := m.MarshalTo(dAtA) 284 if err != nil { 285 return nil, err 286 } 287 return dAtA[:n], nil 288 } 289 290 func (m *RecordedSpan) MarshalTo(dAtA []byte) (int, error) { 291 var i int 292 _ = i 293 var l int 294 _ = l 295 if m.TraceID != 0 { 296 dAtA[i] = 0x8 297 i++ 298 i = encodeVarintRecordedSpan(dAtA, i, uint64(m.TraceID)) 299 } 300 if m.SpanID != 0 { 301 dAtA[i] = 0x10 302 i++ 303 i = encodeVarintRecordedSpan(dAtA, i, uint64(m.SpanID)) 304 } 305 if m.ParentSpanID != 0 { 306 dAtA[i] = 0x18 307 i++ 308 i = encodeVarintRecordedSpan(dAtA, i, uint64(m.ParentSpanID)) 309 } 310 if len(m.Operation) > 0 { 311 dAtA[i] = 0x22 312 i++ 313 i = encodeVarintRecordedSpan(dAtA, i, uint64(len(m.Operation))) 314 i += copy(dAtA[i:], m.Operation) 315 } 316 if len(m.Baggage) > 0 { 317 keysForBaggage := make([]string, 0, len(m.Baggage)) 318 for k := range m.Baggage { 319 keysForBaggage = append(keysForBaggage, string(k)) 320 } 321 github_com_gogo_protobuf_sortkeys.Strings(keysForBaggage) 322 for _, k := range keysForBaggage { 323 dAtA[i] = 0x2a 324 i++ 325 v := m.Baggage[string(k)] 326 mapSize := 1 + len(k) + sovRecordedSpan(uint64(len(k))) + 1 + len(v) + sovRecordedSpan(uint64(len(v))) 327 i = encodeVarintRecordedSpan(dAtA, i, uint64(mapSize)) 328 dAtA[i] = 0xa 329 i++ 330 i = encodeVarintRecordedSpan(dAtA, i, uint64(len(k))) 331 i += copy(dAtA[i:], k) 332 dAtA[i] = 0x12 333 i++ 334 i = encodeVarintRecordedSpan(dAtA, i, uint64(len(v))) 335 i += copy(dAtA[i:], v) 336 } 337 } 338 if len(m.Tags) > 0 { 339 keysForTags := make([]string, 0, len(m.Tags)) 340 for k := range m.Tags { 341 keysForTags = append(keysForTags, string(k)) 342 } 343 github_com_gogo_protobuf_sortkeys.Strings(keysForTags) 344 for _, k := range keysForTags { 345 dAtA[i] = 0x32 346 i++ 347 v := m.Tags[string(k)] 348 mapSize := 1 + len(k) + sovRecordedSpan(uint64(len(k))) + 1 + len(v) + sovRecordedSpan(uint64(len(v))) 349 i = encodeVarintRecordedSpan(dAtA, i, uint64(mapSize)) 350 dAtA[i] = 0xa 351 i++ 352 i = encodeVarintRecordedSpan(dAtA, i, uint64(len(k))) 353 i += copy(dAtA[i:], k) 354 dAtA[i] = 0x12 355 i++ 356 i = encodeVarintRecordedSpan(dAtA, i, uint64(len(v))) 357 i += copy(dAtA[i:], v) 358 } 359 } 360 dAtA[i] = 0x3a 361 i++ 362 i = encodeVarintRecordedSpan(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime))) 363 n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i:]) 364 if err != nil { 365 return 0, err 366 } 367 i += n2 368 dAtA[i] = 0x42 369 i++ 370 i = encodeVarintRecordedSpan(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration))) 371 n3, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i:]) 372 if err != nil { 373 return 0, err 374 } 375 i += n3 376 if len(m.Logs) > 0 { 377 for _, msg := range m.Logs { 378 dAtA[i] = 0x4a 379 i++ 380 i = encodeVarintRecordedSpan(dAtA, i, uint64(msg.Size())) 381 n, err := msg.MarshalTo(dAtA[i:]) 382 if err != nil { 383 return 0, err 384 } 385 i += n 386 } 387 } 388 if m.Stats != nil { 389 dAtA[i] = 0x52 390 i++ 391 i = encodeVarintRecordedSpan(dAtA, i, uint64(m.Stats.Size())) 392 n4, err := m.Stats.MarshalTo(dAtA[i:]) 393 if err != nil { 394 return 0, err 395 } 396 i += n4 397 } 398 return i, nil 399 } 400 401 func (m *NormalizedSpan) Marshal() (dAtA []byte, err error) { 402 size := m.Size() 403 dAtA = make([]byte, size) 404 n, err := m.MarshalTo(dAtA) 405 if err != nil { 406 return nil, err 407 } 408 return dAtA[:n], nil 409 } 410 411 func (m *NormalizedSpan) MarshalTo(dAtA []byte) (int, error) { 412 var i int 413 _ = i 414 var l int 415 _ = l 416 if len(m.Operation) > 0 { 417 dAtA[i] = 0xa 418 i++ 419 i = encodeVarintRecordedSpan(dAtA, i, uint64(len(m.Operation))) 420 i += copy(dAtA[i:], m.Operation) 421 } 422 if len(m.Tags) > 0 { 423 keysForTags := make([]string, 0, len(m.Tags)) 424 for k := range m.Tags { 425 keysForTags = append(keysForTags, string(k)) 426 } 427 github_com_gogo_protobuf_sortkeys.Strings(keysForTags) 428 for _, k := range keysForTags { 429 dAtA[i] = 0x12 430 i++ 431 v := m.Tags[string(k)] 432 mapSize := 1 + len(k) + sovRecordedSpan(uint64(len(k))) + 1 + len(v) + sovRecordedSpan(uint64(len(v))) 433 i = encodeVarintRecordedSpan(dAtA, i, uint64(mapSize)) 434 dAtA[i] = 0xa 435 i++ 436 i = encodeVarintRecordedSpan(dAtA, i, uint64(len(k))) 437 i += copy(dAtA[i:], k) 438 dAtA[i] = 0x12 439 i++ 440 i = encodeVarintRecordedSpan(dAtA, i, uint64(len(v))) 441 i += copy(dAtA[i:], v) 442 } 443 } 444 dAtA[i] = 0x1a 445 i++ 446 i = encodeVarintRecordedSpan(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime))) 447 n5, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i:]) 448 if err != nil { 449 return 0, err 450 } 451 i += n5 452 dAtA[i] = 0x22 453 i++ 454 i = encodeVarintRecordedSpan(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration))) 455 n6, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i:]) 456 if err != nil { 457 return 0, err 458 } 459 i += n6 460 if len(m.Logs) > 0 { 461 for _, msg := range m.Logs { 462 dAtA[i] = 0x2a 463 i++ 464 i = encodeVarintRecordedSpan(dAtA, i, uint64(msg.Size())) 465 n, err := msg.MarshalTo(dAtA[i:]) 466 if err != nil { 467 return 0, err 468 } 469 i += n 470 } 471 } 472 if len(m.Children) > 0 { 473 for _, msg := range m.Children { 474 dAtA[i] = 0x32 475 i++ 476 i = encodeVarintRecordedSpan(dAtA, i, uint64(msg.Size())) 477 n, err := msg.MarshalTo(dAtA[i:]) 478 if err != nil { 479 return 0, err 480 } 481 i += n 482 } 483 } 484 return i, nil 485 } 486 487 func encodeVarintRecordedSpan(dAtA []byte, offset int, v uint64) int { 488 for v >= 1<<7 { 489 dAtA[offset] = uint8(v&0x7f | 0x80) 490 v >>= 7 491 offset++ 492 } 493 dAtA[offset] = uint8(v) 494 return offset + 1 495 } 496 func (m *LogRecord) Size() (n int) { 497 if m == nil { 498 return 0 499 } 500 var l int 501 _ = l 502 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) 503 n += 1 + l + sovRecordedSpan(uint64(l)) 504 if len(m.Fields) > 0 { 505 for _, e := range m.Fields { 506 l = e.Size() 507 n += 1 + l + sovRecordedSpan(uint64(l)) 508 } 509 } 510 return n 511 } 512 513 func (m *LogRecord_Field) Size() (n int) { 514 if m == nil { 515 return 0 516 } 517 var l int 518 _ = l 519 l = len(m.Key) 520 if l > 0 { 521 n += 1 + l + sovRecordedSpan(uint64(l)) 522 } 523 l = len(m.Value) 524 if l > 0 { 525 n += 1 + l + sovRecordedSpan(uint64(l)) 526 } 527 return n 528 } 529 530 func (m *RecordedSpan) Size() (n int) { 531 if m == nil { 532 return 0 533 } 534 var l int 535 _ = l 536 if m.TraceID != 0 { 537 n += 1 + sovRecordedSpan(uint64(m.TraceID)) 538 } 539 if m.SpanID != 0 { 540 n += 1 + sovRecordedSpan(uint64(m.SpanID)) 541 } 542 if m.ParentSpanID != 0 { 543 n += 1 + sovRecordedSpan(uint64(m.ParentSpanID)) 544 } 545 l = len(m.Operation) 546 if l > 0 { 547 n += 1 + l + sovRecordedSpan(uint64(l)) 548 } 549 if len(m.Baggage) > 0 { 550 for k, v := range m.Baggage { 551 _ = k 552 _ = v 553 mapEntrySize := 1 + len(k) + sovRecordedSpan(uint64(len(k))) + 1 + len(v) + sovRecordedSpan(uint64(len(v))) 554 n += mapEntrySize + 1 + sovRecordedSpan(uint64(mapEntrySize)) 555 } 556 } 557 if len(m.Tags) > 0 { 558 for k, v := range m.Tags { 559 _ = k 560 _ = v 561 mapEntrySize := 1 + len(k) + sovRecordedSpan(uint64(len(k))) + 1 + len(v) + sovRecordedSpan(uint64(len(v))) 562 n += mapEntrySize + 1 + sovRecordedSpan(uint64(mapEntrySize)) 563 } 564 } 565 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) 566 n += 1 + l + sovRecordedSpan(uint64(l)) 567 l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) 568 n += 1 + l + sovRecordedSpan(uint64(l)) 569 if len(m.Logs) > 0 { 570 for _, e := range m.Logs { 571 l = e.Size() 572 n += 1 + l + sovRecordedSpan(uint64(l)) 573 } 574 } 575 if m.Stats != nil { 576 l = m.Stats.Size() 577 n += 1 + l + sovRecordedSpan(uint64(l)) 578 } 579 return n 580 } 581 582 func (m *NormalizedSpan) Size() (n int) { 583 if m == nil { 584 return 0 585 } 586 var l int 587 _ = l 588 l = len(m.Operation) 589 if l > 0 { 590 n += 1 + l + sovRecordedSpan(uint64(l)) 591 } 592 if len(m.Tags) > 0 { 593 for k, v := range m.Tags { 594 _ = k 595 _ = v 596 mapEntrySize := 1 + len(k) + sovRecordedSpan(uint64(len(k))) + 1 + len(v) + sovRecordedSpan(uint64(len(v))) 597 n += mapEntrySize + 1 + sovRecordedSpan(uint64(mapEntrySize)) 598 } 599 } 600 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) 601 n += 1 + l + sovRecordedSpan(uint64(l)) 602 l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) 603 n += 1 + l + sovRecordedSpan(uint64(l)) 604 if len(m.Logs) > 0 { 605 for _, e := range m.Logs { 606 l = e.Size() 607 n += 1 + l + sovRecordedSpan(uint64(l)) 608 } 609 } 610 if len(m.Children) > 0 { 611 for _, e := range m.Children { 612 l = e.Size() 613 n += 1 + l + sovRecordedSpan(uint64(l)) 614 } 615 } 616 return n 617 } 618 619 func sovRecordedSpan(x uint64) (n int) { 620 for { 621 n++ 622 x >>= 7 623 if x == 0 { 624 break 625 } 626 } 627 return n 628 } 629 func sozRecordedSpan(x uint64) (n int) { 630 return sovRecordedSpan(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 631 } 632 func (m *LogRecord) Unmarshal(dAtA []byte) error { 633 l := len(dAtA) 634 iNdEx := 0 635 for iNdEx < l { 636 preIndex := iNdEx 637 var wire uint64 638 for shift := uint(0); ; shift += 7 { 639 if shift >= 64 { 640 return ErrIntOverflowRecordedSpan 641 } 642 if iNdEx >= l { 643 return io.ErrUnexpectedEOF 644 } 645 b := dAtA[iNdEx] 646 iNdEx++ 647 wire |= (uint64(b) & 0x7F) << shift 648 if b < 0x80 { 649 break 650 } 651 } 652 fieldNum := int32(wire >> 3) 653 wireType := int(wire & 0x7) 654 if wireType == 4 { 655 return fmt.Errorf("proto: LogRecord: wiretype end group for non-group") 656 } 657 if fieldNum <= 0 { 658 return fmt.Errorf("proto: LogRecord: illegal tag %d (wire type %d)", fieldNum, wire) 659 } 660 switch fieldNum { 661 case 1: 662 if wireType != 2 { 663 return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) 664 } 665 var msglen int 666 for shift := uint(0); ; shift += 7 { 667 if shift >= 64 { 668 return ErrIntOverflowRecordedSpan 669 } 670 if iNdEx >= l { 671 return io.ErrUnexpectedEOF 672 } 673 b := dAtA[iNdEx] 674 iNdEx++ 675 msglen |= (int(b) & 0x7F) << shift 676 if b < 0x80 { 677 break 678 } 679 } 680 if msglen < 0 { 681 return ErrInvalidLengthRecordedSpan 682 } 683 postIndex := iNdEx + msglen 684 if postIndex > l { 685 return io.ErrUnexpectedEOF 686 } 687 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { 688 return err 689 } 690 iNdEx = postIndex 691 case 2: 692 if wireType != 2 { 693 return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) 694 } 695 var msglen int 696 for shift := uint(0); ; shift += 7 { 697 if shift >= 64 { 698 return ErrIntOverflowRecordedSpan 699 } 700 if iNdEx >= l { 701 return io.ErrUnexpectedEOF 702 } 703 b := dAtA[iNdEx] 704 iNdEx++ 705 msglen |= (int(b) & 0x7F) << shift 706 if b < 0x80 { 707 break 708 } 709 } 710 if msglen < 0 { 711 return ErrInvalidLengthRecordedSpan 712 } 713 postIndex := iNdEx + msglen 714 if postIndex > l { 715 return io.ErrUnexpectedEOF 716 } 717 m.Fields = append(m.Fields, LogRecord_Field{}) 718 if err := m.Fields[len(m.Fields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 719 return err 720 } 721 iNdEx = postIndex 722 default: 723 iNdEx = preIndex 724 skippy, err := skipRecordedSpan(dAtA[iNdEx:]) 725 if err != nil { 726 return err 727 } 728 if skippy < 0 { 729 return ErrInvalidLengthRecordedSpan 730 } 731 if (iNdEx + skippy) > l { 732 return io.ErrUnexpectedEOF 733 } 734 iNdEx += skippy 735 } 736 } 737 738 if iNdEx > l { 739 return io.ErrUnexpectedEOF 740 } 741 return nil 742 } 743 func (m *LogRecord_Field) Unmarshal(dAtA []byte) error { 744 l := len(dAtA) 745 iNdEx := 0 746 for iNdEx < l { 747 preIndex := iNdEx 748 var wire uint64 749 for shift := uint(0); ; shift += 7 { 750 if shift >= 64 { 751 return ErrIntOverflowRecordedSpan 752 } 753 if iNdEx >= l { 754 return io.ErrUnexpectedEOF 755 } 756 b := dAtA[iNdEx] 757 iNdEx++ 758 wire |= (uint64(b) & 0x7F) << shift 759 if b < 0x80 { 760 break 761 } 762 } 763 fieldNum := int32(wire >> 3) 764 wireType := int(wire & 0x7) 765 if wireType == 4 { 766 return fmt.Errorf("proto: Field: wiretype end group for non-group") 767 } 768 if fieldNum <= 0 { 769 return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire) 770 } 771 switch fieldNum { 772 case 1: 773 if wireType != 2 { 774 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 775 } 776 var stringLen uint64 777 for shift := uint(0); ; shift += 7 { 778 if shift >= 64 { 779 return ErrIntOverflowRecordedSpan 780 } 781 if iNdEx >= l { 782 return io.ErrUnexpectedEOF 783 } 784 b := dAtA[iNdEx] 785 iNdEx++ 786 stringLen |= (uint64(b) & 0x7F) << shift 787 if b < 0x80 { 788 break 789 } 790 } 791 intStringLen := int(stringLen) 792 if intStringLen < 0 { 793 return ErrInvalidLengthRecordedSpan 794 } 795 postIndex := iNdEx + intStringLen 796 if postIndex > l { 797 return io.ErrUnexpectedEOF 798 } 799 m.Key = string(dAtA[iNdEx:postIndex]) 800 iNdEx = postIndex 801 case 2: 802 if wireType != 2 { 803 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 804 } 805 var stringLen uint64 806 for shift := uint(0); ; shift += 7 { 807 if shift >= 64 { 808 return ErrIntOverflowRecordedSpan 809 } 810 if iNdEx >= l { 811 return io.ErrUnexpectedEOF 812 } 813 b := dAtA[iNdEx] 814 iNdEx++ 815 stringLen |= (uint64(b) & 0x7F) << shift 816 if b < 0x80 { 817 break 818 } 819 } 820 intStringLen := int(stringLen) 821 if intStringLen < 0 { 822 return ErrInvalidLengthRecordedSpan 823 } 824 postIndex := iNdEx + intStringLen 825 if postIndex > l { 826 return io.ErrUnexpectedEOF 827 } 828 m.Value = string(dAtA[iNdEx:postIndex]) 829 iNdEx = postIndex 830 default: 831 iNdEx = preIndex 832 skippy, err := skipRecordedSpan(dAtA[iNdEx:]) 833 if err != nil { 834 return err 835 } 836 if skippy < 0 { 837 return ErrInvalidLengthRecordedSpan 838 } 839 if (iNdEx + skippy) > l { 840 return io.ErrUnexpectedEOF 841 } 842 iNdEx += skippy 843 } 844 } 845 846 if iNdEx > l { 847 return io.ErrUnexpectedEOF 848 } 849 return nil 850 } 851 func (m *RecordedSpan) Unmarshal(dAtA []byte) error { 852 l := len(dAtA) 853 iNdEx := 0 854 for iNdEx < l { 855 preIndex := iNdEx 856 var wire uint64 857 for shift := uint(0); ; shift += 7 { 858 if shift >= 64 { 859 return ErrIntOverflowRecordedSpan 860 } 861 if iNdEx >= l { 862 return io.ErrUnexpectedEOF 863 } 864 b := dAtA[iNdEx] 865 iNdEx++ 866 wire |= (uint64(b) & 0x7F) << shift 867 if b < 0x80 { 868 break 869 } 870 } 871 fieldNum := int32(wire >> 3) 872 wireType := int(wire & 0x7) 873 if wireType == 4 { 874 return fmt.Errorf("proto: RecordedSpan: wiretype end group for non-group") 875 } 876 if fieldNum <= 0 { 877 return fmt.Errorf("proto: RecordedSpan: illegal tag %d (wire type %d)", fieldNum, wire) 878 } 879 switch fieldNum { 880 case 1: 881 if wireType != 0 { 882 return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) 883 } 884 m.TraceID = 0 885 for shift := uint(0); ; shift += 7 { 886 if shift >= 64 { 887 return ErrIntOverflowRecordedSpan 888 } 889 if iNdEx >= l { 890 return io.ErrUnexpectedEOF 891 } 892 b := dAtA[iNdEx] 893 iNdEx++ 894 m.TraceID |= (uint64(b) & 0x7F) << shift 895 if b < 0x80 { 896 break 897 } 898 } 899 case 2: 900 if wireType != 0 { 901 return fmt.Errorf("proto: wrong wireType = %d for field SpanID", wireType) 902 } 903 m.SpanID = 0 904 for shift := uint(0); ; shift += 7 { 905 if shift >= 64 { 906 return ErrIntOverflowRecordedSpan 907 } 908 if iNdEx >= l { 909 return io.ErrUnexpectedEOF 910 } 911 b := dAtA[iNdEx] 912 iNdEx++ 913 m.SpanID |= (uint64(b) & 0x7F) << shift 914 if b < 0x80 { 915 break 916 } 917 } 918 case 3: 919 if wireType != 0 { 920 return fmt.Errorf("proto: wrong wireType = %d for field ParentSpanID", wireType) 921 } 922 m.ParentSpanID = 0 923 for shift := uint(0); ; shift += 7 { 924 if shift >= 64 { 925 return ErrIntOverflowRecordedSpan 926 } 927 if iNdEx >= l { 928 return io.ErrUnexpectedEOF 929 } 930 b := dAtA[iNdEx] 931 iNdEx++ 932 m.ParentSpanID |= (uint64(b) & 0x7F) << shift 933 if b < 0x80 { 934 break 935 } 936 } 937 case 4: 938 if wireType != 2 { 939 return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) 940 } 941 var stringLen uint64 942 for shift := uint(0); ; shift += 7 { 943 if shift >= 64 { 944 return ErrIntOverflowRecordedSpan 945 } 946 if iNdEx >= l { 947 return io.ErrUnexpectedEOF 948 } 949 b := dAtA[iNdEx] 950 iNdEx++ 951 stringLen |= (uint64(b) & 0x7F) << shift 952 if b < 0x80 { 953 break 954 } 955 } 956 intStringLen := int(stringLen) 957 if intStringLen < 0 { 958 return ErrInvalidLengthRecordedSpan 959 } 960 postIndex := iNdEx + intStringLen 961 if postIndex > l { 962 return io.ErrUnexpectedEOF 963 } 964 m.Operation = string(dAtA[iNdEx:postIndex]) 965 iNdEx = postIndex 966 case 5: 967 if wireType != 2 { 968 return fmt.Errorf("proto: wrong wireType = %d for field Baggage", wireType) 969 } 970 var msglen int 971 for shift := uint(0); ; shift += 7 { 972 if shift >= 64 { 973 return ErrIntOverflowRecordedSpan 974 } 975 if iNdEx >= l { 976 return io.ErrUnexpectedEOF 977 } 978 b := dAtA[iNdEx] 979 iNdEx++ 980 msglen |= (int(b) & 0x7F) << shift 981 if b < 0x80 { 982 break 983 } 984 } 985 if msglen < 0 { 986 return ErrInvalidLengthRecordedSpan 987 } 988 postIndex := iNdEx + msglen 989 if postIndex > l { 990 return io.ErrUnexpectedEOF 991 } 992 if m.Baggage == nil { 993 m.Baggage = make(map[string]string) 994 } 995 var mapkey string 996 var mapvalue string 997 for iNdEx < postIndex { 998 entryPreIndex := iNdEx 999 var wire uint64 1000 for shift := uint(0); ; shift += 7 { 1001 if shift >= 64 { 1002 return ErrIntOverflowRecordedSpan 1003 } 1004 if iNdEx >= l { 1005 return io.ErrUnexpectedEOF 1006 } 1007 b := dAtA[iNdEx] 1008 iNdEx++ 1009 wire |= (uint64(b) & 0x7F) << shift 1010 if b < 0x80 { 1011 break 1012 } 1013 } 1014 fieldNum := int32(wire >> 3) 1015 if fieldNum == 1 { 1016 var stringLenmapkey uint64 1017 for shift := uint(0); ; shift += 7 { 1018 if shift >= 64 { 1019 return ErrIntOverflowRecordedSpan 1020 } 1021 if iNdEx >= l { 1022 return io.ErrUnexpectedEOF 1023 } 1024 b := dAtA[iNdEx] 1025 iNdEx++ 1026 stringLenmapkey |= (uint64(b) & 0x7F) << shift 1027 if b < 0x80 { 1028 break 1029 } 1030 } 1031 intStringLenmapkey := int(stringLenmapkey) 1032 if intStringLenmapkey < 0 { 1033 return ErrInvalidLengthRecordedSpan 1034 } 1035 postStringIndexmapkey := iNdEx + intStringLenmapkey 1036 if postStringIndexmapkey > l { 1037 return io.ErrUnexpectedEOF 1038 } 1039 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 1040 iNdEx = postStringIndexmapkey 1041 } else if fieldNum == 2 { 1042 var stringLenmapvalue uint64 1043 for shift := uint(0); ; shift += 7 { 1044 if shift >= 64 { 1045 return ErrIntOverflowRecordedSpan 1046 } 1047 if iNdEx >= l { 1048 return io.ErrUnexpectedEOF 1049 } 1050 b := dAtA[iNdEx] 1051 iNdEx++ 1052 stringLenmapvalue |= (uint64(b) & 0x7F) << shift 1053 if b < 0x80 { 1054 break 1055 } 1056 } 1057 intStringLenmapvalue := int(stringLenmapvalue) 1058 if intStringLenmapvalue < 0 { 1059 return ErrInvalidLengthRecordedSpan 1060 } 1061 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 1062 if postStringIndexmapvalue > l { 1063 return io.ErrUnexpectedEOF 1064 } 1065 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) 1066 iNdEx = postStringIndexmapvalue 1067 } else { 1068 iNdEx = entryPreIndex 1069 skippy, err := skipRecordedSpan(dAtA[iNdEx:]) 1070 if err != nil { 1071 return err 1072 } 1073 if skippy < 0 { 1074 return ErrInvalidLengthRecordedSpan 1075 } 1076 if (iNdEx + skippy) > postIndex { 1077 return io.ErrUnexpectedEOF 1078 } 1079 iNdEx += skippy 1080 } 1081 } 1082 m.Baggage[mapkey] = mapvalue 1083 iNdEx = postIndex 1084 case 6: 1085 if wireType != 2 { 1086 return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) 1087 } 1088 var msglen int 1089 for shift := uint(0); ; shift += 7 { 1090 if shift >= 64 { 1091 return ErrIntOverflowRecordedSpan 1092 } 1093 if iNdEx >= l { 1094 return io.ErrUnexpectedEOF 1095 } 1096 b := dAtA[iNdEx] 1097 iNdEx++ 1098 msglen |= (int(b) & 0x7F) << shift 1099 if b < 0x80 { 1100 break 1101 } 1102 } 1103 if msglen < 0 { 1104 return ErrInvalidLengthRecordedSpan 1105 } 1106 postIndex := iNdEx + msglen 1107 if postIndex > l { 1108 return io.ErrUnexpectedEOF 1109 } 1110 if m.Tags == nil { 1111 m.Tags = make(map[string]string) 1112 } 1113 var mapkey string 1114 var mapvalue string 1115 for iNdEx < postIndex { 1116 entryPreIndex := iNdEx 1117 var wire uint64 1118 for shift := uint(0); ; shift += 7 { 1119 if shift >= 64 { 1120 return ErrIntOverflowRecordedSpan 1121 } 1122 if iNdEx >= l { 1123 return io.ErrUnexpectedEOF 1124 } 1125 b := dAtA[iNdEx] 1126 iNdEx++ 1127 wire |= (uint64(b) & 0x7F) << shift 1128 if b < 0x80 { 1129 break 1130 } 1131 } 1132 fieldNum := int32(wire >> 3) 1133 if fieldNum == 1 { 1134 var stringLenmapkey uint64 1135 for shift := uint(0); ; shift += 7 { 1136 if shift >= 64 { 1137 return ErrIntOverflowRecordedSpan 1138 } 1139 if iNdEx >= l { 1140 return io.ErrUnexpectedEOF 1141 } 1142 b := dAtA[iNdEx] 1143 iNdEx++ 1144 stringLenmapkey |= (uint64(b) & 0x7F) << shift 1145 if b < 0x80 { 1146 break 1147 } 1148 } 1149 intStringLenmapkey := int(stringLenmapkey) 1150 if intStringLenmapkey < 0 { 1151 return ErrInvalidLengthRecordedSpan 1152 } 1153 postStringIndexmapkey := iNdEx + intStringLenmapkey 1154 if postStringIndexmapkey > l { 1155 return io.ErrUnexpectedEOF 1156 } 1157 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 1158 iNdEx = postStringIndexmapkey 1159 } else if fieldNum == 2 { 1160 var stringLenmapvalue uint64 1161 for shift := uint(0); ; shift += 7 { 1162 if shift >= 64 { 1163 return ErrIntOverflowRecordedSpan 1164 } 1165 if iNdEx >= l { 1166 return io.ErrUnexpectedEOF 1167 } 1168 b := dAtA[iNdEx] 1169 iNdEx++ 1170 stringLenmapvalue |= (uint64(b) & 0x7F) << shift 1171 if b < 0x80 { 1172 break 1173 } 1174 } 1175 intStringLenmapvalue := int(stringLenmapvalue) 1176 if intStringLenmapvalue < 0 { 1177 return ErrInvalidLengthRecordedSpan 1178 } 1179 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 1180 if postStringIndexmapvalue > l { 1181 return io.ErrUnexpectedEOF 1182 } 1183 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) 1184 iNdEx = postStringIndexmapvalue 1185 } else { 1186 iNdEx = entryPreIndex 1187 skippy, err := skipRecordedSpan(dAtA[iNdEx:]) 1188 if err != nil { 1189 return err 1190 } 1191 if skippy < 0 { 1192 return ErrInvalidLengthRecordedSpan 1193 } 1194 if (iNdEx + skippy) > postIndex { 1195 return io.ErrUnexpectedEOF 1196 } 1197 iNdEx += skippy 1198 } 1199 } 1200 m.Tags[mapkey] = mapvalue 1201 iNdEx = postIndex 1202 case 7: 1203 if wireType != 2 { 1204 return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) 1205 } 1206 var msglen int 1207 for shift := uint(0); ; shift += 7 { 1208 if shift >= 64 { 1209 return ErrIntOverflowRecordedSpan 1210 } 1211 if iNdEx >= l { 1212 return io.ErrUnexpectedEOF 1213 } 1214 b := dAtA[iNdEx] 1215 iNdEx++ 1216 msglen |= (int(b) & 0x7F) << shift 1217 if b < 0x80 { 1218 break 1219 } 1220 } 1221 if msglen < 0 { 1222 return ErrInvalidLengthRecordedSpan 1223 } 1224 postIndex := iNdEx + msglen 1225 if postIndex > l { 1226 return io.ErrUnexpectedEOF 1227 } 1228 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { 1229 return err 1230 } 1231 iNdEx = postIndex 1232 case 8: 1233 if wireType != 2 { 1234 return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) 1235 } 1236 var msglen int 1237 for shift := uint(0); ; shift += 7 { 1238 if shift >= 64 { 1239 return ErrIntOverflowRecordedSpan 1240 } 1241 if iNdEx >= l { 1242 return io.ErrUnexpectedEOF 1243 } 1244 b := dAtA[iNdEx] 1245 iNdEx++ 1246 msglen |= (int(b) & 0x7F) << shift 1247 if b < 0x80 { 1248 break 1249 } 1250 } 1251 if msglen < 0 { 1252 return ErrInvalidLengthRecordedSpan 1253 } 1254 postIndex := iNdEx + msglen 1255 if postIndex > l { 1256 return io.ErrUnexpectedEOF 1257 } 1258 if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { 1259 return err 1260 } 1261 iNdEx = postIndex 1262 case 9: 1263 if wireType != 2 { 1264 return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) 1265 } 1266 var msglen int 1267 for shift := uint(0); ; shift += 7 { 1268 if shift >= 64 { 1269 return ErrIntOverflowRecordedSpan 1270 } 1271 if iNdEx >= l { 1272 return io.ErrUnexpectedEOF 1273 } 1274 b := dAtA[iNdEx] 1275 iNdEx++ 1276 msglen |= (int(b) & 0x7F) << shift 1277 if b < 0x80 { 1278 break 1279 } 1280 } 1281 if msglen < 0 { 1282 return ErrInvalidLengthRecordedSpan 1283 } 1284 postIndex := iNdEx + msglen 1285 if postIndex > l { 1286 return io.ErrUnexpectedEOF 1287 } 1288 m.Logs = append(m.Logs, LogRecord{}) 1289 if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1290 return err 1291 } 1292 iNdEx = postIndex 1293 case 10: 1294 if wireType != 2 { 1295 return fmt.Errorf("proto: wrong wireType = %d for field Stats", wireType) 1296 } 1297 var msglen int 1298 for shift := uint(0); ; shift += 7 { 1299 if shift >= 64 { 1300 return ErrIntOverflowRecordedSpan 1301 } 1302 if iNdEx >= l { 1303 return io.ErrUnexpectedEOF 1304 } 1305 b := dAtA[iNdEx] 1306 iNdEx++ 1307 msglen |= (int(b) & 0x7F) << shift 1308 if b < 0x80 { 1309 break 1310 } 1311 } 1312 if msglen < 0 { 1313 return ErrInvalidLengthRecordedSpan 1314 } 1315 postIndex := iNdEx + msglen 1316 if postIndex > l { 1317 return io.ErrUnexpectedEOF 1318 } 1319 if m.Stats == nil { 1320 m.Stats = &types.Any{} 1321 } 1322 if err := m.Stats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1323 return err 1324 } 1325 iNdEx = postIndex 1326 default: 1327 iNdEx = preIndex 1328 skippy, err := skipRecordedSpan(dAtA[iNdEx:]) 1329 if err != nil { 1330 return err 1331 } 1332 if skippy < 0 { 1333 return ErrInvalidLengthRecordedSpan 1334 } 1335 if (iNdEx + skippy) > l { 1336 return io.ErrUnexpectedEOF 1337 } 1338 iNdEx += skippy 1339 } 1340 } 1341 1342 if iNdEx > l { 1343 return io.ErrUnexpectedEOF 1344 } 1345 return nil 1346 } 1347 func (m *NormalizedSpan) Unmarshal(dAtA []byte) error { 1348 l := len(dAtA) 1349 iNdEx := 0 1350 for iNdEx < l { 1351 preIndex := iNdEx 1352 var wire uint64 1353 for shift := uint(0); ; shift += 7 { 1354 if shift >= 64 { 1355 return ErrIntOverflowRecordedSpan 1356 } 1357 if iNdEx >= l { 1358 return io.ErrUnexpectedEOF 1359 } 1360 b := dAtA[iNdEx] 1361 iNdEx++ 1362 wire |= (uint64(b) & 0x7F) << shift 1363 if b < 0x80 { 1364 break 1365 } 1366 } 1367 fieldNum := int32(wire >> 3) 1368 wireType := int(wire & 0x7) 1369 if wireType == 4 { 1370 return fmt.Errorf("proto: NormalizedSpan: wiretype end group for non-group") 1371 } 1372 if fieldNum <= 0 { 1373 return fmt.Errorf("proto: NormalizedSpan: illegal tag %d (wire type %d)", fieldNum, wire) 1374 } 1375 switch fieldNum { 1376 case 1: 1377 if wireType != 2 { 1378 return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) 1379 } 1380 var stringLen uint64 1381 for shift := uint(0); ; shift += 7 { 1382 if shift >= 64 { 1383 return ErrIntOverflowRecordedSpan 1384 } 1385 if iNdEx >= l { 1386 return io.ErrUnexpectedEOF 1387 } 1388 b := dAtA[iNdEx] 1389 iNdEx++ 1390 stringLen |= (uint64(b) & 0x7F) << shift 1391 if b < 0x80 { 1392 break 1393 } 1394 } 1395 intStringLen := int(stringLen) 1396 if intStringLen < 0 { 1397 return ErrInvalidLengthRecordedSpan 1398 } 1399 postIndex := iNdEx + intStringLen 1400 if postIndex > l { 1401 return io.ErrUnexpectedEOF 1402 } 1403 m.Operation = string(dAtA[iNdEx:postIndex]) 1404 iNdEx = postIndex 1405 case 2: 1406 if wireType != 2 { 1407 return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) 1408 } 1409 var msglen int 1410 for shift := uint(0); ; shift += 7 { 1411 if shift >= 64 { 1412 return ErrIntOverflowRecordedSpan 1413 } 1414 if iNdEx >= l { 1415 return io.ErrUnexpectedEOF 1416 } 1417 b := dAtA[iNdEx] 1418 iNdEx++ 1419 msglen |= (int(b) & 0x7F) << shift 1420 if b < 0x80 { 1421 break 1422 } 1423 } 1424 if msglen < 0 { 1425 return ErrInvalidLengthRecordedSpan 1426 } 1427 postIndex := iNdEx + msglen 1428 if postIndex > l { 1429 return io.ErrUnexpectedEOF 1430 } 1431 if m.Tags == nil { 1432 m.Tags = make(map[string]string) 1433 } 1434 var mapkey string 1435 var mapvalue string 1436 for iNdEx < postIndex { 1437 entryPreIndex := iNdEx 1438 var wire uint64 1439 for shift := uint(0); ; shift += 7 { 1440 if shift >= 64 { 1441 return ErrIntOverflowRecordedSpan 1442 } 1443 if iNdEx >= l { 1444 return io.ErrUnexpectedEOF 1445 } 1446 b := dAtA[iNdEx] 1447 iNdEx++ 1448 wire |= (uint64(b) & 0x7F) << shift 1449 if b < 0x80 { 1450 break 1451 } 1452 } 1453 fieldNum := int32(wire >> 3) 1454 if fieldNum == 1 { 1455 var stringLenmapkey uint64 1456 for shift := uint(0); ; shift += 7 { 1457 if shift >= 64 { 1458 return ErrIntOverflowRecordedSpan 1459 } 1460 if iNdEx >= l { 1461 return io.ErrUnexpectedEOF 1462 } 1463 b := dAtA[iNdEx] 1464 iNdEx++ 1465 stringLenmapkey |= (uint64(b) & 0x7F) << shift 1466 if b < 0x80 { 1467 break 1468 } 1469 } 1470 intStringLenmapkey := int(stringLenmapkey) 1471 if intStringLenmapkey < 0 { 1472 return ErrInvalidLengthRecordedSpan 1473 } 1474 postStringIndexmapkey := iNdEx + intStringLenmapkey 1475 if postStringIndexmapkey > l { 1476 return io.ErrUnexpectedEOF 1477 } 1478 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 1479 iNdEx = postStringIndexmapkey 1480 } else if fieldNum == 2 { 1481 var stringLenmapvalue uint64 1482 for shift := uint(0); ; shift += 7 { 1483 if shift >= 64 { 1484 return ErrIntOverflowRecordedSpan 1485 } 1486 if iNdEx >= l { 1487 return io.ErrUnexpectedEOF 1488 } 1489 b := dAtA[iNdEx] 1490 iNdEx++ 1491 stringLenmapvalue |= (uint64(b) & 0x7F) << shift 1492 if b < 0x80 { 1493 break 1494 } 1495 } 1496 intStringLenmapvalue := int(stringLenmapvalue) 1497 if intStringLenmapvalue < 0 { 1498 return ErrInvalidLengthRecordedSpan 1499 } 1500 postStringIndexmapvalue := iNdEx + intStringLenmapvalue 1501 if postStringIndexmapvalue > l { 1502 return io.ErrUnexpectedEOF 1503 } 1504 mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) 1505 iNdEx = postStringIndexmapvalue 1506 } else { 1507 iNdEx = entryPreIndex 1508 skippy, err := skipRecordedSpan(dAtA[iNdEx:]) 1509 if err != nil { 1510 return err 1511 } 1512 if skippy < 0 { 1513 return ErrInvalidLengthRecordedSpan 1514 } 1515 if (iNdEx + skippy) > postIndex { 1516 return io.ErrUnexpectedEOF 1517 } 1518 iNdEx += skippy 1519 } 1520 } 1521 m.Tags[mapkey] = mapvalue 1522 iNdEx = postIndex 1523 case 3: 1524 if wireType != 2 { 1525 return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) 1526 } 1527 var msglen int 1528 for shift := uint(0); ; shift += 7 { 1529 if shift >= 64 { 1530 return ErrIntOverflowRecordedSpan 1531 } 1532 if iNdEx >= l { 1533 return io.ErrUnexpectedEOF 1534 } 1535 b := dAtA[iNdEx] 1536 iNdEx++ 1537 msglen |= (int(b) & 0x7F) << shift 1538 if b < 0x80 { 1539 break 1540 } 1541 } 1542 if msglen < 0 { 1543 return ErrInvalidLengthRecordedSpan 1544 } 1545 postIndex := iNdEx + msglen 1546 if postIndex > l { 1547 return io.ErrUnexpectedEOF 1548 } 1549 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { 1550 return err 1551 } 1552 iNdEx = postIndex 1553 case 4: 1554 if wireType != 2 { 1555 return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) 1556 } 1557 var msglen int 1558 for shift := uint(0); ; shift += 7 { 1559 if shift >= 64 { 1560 return ErrIntOverflowRecordedSpan 1561 } 1562 if iNdEx >= l { 1563 return io.ErrUnexpectedEOF 1564 } 1565 b := dAtA[iNdEx] 1566 iNdEx++ 1567 msglen |= (int(b) & 0x7F) << shift 1568 if b < 0x80 { 1569 break 1570 } 1571 } 1572 if msglen < 0 { 1573 return ErrInvalidLengthRecordedSpan 1574 } 1575 postIndex := iNdEx + msglen 1576 if postIndex > l { 1577 return io.ErrUnexpectedEOF 1578 } 1579 if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { 1580 return err 1581 } 1582 iNdEx = postIndex 1583 case 5: 1584 if wireType != 2 { 1585 return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) 1586 } 1587 var msglen int 1588 for shift := uint(0); ; shift += 7 { 1589 if shift >= 64 { 1590 return ErrIntOverflowRecordedSpan 1591 } 1592 if iNdEx >= l { 1593 return io.ErrUnexpectedEOF 1594 } 1595 b := dAtA[iNdEx] 1596 iNdEx++ 1597 msglen |= (int(b) & 0x7F) << shift 1598 if b < 0x80 { 1599 break 1600 } 1601 } 1602 if msglen < 0 { 1603 return ErrInvalidLengthRecordedSpan 1604 } 1605 postIndex := iNdEx + msglen 1606 if postIndex > l { 1607 return io.ErrUnexpectedEOF 1608 } 1609 m.Logs = append(m.Logs, LogRecord{}) 1610 if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1611 return err 1612 } 1613 iNdEx = postIndex 1614 case 6: 1615 if wireType != 2 { 1616 return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) 1617 } 1618 var msglen int 1619 for shift := uint(0); ; shift += 7 { 1620 if shift >= 64 { 1621 return ErrIntOverflowRecordedSpan 1622 } 1623 if iNdEx >= l { 1624 return io.ErrUnexpectedEOF 1625 } 1626 b := dAtA[iNdEx] 1627 iNdEx++ 1628 msglen |= (int(b) & 0x7F) << shift 1629 if b < 0x80 { 1630 break 1631 } 1632 } 1633 if msglen < 0 { 1634 return ErrInvalidLengthRecordedSpan 1635 } 1636 postIndex := iNdEx + msglen 1637 if postIndex > l { 1638 return io.ErrUnexpectedEOF 1639 } 1640 m.Children = append(m.Children, NormalizedSpan{}) 1641 if err := m.Children[len(m.Children)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1642 return err 1643 } 1644 iNdEx = postIndex 1645 default: 1646 iNdEx = preIndex 1647 skippy, err := skipRecordedSpan(dAtA[iNdEx:]) 1648 if err != nil { 1649 return err 1650 } 1651 if skippy < 0 { 1652 return ErrInvalidLengthRecordedSpan 1653 } 1654 if (iNdEx + skippy) > l { 1655 return io.ErrUnexpectedEOF 1656 } 1657 iNdEx += skippy 1658 } 1659 } 1660 1661 if iNdEx > l { 1662 return io.ErrUnexpectedEOF 1663 } 1664 return nil 1665 } 1666 func skipRecordedSpan(dAtA []byte) (n int, err error) { 1667 l := len(dAtA) 1668 iNdEx := 0 1669 for iNdEx < l { 1670 var wire uint64 1671 for shift := uint(0); ; shift += 7 { 1672 if shift >= 64 { 1673 return 0, ErrIntOverflowRecordedSpan 1674 } 1675 if iNdEx >= l { 1676 return 0, io.ErrUnexpectedEOF 1677 } 1678 b := dAtA[iNdEx] 1679 iNdEx++ 1680 wire |= (uint64(b) & 0x7F) << shift 1681 if b < 0x80 { 1682 break 1683 } 1684 } 1685 wireType := int(wire & 0x7) 1686 switch wireType { 1687 case 0: 1688 for shift := uint(0); ; shift += 7 { 1689 if shift >= 64 { 1690 return 0, ErrIntOverflowRecordedSpan 1691 } 1692 if iNdEx >= l { 1693 return 0, io.ErrUnexpectedEOF 1694 } 1695 iNdEx++ 1696 if dAtA[iNdEx-1] < 0x80 { 1697 break 1698 } 1699 } 1700 return iNdEx, nil 1701 case 1: 1702 iNdEx += 8 1703 return iNdEx, nil 1704 case 2: 1705 var length int 1706 for shift := uint(0); ; shift += 7 { 1707 if shift >= 64 { 1708 return 0, ErrIntOverflowRecordedSpan 1709 } 1710 if iNdEx >= l { 1711 return 0, io.ErrUnexpectedEOF 1712 } 1713 b := dAtA[iNdEx] 1714 iNdEx++ 1715 length |= (int(b) & 0x7F) << shift 1716 if b < 0x80 { 1717 break 1718 } 1719 } 1720 iNdEx += length 1721 if length < 0 { 1722 return 0, ErrInvalidLengthRecordedSpan 1723 } 1724 return iNdEx, nil 1725 case 3: 1726 for { 1727 var innerWire uint64 1728 var start int = iNdEx 1729 for shift := uint(0); ; shift += 7 { 1730 if shift >= 64 { 1731 return 0, ErrIntOverflowRecordedSpan 1732 } 1733 if iNdEx >= l { 1734 return 0, io.ErrUnexpectedEOF 1735 } 1736 b := dAtA[iNdEx] 1737 iNdEx++ 1738 innerWire |= (uint64(b) & 0x7F) << shift 1739 if b < 0x80 { 1740 break 1741 } 1742 } 1743 innerWireType := int(innerWire & 0x7) 1744 if innerWireType == 4 { 1745 break 1746 } 1747 next, err := skipRecordedSpan(dAtA[start:]) 1748 if err != nil { 1749 return 0, err 1750 } 1751 iNdEx = start + next 1752 } 1753 return iNdEx, nil 1754 case 4: 1755 return iNdEx, nil 1756 case 5: 1757 iNdEx += 4 1758 return iNdEx, nil 1759 default: 1760 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1761 } 1762 } 1763 panic("unreachable") 1764 } 1765 1766 var ( 1767 ErrInvalidLengthRecordedSpan = fmt.Errorf("proto: negative length found during unmarshaling") 1768 ErrIntOverflowRecordedSpan = fmt.Errorf("proto: integer overflow") 1769 ) 1770 1771 func init() { 1772 proto.RegisterFile("util/tracing/recorded_span.proto", fileDescriptor_recorded_span_ec83bd4619f89f60) 1773 } 1774 1775 var fileDescriptor_recorded_span_ec83bd4619f89f60 = []byte{ 1776 // 623 bytes of a gzipped FileDescriptorProto 1777 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xcd, 0x6e, 0xd3, 0x4c, 1778 0x14, 0x8d, 0x13, 0xe7, 0xef, 0x36, 0xaa, 0xaa, 0x51, 0xf5, 0xc9, 0xb5, 0x3e, 0xd9, 0xa5, 0x48, 1779 0xa5, 0xb0, 0xb0, 0xa1, 0x48, 0x50, 0x95, 0x05, 0xc2, 0xa4, 0x88, 0x08, 0x84, 0x90, 0xe9, 0x8a, 1780 0x4d, 0x34, 0xb5, 0xa7, 0x53, 0xab, 0xae, 0xc7, 0xb2, 0x27, 0x48, 0xe1, 0x29, 0xba, 0xec, 0x92, 1781 0x07, 0xe0, 0x09, 0x90, 0xd8, 0x77, 0xd9, 0x65, 0x57, 0x01, 0xdc, 0x17, 0x41, 0x33, 0x9e, 0xa4, 1782 0x7f, 0x54, 0x4d, 0xdb, 0x9d, 0x67, 0xee, 0x39, 0xe7, 0xde, 0x39, 0xe7, 0x1a, 0x16, 0x07, 0x3c, 1783 0x8a, 0x5d, 0x9e, 0xe1, 0x20, 0x4a, 0xa8, 0x9b, 0x91, 0x80, 0x65, 0x21, 0x09, 0xfb, 0x79, 0x8a, 1784 0x13, 0x27, 0xcd, 0x18, 0x67, 0xe8, 0xbf, 0x80, 0x05, 0xbb, 0x19, 0xc3, 0xc1, 0x8e, 0x23, 0xb0, 1785 0x8e, 0xc2, 0x9a, 0xf3, 0x94, 0x51, 0x26, 0x21, 0xae, 0xf8, 0x2a, 0xd1, 0xe6, 0x02, 0x65, 0x8c, 1786 0xc6, 0xc4, 0x95, 0xa7, 0xad, 0xc1, 0xb6, 0x8b, 0x93, 0xa1, 0x2a, 0xd9, 0x17, 0x4b, 0x3c, 0xda, 1787 0x23, 0x39, 0xc7, 0x7b, 0xa9, 0x02, 0x58, 0x17, 0x01, 0xe1, 0x20, 0xc3, 0x3c, 0x62, 0x6a, 0x92, 1788 0xa5, 0x9f, 0x1a, 0xb4, 0xdf, 0x33, 0xea, 0xcb, 0x21, 0xd1, 0x1a, 0xe8, 0x42, 0xc0, 0xd0, 0x16, 1789 0xb5, 0x95, 0x99, 0x55, 0xd3, 0x29, 0xc9, 0xce, 0x98, 0xec, 0x6c, 0x8e, 0xd5, 0xbd, 0xd6, 0xe1, 1790 0xc8, 0xae, 0xec, 0xff, 0xb2, 0x35, 0x5f, 0x32, 0xd0, 0x06, 0x34, 0xb6, 0x23, 0x12, 0x87, 0xb9, 1791 0x51, 0x5d, 0xac, 0xad, 0xcc, 0xac, 0x3e, 0x70, 0xfe, 0xfd, 0x44, 0x67, 0xd2, 0xcc, 0x79, 0x23, 1792 0xf0, 0x9e, 0x2e, 0x84, 0x7c, 0x45, 0x36, 0x5d, 0xa8, 0xcb, 0x6b, 0x34, 0x07, 0xb5, 0x5d, 0x32, 1793 0x94, 0x83, 0xb4, 0x7d, 0xf1, 0x89, 0xe6, 0xa1, 0xfe, 0x05, 0xc7, 0x03, 0x62, 0x54, 0xe5, 0x5d, 1794 0x79, 0x58, 0xfa, 0x5e, 0x87, 0x8e, 0xaf, 0x1c, 0xfe, 0x94, 0xe2, 0x04, 0x2d, 0x43, 0x4b, 0xb4, 1795 0x22, 0xfd, 0x28, 0x94, 0x6c, 0xdd, 0x9b, 0x29, 0x46, 0x76, 0x73, 0x53, 0xdc, 0xf5, 0xba, 0x7e, 1796 0x53, 0x16, 0x7b, 0x21, 0xba, 0x0f, 0x4d, 0x11, 0x88, 0x80, 0x55, 0x25, 0x0c, 0x8a, 0x91, 0xdd, 1797 0x10, 0x12, 0xbd, 0xae, 0xdf, 0x10, 0xa5, 0x5e, 0x88, 0x9e, 0xc1, 0x6c, 0x8a, 0x33, 0x92, 0xf0, 1798 0xfe, 0x18, 0x5b, 0x93, 0xd8, 0xb9, 0x62, 0x64, 0x77, 0x3e, 0xca, 0x8a, 0x62, 0x74, 0xd2, 0xd3, 1799 0x53, 0x88, 0xfe, 0x87, 0x36, 0x4b, 0x49, 0x69, 0xb4, 0xa1, 0xcb, 0x79, 0x4f, 0x2f, 0xd0, 0x3b, 1800 0x68, 0x6e, 0x61, 0x4a, 0x31, 0x25, 0x46, 0x5d, 0x9a, 0xf5, 0xe4, 0x2a, 0xb3, 0xce, 0xbe, 0xcc, 1801 0xf1, 0x4a, 0xce, 0x46, 0xc2, 0xb3, 0xa1, 0x3f, 0x56, 0x40, 0x1e, 0xe8, 0x1c, 0xd3, 0xdc, 0x68, 1802 0x48, 0x25, 0x67, 0x2a, 0xa5, 0x4d, 0x4c, 0xf3, 0x52, 0x46, 0x72, 0xd1, 0x6b, 0x80, 0x9c, 0xe3, 1803 0x8c, 0xf7, 0x65, 0xf8, 0xcd, 0x1b, 0x84, 0xdf, 0x96, 0x3c, 0x51, 0x41, 0x2f, 0xa1, 0x35, 0xde, 1804 0x2d, 0xa3, 0x25, 0x25, 0x16, 0x2e, 0x49, 0x74, 0x15, 0xa0, 0x54, 0x38, 0x10, 0x0a, 0x13, 0x12, 1805 0x7a, 0x01, 0x7a, 0xcc, 0x68, 0x6e, 0xb4, 0xe5, 0x4b, 0xee, 0x5d, 0xbb, 0x40, 0x6a, 0x75, 0x24, 1806 0x09, 0x3d, 0x82, 0x7a, 0xce, 0x31, 0xcf, 0x0d, 0x90, 0xad, 0xe7, 0x2f, 0xb5, 0x7e, 0x95, 0x0c, 1807 0xfd, 0x12, 0x62, 0xae, 0x43, 0xe7, 0xac, 0x97, 0xd3, 0xee, 0xda, 0x7a, 0x75, 0x4d, 0x33, 0x9f, 1808 0x43, 0x7b, 0xe2, 0xde, 0x4d, 0x88, 0xeb, 0xfa, 0xc1, 0x37, 0xbb, 0xb2, 0xf4, 0xa3, 0x06, 0xb3, 1809 0x1f, 0x58, 0xb6, 0x87, 0xe3, 0xe8, 0xab, 0x5a, 0xd8, 0x73, 0xbb, 0xa2, 0x5d, 0xdc, 0x95, 0xae, 1810 0x8a, 0xb7, 0xfc, 0xab, 0x1e, 0x5f, 0x65, 0xca, 0x79, 0xcd, 0x6b, 0x02, 0xae, 0xdd, 0x3d, 0x60, 1811 0xfd, 0x2e, 0x01, 0xd7, 0x6f, 0x13, 0xf0, 0x5b, 0x68, 0x05, 0x3b, 0x51, 0x1c, 0x66, 0x24, 0x51, 1812 0xbb, 0xbe, 0x3c, 0x9d, 0x19, 0x4a, 0x65, 0xc2, 0xbe, 0x75, 0x84, 0xde, 0xc3, 0xc3, 0x3f, 0x56, 1813 0xe5, 0xb0, 0xb0, 0xb4, 0xa3, 0xc2, 0xd2, 0x8e, 0x0b, 0x4b, 0xfb, 0x5d, 0x58, 0xda, 0xfe, 0x89, 1814 0x55, 0x39, 0x3a, 0xb1, 0x2a, 0xc7, 0x27, 0x56, 0xe5, 0x73, 0x53, 0x8d, 0xb0, 0xd5, 0x90, 0x8e, 1815 0x3c, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x83, 0x1a, 0x5c, 0x3e, 0x0b, 0x06, 0x00, 0x00, 1816 }