OSDN Git Service

new repo
[bytom/vapor.git] / vendor / google.golang.org / genproto / googleapis / tracing / v1 / trace.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/tracing/trace.proto
3
4 /*
5 Package tracing is a generated protocol buffer package.
6
7 It is generated from these files:
8         google/tracing/trace.proto
9
10 It has these top-level messages:
11         TraceId
12         Module
13         StackTrace
14         LabelValue
15         Span
16         Trace
17 */
18 package tracing
19
20 import proto "github.com/golang/protobuf/proto"
21 import fmt "fmt"
22 import math "math"
23 import _ "google.golang.org/genproto/googleapis/api/annotations"
24 import google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp"
25 import google_rpc "google.golang.org/genproto/googleapis/rpc/status"
26
27 // Reference imports to suppress errors if they are not otherwise used.
28 var _ = proto.Marshal
29 var _ = fmt.Errorf
30 var _ = math.Inf
31
32 // This is a compile-time assertion to ensure that this generated file
33 // is compatible with the proto package it is being compiled against.
34 // A compilation error at this line likely means your copy of the
35 // proto package needs to be updated.
36 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
37
38 // The type of the network event. SENT or RECV event.
39 type Span_TimeEvent_NetworkEvent_Type int32
40
41 const (
42         Span_TimeEvent_NetworkEvent_UNSPECIFIED Span_TimeEvent_NetworkEvent_Type = 0
43         Span_TimeEvent_NetworkEvent_SENT        Span_TimeEvent_NetworkEvent_Type = 1
44         Span_TimeEvent_NetworkEvent_RECV        Span_TimeEvent_NetworkEvent_Type = 2
45 )
46
47 var Span_TimeEvent_NetworkEvent_Type_name = map[int32]string{
48         0: "UNSPECIFIED",
49         1: "SENT",
50         2: "RECV",
51 }
52 var Span_TimeEvent_NetworkEvent_Type_value = map[string]int32{
53         "UNSPECIFIED": 0,
54         "SENT":        1,
55         "RECV":        2,
56 }
57
58 func (x Span_TimeEvent_NetworkEvent_Type) String() string {
59         return proto.EnumName(Span_TimeEvent_NetworkEvent_Type_name, int32(x))
60 }
61 func (Span_TimeEvent_NetworkEvent_Type) EnumDescriptor() ([]byte, []int) {
62         return fileDescriptor0, []int{4, 0, 1, 0}
63 }
64
65 // The type of the link.
66 type Span_Link_Type int32
67
68 const (
69         Span_Link_UNSPECIFIED Span_Link_Type = 0
70         Span_Link_CHILD       Span_Link_Type = 1
71         Span_Link_PARENT      Span_Link_Type = 2
72 )
73
74 var Span_Link_Type_name = map[int32]string{
75         0: "UNSPECIFIED",
76         1: "CHILD",
77         2: "PARENT",
78 }
79 var Span_Link_Type_value = map[string]int32{
80         "UNSPECIFIED": 0,
81         "CHILD":       1,
82         "PARENT":      2,
83 }
84
85 func (x Span_Link_Type) String() string {
86         return proto.EnumName(Span_Link_Type_name, int32(x))
87 }
88 func (Span_Link_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 1, 0} }
89
90 // A TraceId uniquely identifies a Trace. It is conceptually a 128-bit value,
91 // represented as a string, containing the hex-encoded value.
92 type TraceId struct {
93         // Trace ID specified as a hex-encoded string. *Must* be 32 bytes long.
94         HexEncoded string `protobuf:"bytes,1,opt,name=hex_encoded,json=hexEncoded" json:"hex_encoded,omitempty"`
95 }
96
97 func (m *TraceId) Reset()                    { *m = TraceId{} }
98 func (m *TraceId) String() string            { return proto.CompactTextString(m) }
99 func (*TraceId) ProtoMessage()               {}
100 func (*TraceId) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
101
102 func (m *TraceId) GetHexEncoded() string {
103         if m != nil {
104                 return m.HexEncoded
105         }
106         return ""
107 }
108
109 type Module struct {
110         // Binary module.
111         // E.g. main binary, kernel modules, and dynamic libraries
112         // such as libc.so, sharedlib.so
113         Module string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"`
114         // Build_id is a unique identifier for the module,
115         // probably a hash of its contents
116         BuildId string `protobuf:"bytes,2,opt,name=build_id,json=buildId" json:"build_id,omitempty"`
117 }
118
119 func (m *Module) Reset()                    { *m = Module{} }
120 func (m *Module) String() string            { return proto.CompactTextString(m) }
121 func (*Module) ProtoMessage()               {}
122 func (*Module) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
123
124 func (m *Module) GetModule() string {
125         if m != nil {
126                 return m.Module
127         }
128         return ""
129 }
130
131 func (m *Module) GetBuildId() string {
132         if m != nil {
133                 return m.BuildId
134         }
135         return ""
136 }
137
138 type StackTrace struct {
139         // Stack frames of this stack trace.
140         StackFrame []*StackTrace_StackFrame `protobuf:"bytes,1,rep,name=stack_frame,json=stackFrame" json:"stack_frame,omitempty"`
141         // User can choose to use his own hash function to hash large labels to save
142         // network bandwidth and storage.
143         // Typical usage is to pass both initially to inform the storage of the
144         // mapping. And in subsequent calls, pass in stack_trace_hash_id only.
145         // User shall verify the hash value is successfully stored.
146         StackTraceHashId uint64 `protobuf:"varint,2,opt,name=stack_trace_hash_id,json=stackTraceHashId" json:"stack_trace_hash_id,omitempty"`
147 }
148
149 func (m *StackTrace) Reset()                    { *m = StackTrace{} }
150 func (m *StackTrace) String() string            { return proto.CompactTextString(m) }
151 func (*StackTrace) ProtoMessage()               {}
152 func (*StackTrace) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
153
154 func (m *StackTrace) GetStackFrame() []*StackTrace_StackFrame {
155         if m != nil {
156                 return m.StackFrame
157         }
158         return nil
159 }
160
161 func (m *StackTrace) GetStackTraceHashId() uint64 {
162         if m != nil {
163                 return m.StackTraceHashId
164         }
165         return 0
166 }
167
168 // Presents a single stack frame in a stack trace.
169 type StackTrace_StackFrame struct {
170         // Fully qualified names which uniquely identify function/method/etc.
171         FunctionName string `protobuf:"bytes,1,opt,name=function_name,json=functionName" json:"function_name,omitempty"`
172         // Used when function name is ‘mangled’. Not guaranteed to be fully
173         // qualified but usually it is.
174         OrigFunctionName string `protobuf:"bytes,2,opt,name=orig_function_name,json=origFunctionName" json:"orig_function_name,omitempty"`
175         // File name of the frame.
176         FileName string `protobuf:"bytes,3,opt,name=file_name,json=fileName" json:"file_name,omitempty"`
177         // Line number of the frame.
178         LineNumber int64 `protobuf:"varint,4,opt,name=line_number,json=lineNumber" json:"line_number,omitempty"`
179         // Column number is important in JavaScript(anonymous functions),
180         // Might not be available in some languages.
181         ColumnNumber int64 `protobuf:"varint,5,opt,name=column_number,json=columnNumber" json:"column_number,omitempty"`
182         // Binary module the code is loaded from.
183         LoadModule *Module `protobuf:"bytes,6,opt,name=load_module,json=loadModule" json:"load_module,omitempty"`
184         // source_version is deployment specific. It might be
185         // better to be stored in deployment metadata.
186         // However, in distributed tracing, it’s hard to keep track of
187         // source/binary versions at one place for all spans.
188         SourceVersion string `protobuf:"bytes,7,opt,name=source_version,json=sourceVersion" json:"source_version,omitempty"`
189 }
190
191 func (m *StackTrace_StackFrame) Reset()                    { *m = StackTrace_StackFrame{} }
192 func (m *StackTrace_StackFrame) String() string            { return proto.CompactTextString(m) }
193 func (*StackTrace_StackFrame) ProtoMessage()               {}
194 func (*StackTrace_StackFrame) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
195
196 func (m *StackTrace_StackFrame) GetFunctionName() string {
197         if m != nil {
198                 return m.FunctionName
199         }
200         return ""
201 }
202
203 func (m *StackTrace_StackFrame) GetOrigFunctionName() string {
204         if m != nil {
205                 return m.OrigFunctionName
206         }
207         return ""
208 }
209
210 func (m *StackTrace_StackFrame) GetFileName() string {
211         if m != nil {
212                 return m.FileName
213         }
214         return ""
215 }
216
217 func (m *StackTrace_StackFrame) GetLineNumber() int64 {
218         if m != nil {
219                 return m.LineNumber
220         }
221         return 0
222 }
223
224 func (m *StackTrace_StackFrame) GetColumnNumber() int64 {
225         if m != nil {
226                 return m.ColumnNumber
227         }
228         return 0
229 }
230
231 func (m *StackTrace_StackFrame) GetLoadModule() *Module {
232         if m != nil {
233                 return m.LoadModule
234         }
235         return nil
236 }
237
238 func (m *StackTrace_StackFrame) GetSourceVersion() string {
239         if m != nil {
240                 return m.SourceVersion
241         }
242         return ""
243 }
244
245 // Allowed label values.
246 type LabelValue struct {
247         // The value of the label.
248         //
249         // Types that are valid to be assigned to Value:
250         //      *LabelValue_StringValue
251         //      *LabelValue_IntValue
252         //      *LabelValue_BoolValue
253         Value isLabelValue_Value `protobuf_oneof:"value"`
254 }
255
256 func (m *LabelValue) Reset()                    { *m = LabelValue{} }
257 func (m *LabelValue) String() string            { return proto.CompactTextString(m) }
258 func (*LabelValue) ProtoMessage()               {}
259 func (*LabelValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
260
261 type isLabelValue_Value interface {
262         isLabelValue_Value()
263 }
264
265 type LabelValue_StringValue struct {
266         StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,oneof"`
267 }
268 type LabelValue_IntValue struct {
269         IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,oneof"`
270 }
271 type LabelValue_BoolValue struct {
272         BoolValue bool `protobuf:"varint,3,opt,name=bool_value,json=boolValue,oneof"`
273 }
274
275 func (*LabelValue_StringValue) isLabelValue_Value() {}
276 func (*LabelValue_IntValue) isLabelValue_Value()    {}
277 func (*LabelValue_BoolValue) isLabelValue_Value()   {}
278
279 func (m *LabelValue) GetValue() isLabelValue_Value {
280         if m != nil {
281                 return m.Value
282         }
283         return nil
284 }
285
286 func (m *LabelValue) GetStringValue() string {
287         if x, ok := m.GetValue().(*LabelValue_StringValue); ok {
288                 return x.StringValue
289         }
290         return ""
291 }
292
293 func (m *LabelValue) GetIntValue() int64 {
294         if x, ok := m.GetValue().(*LabelValue_IntValue); ok {
295                 return x.IntValue
296         }
297         return 0
298 }
299
300 func (m *LabelValue) GetBoolValue() bool {
301         if x, ok := m.GetValue().(*LabelValue_BoolValue); ok {
302                 return x.BoolValue
303         }
304         return false
305 }
306
307 // XXX_OneofFuncs is for the internal use of the proto package.
308 func (*LabelValue) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
309         return _LabelValue_OneofMarshaler, _LabelValue_OneofUnmarshaler, _LabelValue_OneofSizer, []interface{}{
310                 (*LabelValue_StringValue)(nil),
311                 (*LabelValue_IntValue)(nil),
312                 (*LabelValue_BoolValue)(nil),
313         }
314 }
315
316 func _LabelValue_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
317         m := msg.(*LabelValue)
318         // value
319         switch x := m.Value.(type) {
320         case *LabelValue_StringValue:
321                 b.EncodeVarint(1<<3 | proto.WireBytes)
322                 b.EncodeStringBytes(x.StringValue)
323         case *LabelValue_IntValue:
324                 b.EncodeVarint(2<<3 | proto.WireVarint)
325                 b.EncodeVarint(uint64(x.IntValue))
326         case *LabelValue_BoolValue:
327                 t := uint64(0)
328                 if x.BoolValue {
329                         t = 1
330                 }
331                 b.EncodeVarint(3<<3 | proto.WireVarint)
332                 b.EncodeVarint(t)
333         case nil:
334         default:
335                 return fmt.Errorf("LabelValue.Value has unexpected type %T", x)
336         }
337         return nil
338 }
339
340 func _LabelValue_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
341         m := msg.(*LabelValue)
342         switch tag {
343         case 1: // value.string_value
344                 if wire != proto.WireBytes {
345                         return true, proto.ErrInternalBadWireType
346                 }
347                 x, err := b.DecodeStringBytes()
348                 m.Value = &LabelValue_StringValue{x}
349                 return true, err
350         case 2: // value.int_value
351                 if wire != proto.WireVarint {
352                         return true, proto.ErrInternalBadWireType
353                 }
354                 x, err := b.DecodeVarint()
355                 m.Value = &LabelValue_IntValue{int64(x)}
356                 return true, err
357         case 3: // value.bool_value
358                 if wire != proto.WireVarint {
359                         return true, proto.ErrInternalBadWireType
360                 }
361                 x, err := b.DecodeVarint()
362                 m.Value = &LabelValue_BoolValue{x != 0}
363                 return true, err
364         default:
365                 return false, nil
366         }
367 }
368
369 func _LabelValue_OneofSizer(msg proto.Message) (n int) {
370         m := msg.(*LabelValue)
371         // value
372         switch x := m.Value.(type) {
373         case *LabelValue_StringValue:
374                 n += proto.SizeVarint(1<<3 | proto.WireBytes)
375                 n += proto.SizeVarint(uint64(len(x.StringValue)))
376                 n += len(x.StringValue)
377         case *LabelValue_IntValue:
378                 n += proto.SizeVarint(2<<3 | proto.WireVarint)
379                 n += proto.SizeVarint(uint64(x.IntValue))
380         case *LabelValue_BoolValue:
381                 n += proto.SizeVarint(3<<3 | proto.WireVarint)
382                 n += 1
383         case nil:
384         default:
385                 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
386         }
387         return n
388 }
389
390 // A span represents a single operation within a trace. Spans can be nested
391 // and form a trace tree. Often, a trace contains a root span that describes the
392 // end-to-end latency and, optionally, one or more subspans for
393 // its sub-operations. Spans do not need to be contiguous. There may be gaps
394 // between spans in a trace.
395 type Span struct {
396         // Identifier for the span. Must be a 64-bit integer other than 0 and
397         // unique within a trace.
398         Id uint64 `protobuf:"fixed64,1,opt,name=id" json:"id,omitempty"`
399         // Name of the span. The span name is sanitized and displayed in the
400         // Stackdriver Trace tool in the {% dynamic print site_values.console_name %}.
401         // The name may be a method name or some other per-call site name.
402         // For the same executable and the same call point, a best practice is
403         // to use a consistent name, which makes it easier to correlate
404         // cross-trace spans.
405         Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
406         // ID of parent span. 0 or missing if this is a root span.
407         ParentId uint64 `protobuf:"fixed64,3,opt,name=parent_id,json=parentId" json:"parent_id,omitempty"`
408         // Local machine clock in nanoseconds from the UNIX epoch,
409         // at which span execution started.
410         // On the server side these are the times when the server application
411         // handler starts running.
412         LocalStartTime *google_protobuf1.Timestamp `protobuf:"bytes,4,opt,name=local_start_time,json=localStartTime" json:"local_start_time,omitempty"`
413         // Local machine clock in nanoseconds from the UNIX epoch,
414         // at which span execution ended.
415         // On the server side these are the times when the server application
416         // handler finishes running.
417         LocalEndTime *google_protobuf1.Timestamp `protobuf:"bytes,5,opt,name=local_end_time,json=localEndTime" json:"local_end_time,omitempty"`
418         // Properties of a span. Labels at the span level.
419         // E.g.
420         // "/instance_id": "my-instance"
421         // "/zone": "us-central1-a"
422         // "/grpc/peer_address": "ip:port" (dns, etc.)
423         // "/grpc/deadline": "Duration"
424         // "/http/user_agent"
425         // "/http/request_bytes": 300
426         // "/http/response_bytes": 1200
427         // "/http/url": google.com/apis
428         // "/pid"
429         // "abc.com/mylabel": "my label value"
430         Labels map[string]*LabelValue `protobuf:"bytes,6,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
431         // Stack trace captured at the start of the span. This is optional.
432         StackTrace *StackTrace `protobuf:"bytes,7,opt,name=stack_trace,json=stackTrace" json:"stack_trace,omitempty"`
433         // A collection of time-stamped events.
434         TimeEvents []*Span_TimeEvent `protobuf:"bytes,8,rep,name=time_events,json=timeEvents" json:"time_events,omitempty"`
435         // A collection of links.
436         Links []*Span_Link `protobuf:"bytes,9,rep,name=links" json:"links,omitempty"`
437         // The final status of the Span. This is optional.
438         Status *google_rpc.Status `protobuf:"bytes,10,opt,name=status" json:"status,omitempty"`
439         // True if this Span has a remote parent (is an RPC server Span).
440         HasRemoteParent bool `protobuf:"varint,11,opt,name=has_remote_parent,json=hasRemoteParent" json:"has_remote_parent,omitempty"`
441 }
442
443 func (m *Span) Reset()                    { *m = Span{} }
444 func (m *Span) String() string            { return proto.CompactTextString(m) }
445 func (*Span) ProtoMessage()               {}
446 func (*Span) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
447
448 func (m *Span) GetId() uint64 {
449         if m != nil {
450                 return m.Id
451         }
452         return 0
453 }
454
455 func (m *Span) GetName() string {
456         if m != nil {
457                 return m.Name
458         }
459         return ""
460 }
461
462 func (m *Span) GetParentId() uint64 {
463         if m != nil {
464                 return m.ParentId
465         }
466         return 0
467 }
468
469 func (m *Span) GetLocalStartTime() *google_protobuf1.Timestamp {
470         if m != nil {
471                 return m.LocalStartTime
472         }
473         return nil
474 }
475
476 func (m *Span) GetLocalEndTime() *google_protobuf1.Timestamp {
477         if m != nil {
478                 return m.LocalEndTime
479         }
480         return nil
481 }
482
483 func (m *Span) GetLabels() map[string]*LabelValue {
484         if m != nil {
485                 return m.Labels
486         }
487         return nil
488 }
489
490 func (m *Span) GetStackTrace() *StackTrace {
491         if m != nil {
492                 return m.StackTrace
493         }
494         return nil
495 }
496
497 func (m *Span) GetTimeEvents() []*Span_TimeEvent {
498         if m != nil {
499                 return m.TimeEvents
500         }
501         return nil
502 }
503
504 func (m *Span) GetLinks() []*Span_Link {
505         if m != nil {
506                 return m.Links
507         }
508         return nil
509 }
510
511 func (m *Span) GetStatus() *google_rpc.Status {
512         if m != nil {
513                 return m.Status
514         }
515         return nil
516 }
517
518 func (m *Span) GetHasRemoteParent() bool {
519         if m != nil {
520                 return m.HasRemoteParent
521         }
522         return false
523 }
524
525 // A time-stamped annotation in the Span.
526 type Span_TimeEvent struct {
527         // The local machine absolute timestamp when this event happened.
528         LocalTime *google_protobuf1.Timestamp `protobuf:"bytes,1,opt,name=local_time,json=localTime" json:"local_time,omitempty"`
529         // Types that are valid to be assigned to Value:
530         //      *Span_TimeEvent_Annotation_
531         //      *Span_TimeEvent_NetworkEvent_
532         Value isSpan_TimeEvent_Value `protobuf_oneof:"value"`
533 }
534
535 func (m *Span_TimeEvent) Reset()                    { *m = Span_TimeEvent{} }
536 func (m *Span_TimeEvent) String() string            { return proto.CompactTextString(m) }
537 func (*Span_TimeEvent) ProtoMessage()               {}
538 func (*Span_TimeEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 0} }
539
540 type isSpan_TimeEvent_Value interface {
541         isSpan_TimeEvent_Value()
542 }
543
544 type Span_TimeEvent_Annotation_ struct {
545         Annotation *Span_TimeEvent_Annotation `protobuf:"bytes,2,opt,name=annotation,oneof"`
546 }
547 type Span_TimeEvent_NetworkEvent_ struct {
548         NetworkEvent *Span_TimeEvent_NetworkEvent `protobuf:"bytes,3,opt,name=network_event,json=networkEvent,oneof"`
549 }
550
551 func (*Span_TimeEvent_Annotation_) isSpan_TimeEvent_Value()   {}
552 func (*Span_TimeEvent_NetworkEvent_) isSpan_TimeEvent_Value() {}
553
554 func (m *Span_TimeEvent) GetValue() isSpan_TimeEvent_Value {
555         if m != nil {
556                 return m.Value
557         }
558         return nil
559 }
560
561 func (m *Span_TimeEvent) GetLocalTime() *google_protobuf1.Timestamp {
562         if m != nil {
563                 return m.LocalTime
564         }
565         return nil
566 }
567
568 func (m *Span_TimeEvent) GetAnnotation() *Span_TimeEvent_Annotation {
569         if x, ok := m.GetValue().(*Span_TimeEvent_Annotation_); ok {
570                 return x.Annotation
571         }
572         return nil
573 }
574
575 func (m *Span_TimeEvent) GetNetworkEvent() *Span_TimeEvent_NetworkEvent {
576         if x, ok := m.GetValue().(*Span_TimeEvent_NetworkEvent_); ok {
577                 return x.NetworkEvent
578         }
579         return nil
580 }
581
582 // XXX_OneofFuncs is for the internal use of the proto package.
583 func (*Span_TimeEvent) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
584         return _Span_TimeEvent_OneofMarshaler, _Span_TimeEvent_OneofUnmarshaler, _Span_TimeEvent_OneofSizer, []interface{}{
585                 (*Span_TimeEvent_Annotation_)(nil),
586                 (*Span_TimeEvent_NetworkEvent_)(nil),
587         }
588 }
589
590 func _Span_TimeEvent_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
591         m := msg.(*Span_TimeEvent)
592         // value
593         switch x := m.Value.(type) {
594         case *Span_TimeEvent_Annotation_:
595                 b.EncodeVarint(2<<3 | proto.WireBytes)
596                 if err := b.EncodeMessage(x.Annotation); err != nil {
597                         return err
598                 }
599         case *Span_TimeEvent_NetworkEvent_:
600                 b.EncodeVarint(3<<3 | proto.WireBytes)
601                 if err := b.EncodeMessage(x.NetworkEvent); err != nil {
602                         return err
603                 }
604         case nil:
605         default:
606                 return fmt.Errorf("Span_TimeEvent.Value has unexpected type %T", x)
607         }
608         return nil
609 }
610
611 func _Span_TimeEvent_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
612         m := msg.(*Span_TimeEvent)
613         switch tag {
614         case 2: // value.annotation
615                 if wire != proto.WireBytes {
616                         return true, proto.ErrInternalBadWireType
617                 }
618                 msg := new(Span_TimeEvent_Annotation)
619                 err := b.DecodeMessage(msg)
620                 m.Value = &Span_TimeEvent_Annotation_{msg}
621                 return true, err
622         case 3: // value.network_event
623                 if wire != proto.WireBytes {
624                         return true, proto.ErrInternalBadWireType
625                 }
626                 msg := new(Span_TimeEvent_NetworkEvent)
627                 err := b.DecodeMessage(msg)
628                 m.Value = &Span_TimeEvent_NetworkEvent_{msg}
629                 return true, err
630         default:
631                 return false, nil
632         }
633 }
634
635 func _Span_TimeEvent_OneofSizer(msg proto.Message) (n int) {
636         m := msg.(*Span_TimeEvent)
637         // value
638         switch x := m.Value.(type) {
639         case *Span_TimeEvent_Annotation_:
640                 s := proto.Size(x.Annotation)
641                 n += proto.SizeVarint(2<<3 | proto.WireBytes)
642                 n += proto.SizeVarint(uint64(s))
643                 n += s
644         case *Span_TimeEvent_NetworkEvent_:
645                 s := proto.Size(x.NetworkEvent)
646                 n += proto.SizeVarint(3<<3 | proto.WireBytes)
647                 n += proto.SizeVarint(uint64(s))
648                 n += s
649         case nil:
650         default:
651                 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
652         }
653         return n
654 }
655
656 // Text annotation with a set of labels.
657 type Span_TimeEvent_Annotation struct {
658         // A user-supplied message describing the event.
659         Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"`
660         // A set of labels on the annotation.
661         Labels map[string]*LabelValue `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
662 }
663
664 func (m *Span_TimeEvent_Annotation) Reset()                    { *m = Span_TimeEvent_Annotation{} }
665 func (m *Span_TimeEvent_Annotation) String() string            { return proto.CompactTextString(m) }
666 func (*Span_TimeEvent_Annotation) ProtoMessage()               {}
667 func (*Span_TimeEvent_Annotation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 0, 0} }
668
669 func (m *Span_TimeEvent_Annotation) GetDescription() string {
670         if m != nil {
671                 return m.Description
672         }
673         return ""
674 }
675
676 func (m *Span_TimeEvent_Annotation) GetLabels() map[string]*LabelValue {
677         if m != nil {
678                 return m.Labels
679         }
680         return nil
681 }
682
683 // An event describing an RPC message sent/received on the network.
684 type Span_TimeEvent_NetworkEvent struct {
685         // If available, this is the kernel time:
686         // For sent messages, this is the time at which the first bit was sent.
687         // For received messages, this is the time at which the last bit was
688         // received.
689         KernelTime *google_protobuf1.Timestamp      `protobuf:"bytes,1,opt,name=kernel_time,json=kernelTime" json:"kernel_time,omitempty"`
690         Type       Span_TimeEvent_NetworkEvent_Type `protobuf:"varint,2,opt,name=type,enum=google.tracing.v1.Span_TimeEvent_NetworkEvent_Type" json:"type,omitempty"`
691         // Every message has an identifier, that must be different from all the
692         // network messages in this span.
693         // This is very important when the request/response are streamed.
694         MessageId uint64 `protobuf:"varint,3,opt,name=message_id,json=messageId" json:"message_id,omitempty"`
695         // Number of bytes send/receive.
696         MessageSize uint64 `protobuf:"varint,4,opt,name=message_size,json=messageSize" json:"message_size,omitempty"`
697 }
698
699 func (m *Span_TimeEvent_NetworkEvent) Reset()         { *m = Span_TimeEvent_NetworkEvent{} }
700 func (m *Span_TimeEvent_NetworkEvent) String() string { return proto.CompactTextString(m) }
701 func (*Span_TimeEvent_NetworkEvent) ProtoMessage()    {}
702 func (*Span_TimeEvent_NetworkEvent) Descriptor() ([]byte, []int) {
703         return fileDescriptor0, []int{4, 0, 1}
704 }
705
706 func (m *Span_TimeEvent_NetworkEvent) GetKernelTime() *google_protobuf1.Timestamp {
707         if m != nil {
708                 return m.KernelTime
709         }
710         return nil
711 }
712
713 func (m *Span_TimeEvent_NetworkEvent) GetType() Span_TimeEvent_NetworkEvent_Type {
714         if m != nil {
715                 return m.Type
716         }
717         return Span_TimeEvent_NetworkEvent_UNSPECIFIED
718 }
719
720 func (m *Span_TimeEvent_NetworkEvent) GetMessageId() uint64 {
721         if m != nil {
722                 return m.MessageId
723         }
724         return 0
725 }
726
727 func (m *Span_TimeEvent_NetworkEvent) GetMessageSize() uint64 {
728         if m != nil {
729                 return m.MessageSize
730         }
731         return 0
732 }
733
734 // Link one span with another which may be in a different Trace. Used (for
735 // example) in batching operations, where a single batch handler processes
736 // multiple requests from different traces.
737 type Span_Link struct {
738         // The trace and span identifier of the linked span.
739         TraceId *TraceId       `protobuf:"bytes,1,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"`
740         SpanId  uint64         `protobuf:"fixed64,2,opt,name=span_id,json=spanId" json:"span_id,omitempty"`
741         Type    Span_Link_Type `protobuf:"varint,3,opt,name=type,enum=google.tracing.v1.Span_Link_Type" json:"type,omitempty"`
742 }
743
744 func (m *Span_Link) Reset()                    { *m = Span_Link{} }
745 func (m *Span_Link) String() string            { return proto.CompactTextString(m) }
746 func (*Span_Link) ProtoMessage()               {}
747 func (*Span_Link) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 1} }
748
749 func (m *Span_Link) GetTraceId() *TraceId {
750         if m != nil {
751                 return m.TraceId
752         }
753         return nil
754 }
755
756 func (m *Span_Link) GetSpanId() uint64 {
757         if m != nil {
758                 return m.SpanId
759         }
760         return 0
761 }
762
763 func (m *Span_Link) GetType() Span_Link_Type {
764         if m != nil {
765                 return m.Type
766         }
767         return Span_Link_UNSPECIFIED
768 }
769
770 // A trace describes how long it takes for an application to perform some
771 // operations. It consists of a tree of spans, each of which contains details
772 // about an operation with time information and operation details.
773 type Trace struct {
774         // Globally unique identifier for the trace. Common to all the spans.
775         TraceId *TraceId `protobuf:"bytes,1,opt,name=trace_id,json=traceId" json:"trace_id,omitempty"`
776         // Collection of spans in the trace. The root span has parent_id == 0.
777         Spans []*Span `protobuf:"bytes,2,rep,name=spans" json:"spans,omitempty"`
778 }
779
780 func (m *Trace) Reset()                    { *m = Trace{} }
781 func (m *Trace) String() string            { return proto.CompactTextString(m) }
782 func (*Trace) ProtoMessage()               {}
783 func (*Trace) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
784
785 func (m *Trace) GetTraceId() *TraceId {
786         if m != nil {
787                 return m.TraceId
788         }
789         return nil
790 }
791
792 func (m *Trace) GetSpans() []*Span {
793         if m != nil {
794                 return m.Spans
795         }
796         return nil
797 }
798
799 func init() {
800         proto.RegisterType((*TraceId)(nil), "google.tracing.v1.TraceId")
801         proto.RegisterType((*Module)(nil), "google.tracing.v1.Module")
802         proto.RegisterType((*StackTrace)(nil), "google.tracing.v1.StackTrace")
803         proto.RegisterType((*StackTrace_StackFrame)(nil), "google.tracing.v1.StackTrace.StackFrame")
804         proto.RegisterType((*LabelValue)(nil), "google.tracing.v1.LabelValue")
805         proto.RegisterType((*Span)(nil), "google.tracing.v1.Span")
806         proto.RegisterType((*Span_TimeEvent)(nil), "google.tracing.v1.Span.TimeEvent")
807         proto.RegisterType((*Span_TimeEvent_Annotation)(nil), "google.tracing.v1.Span.TimeEvent.Annotation")
808         proto.RegisterType((*Span_TimeEvent_NetworkEvent)(nil), "google.tracing.v1.Span.TimeEvent.NetworkEvent")
809         proto.RegisterType((*Span_Link)(nil), "google.tracing.v1.Span.Link")
810         proto.RegisterType((*Trace)(nil), "google.tracing.v1.Trace")
811         proto.RegisterEnum("google.tracing.v1.Span_TimeEvent_NetworkEvent_Type", Span_TimeEvent_NetworkEvent_Type_name, Span_TimeEvent_NetworkEvent_Type_value)
812         proto.RegisterEnum("google.tracing.v1.Span_Link_Type", Span_Link_Type_name, Span_Link_Type_value)
813 }
814
815 func init() { proto.RegisterFile("google/tracing/trace.proto", fileDescriptor0) }
816
817 var fileDescriptor0 = []byte{
818         // 1102 bytes of a gzipped FileDescriptorProto
819         0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0x1a, 0x47,
820         0x14, 0x66, 0xf9, 0x59, 0xe0, 0x2c, 0x76, 0xc8, 0x54, 0xad, 0x09, 0x8d, 0x65, 0x9b, 0xa8, 0x92,
821         0xe5, 0x26, 0x8b, 0x82, 0x15, 0xc9, 0x8d, 0xa5, 0xaa, 0xb1, 0x8d, 0x0b, 0x52, 0x8a, 0xd0, 0xe0,
822         0x58, 0x55, 0x6f, 0x56, 0xc3, 0xee, 0x18, 0x56, 0x2c, 0xb3, 0xab, 0x9d, 0x81, 0xc6, 0xbe, 0xed,
823         0x1b, 0xf4, 0x1d, 0x7a, 0xdb, 0x37, 0xe8, 0x83, 0xb4, 0x4f, 0x53, 0xcd, 0xcf, 0x62, 0xaa, 0xd8,
824         0x71, 0x53, 0xa9, 0x57, 0xcc, 0x7c, 0xe7, 0x3b, 0x67, 0xce, 0x7c, 0xe7, 0x9c, 0x59, 0xa0, 0x39,
825         0x89, 0xe3, 0x49, 0x44, 0xdb, 0x22, 0x25, 0x7e, 0xc8, 0x26, 0xea, 0x97, 0xba, 0x49, 0x1a, 0x8b,
826         0x18, 0x3d, 0xd6, 0x36, 0xd7, 0xd8, 0xdc, 0xe5, 0xcb, 0xe6, 0x53, 0x43, 0x27, 0x49, 0xd8, 0x26,
827         0x8c, 0xc5, 0x82, 0x88, 0x30, 0x66, 0x5c, 0x3b, 0x34, 0x77, 0x8c, 0x55, 0xed, 0xc6, 0x8b, 0xab,
828         0xb6, 0x08, 0xe7, 0x94, 0x0b, 0x32, 0x4f, 0x0c, 0x61, 0xcb, 0x10, 0xd2, 0xc4, 0x6f, 0x73, 0x41,
829         0xc4, 0xc2, 0x78, 0xb6, 0x0e, 0xa0, 0x7c, 0x21, 0x4f, 0xee, 0x07, 0x68, 0x07, 0x9c, 0x29, 0x7d,
830         0xef, 0x51, 0xe6, 0xc7, 0x01, 0x0d, 0x1a, 0xd6, 0xae, 0xb5, 0x5f, 0xc5, 0x30, 0xa5, 0xef, 0xbb,
831         0x1a, 0x69, 0x1d, 0x83, 0xfd, 0x43, 0x1c, 0x2c, 0x22, 0x8a, 0xbe, 0x00, 0x7b, 0xae, 0x56, 0x86,
832         0x65, 0x76, 0xe8, 0x09, 0x54, 0xc6, 0x8b, 0x30, 0x0a, 0xbc, 0x30, 0x68, 0xe4, 0x95, 0xa5, 0xac,
833         0xf6, 0xfd, 0xa0, 0xf5, 0x7b, 0x01, 0x60, 0x24, 0x88, 0x3f, 0x53, 0xc7, 0xa1, 0x3e, 0x38, 0x5c,
834         0xee, 0xbc, 0xab, 0x94, 0xcc, 0x65, 0x98, 0xc2, 0xbe, 0xd3, 0xd9, 0x77, 0x3f, 0xb8, 0xb8, 0x7b,
835         0xeb, 0xa3, 0x97, 0xe7, 0x92, 0x8f, 0x81, 0xaf, 0xd6, 0xe8, 0x05, 0x7c, 0xa6, 0x43, 0x29, 0x09,
836         0xbd, 0x29, 0xe1, 0xd3, 0xec, 0xfc, 0x22, 0xae, 0xf3, 0x95, 0x7f, 0x8f, 0xf0, 0x69, 0x3f, 0x68,
837         0xfe, 0x96, 0x37, 0x89, 0x68, 0xef, 0x67, 0xb0, 0x71, 0xb5, 0x60, 0xbe, 0x54, 0xd3, 0x63, 0x3a,
838         0x15, 0x99, 0x77, 0x2d, 0x03, 0x07, 0x92, 0xf4, 0x1c, 0x50, 0x9c, 0x86, 0x13, 0xef, 0x9f, 0x4c,
839         0x7d, 0xc3, 0xba, 0xb4, 0x9c, 0xaf, 0xb3, 0xbf, 0x84, 0xea, 0x55, 0x18, 0x51, 0x4d, 0x2a, 0x28,
840         0x52, 0x45, 0x02, 0xca, 0xb8, 0x03, 0x4e, 0x14, 0x32, 0xea, 0xb1, 0xc5, 0x7c, 0x4c, 0xd3, 0x46,
841         0x71, 0xd7, 0xda, 0x2f, 0x60, 0x90, 0xd0, 0x40, 0x21, 0x32, 0x21, 0x3f, 0x8e, 0x16, 0x73, 0x96,
842         0x51, 0x4a, 0x8a, 0x52, 0xd3, 0xa0, 0x21, 0xbd, 0x06, 0x27, 0x8a, 0x49, 0xe0, 0x99, 0x2a, 0xd8,
843         0xbb, 0xd6, 0xbe, 0xd3, 0x79, 0x72, 0x87, 0x7c, 0xba, 0x60, 0x18, 0x24, 0xdb, 0x14, 0xef, 0x2b,
844         0xd8, 0xe4, 0xf1, 0x22, 0xf5, 0xa9, 0xb7, 0xa4, 0x29, 0x0f, 0x63, 0xd6, 0x28, 0xab, 0x1c, 0x37,
845         0x34, 0x7a, 0xa9, 0xc1, 0xd6, 0x0d, 0xc0, 0x5b, 0x32, 0xa6, 0xd1, 0x25, 0x89, 0x16, 0x52, 0xa6,
846         0x1a, 0x17, 0x69, 0xc8, 0x26, 0xde, 0x52, 0xee, 0xb5, 0x4a, 0xbd, 0x1c, 0x76, 0x34, 0xaa, 0x49,
847         0xdb, 0x50, 0x0d, 0x99, 0x30, 0x0c, 0xa9, 0x4e, 0xa1, 0x97, 0xc3, 0x95, 0x90, 0x09, 0x6d, 0xde,
848         0x01, 0x18, 0xc7, 0x71, 0x64, 0xec, 0x52, 0x98, 0x4a, 0x2f, 0x87, 0xab, 0x12, 0x53, 0x84, 0x93,
849         0x32, 0x94, 0x94, 0xad, 0xf5, 0x6b, 0x0d, 0x8a, 0xa3, 0x84, 0x30, 0xb4, 0x09, 0xf9, 0x50, 0xb7,
850         0xa2, 0x8d, 0xf3, 0x61, 0x80, 0x10, 0x14, 0xd7, 0xa4, 0x57, 0x6b, 0x29, 0x77, 0x42, 0x52, 0xca,
851         0x84, 0xac, 0x7a, 0x41, 0x51, 0x2b, 0x1a, 0xe8, 0x07, 0xe8, 0x0c, 0xea, 0x51, 0xec, 0x93, 0xc8,
852         0xe3, 0x82, 0xa4, 0xc2, 0x93, 0x73, 0xa1, 0x34, 0x77, 0x3a, 0xcd, 0x4c, 0xad, 0x6c, 0x68, 0xdc,
853         0x8b, 0x6c, 0x68, 0xf0, 0xa6, 0xf2, 0x19, 0x49, 0x17, 0x09, 0xa2, 0xef, 0x40, 0x23, 0x1e, 0x65,
854         0x81, 0x8e, 0x51, 0x7a, 0x30, 0x46, 0x4d, 0x79, 0x74, 0x59, 0xa0, 0x22, 0x1c, 0x83, 0x1d, 0x49,
855         0x35, 0x79, 0xc3, 0x56, 0xad, 0xfe, 0xec, 0xae, 0x56, 0x4f, 0x08, 0x73, 0x95, 0xe6, 0xbc, 0xcb,
856         0x44, 0x7a, 0x8d, 0x8d, 0x0b, 0xfa, 0x36, 0x1b, 0x16, 0xd5, 0xe1, 0xaa, 0x5c, 0x4e, 0x67, 0xfb,
857         0xa3, 0xc3, 0x62, 0x26, 0x44, 0x0f, 0xdb, 0x09, 0x38, 0x32, 0x69, 0x8f, 0x2e, 0x29, 0x13, 0xbc,
858         0x51, 0x51, 0x19, 0xec, 0xdd, 0x97, 0x81, 0xcc, 0xb7, 0x2b, 0x99, 0x18, 0x44, 0xb6, 0xe4, 0xa8,
859         0x03, 0xa5, 0x28, 0x64, 0x33, 0xde, 0xa8, 0x2a, 0xef, 0xa7, 0xf7, 0xe6, 0x1f, 0xb2, 0x19, 0xd6,
860         0x54, 0x74, 0x00, 0xb6, 0x7e, 0x6c, 0x1a, 0xa0, 0x52, 0x46, 0x99, 0x53, 0x9a, 0xf8, 0x32, 0x57,
861         0xb1, 0xe0, 0xd8, 0x30, 0xd0, 0x01, 0x3c, 0x9e, 0x12, 0xee, 0xa5, 0x74, 0x1e, 0x0b, 0xea, 0xe9,
862         0xfa, 0x35, 0x1c, 0xd9, 0x23, 0xf8, 0xd1, 0x94, 0x70, 0xac, 0xf0, 0xa1, 0x82, 0x9b, 0x7f, 0x96,
863         0xa0, 0xba, 0xca, 0x12, 0x7d, 0x03, 0xa0, 0x8b, 0xa3, 0x0a, 0x63, 0x3d, 0x58, 0x98, 0xaa, 0x62,
864         0xab, 0xaa, 0x0c, 0x00, 0x6e, 0x1f, 0x53, 0xd5, 0x54, 0x4e, 0xe7, 0xf9, 0x83, 0xba, 0xb8, 0x6f,
865         0x56, 0x3e, 0xbd, 0x1c, 0x5e, 0x8b, 0x80, 0xde, 0xc1, 0x06, 0xa3, 0xe2, 0xe7, 0x38, 0x9d, 0x69,
866         0xad, 0x55, 0x3b, 0x3a, 0x1d, 0xf7, 0xe1, 0x90, 0x03, 0xed, 0xa6, 0x36, 0xbd, 0x1c, 0xae, 0xb1,
867         0xb5, 0x7d, 0xf3, 0x2f, 0x0b, 0xe0, 0xf6, 0x4c, 0xb4, 0x0b, 0x4e, 0x40, 0xb9, 0x9f, 0x86, 0x89,
868         0x4a, 0x5b, 0x3f, 0x58, 0xeb, 0x10, 0x1a, 0xae, 0xba, 0x2d, 0xaf, 0xaa, 0x75, 0xf4, 0x29, 0x77,
869         0xba, 0xab, 0x05, 0x9b, 0x3f, 0x82, 0xb3, 0x06, 0xa3, 0x3a, 0x14, 0x66, 0xf4, 0xda, 0x1c, 0x2d,
870         0x97, 0xe8, 0xd0, 0xcc, 0xae, 0x51, 0xf1, 0xae, 0xee, 0xbc, 0x7d, 0x4e, 0xb0, 0xe6, 0xbe, 0xce,
871         0x1f, 0x59, 0xcd, 0x5f, 0xf2, 0x50, 0x5b, 0xbf, 0x3d, 0x3a, 0x06, 0x67, 0x46, 0x53, 0x46, 0xff,
872         0x75, 0x41, 0x41, 0xd3, 0x55, 0x45, 0xbf, 0x87, 0xa2, 0xb8, 0x4e, 0x74, 0x16, 0x9b, 0x9d, 0xc3,
873         0x4f, 0x13, 0xde, 0xbd, 0xb8, 0x4e, 0x28, 0x56, 0x01, 0xd0, 0x36, 0xc0, 0x9c, 0x72, 0x4e, 0x26,
874         0x34, 0x7b, 0x56, 0x8a, 0xb8, 0x6a, 0x90, 0x7e, 0x80, 0xf6, 0xa0, 0x96, 0x99, 0x79, 0x78, 0xa3,
875         0xdf, 0x94, 0x22, 0x76, 0x0c, 0x36, 0x0a, 0x6f, 0x68, 0xeb, 0x6b, 0x28, 0xca, 0x78, 0xe8, 0x11,
876         0x38, 0xef, 0x06, 0xa3, 0x61, 0xf7, 0xb4, 0x7f, 0xde, 0xef, 0x9e, 0xd5, 0x73, 0xa8, 0x02, 0xc5,
877         0x51, 0x77, 0x70, 0x51, 0xb7, 0xe4, 0x0a, 0x77, 0x4f, 0x2f, 0xeb, 0xf9, 0xd5, 0xd3, 0xd7, 0xfc,
878         0xc3, 0x82, 0xa2, 0x9c, 0x21, 0xf4, 0x0a, 0x2a, 0xfa, 0x83, 0x66, 0x1e, 0xc0, 0x35, 0x0d, 0xd6,
879         0x6e, 0x63, 0x3e, 0xde, 0xb8, 0x2c, 0xcc, 0x57, 0x7c, 0x0b, 0xca, 0x3c, 0x21, 0x2c, 0xfb, 0x02,
880         0xda, 0xd8, 0x96, 0xdb, 0x7e, 0x80, 0x5e, 0x19, 0x65, 0x0a, 0x4a, 0x99, 0xbd, 0x8f, 0xcd, 0xef,
881         0x9a, 0x0e, 0x2d, 0xf7, 0xbe, 0x5b, 0x54, 0xa1, 0x74, 0xda, 0xeb, 0xbf, 0x3d, 0xab, 0x5b, 0x08,
882         0xc0, 0x1e, 0xbe, 0xc1, 0xf2, 0x4a, 0xf9, 0xff, 0xaf, 0x51, 0x5a, 0x73, 0x28, 0xe9, 0xe7, 0xec,
883         0x3f, 0x2a, 0xf3, 0x02, 0x4a, 0x52, 0x8a, 0x6c, 0x26, 0xb6, 0xee, 0x51, 0x00, 0x6b, 0xd6, 0x89,
884         0x07, 0x9f, 0xfb, 0xf1, 0xfc, 0x43, 0xd2, 0x09, 0xa8, 0xc8, 0x43, 0xd9, 0x87, 0x43, 0xeb, 0xa7,
885         0x23, 0x43, 0x98, 0xc4, 0x11, 0x61, 0x13, 0x37, 0x4e, 0x27, 0xed, 0x09, 0x65, 0xaa, 0x4b, 0xdb,
886         0xda, 0x44, 0x92, 0x90, 0xaf, 0xfe, 0xe6, 0x2d, 0x5f, 0x1e, 0x9b, 0xe5, 0xd8, 0x56, 0xa4, 0xc3,
887         0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x30, 0x5b, 0x04, 0x0a, 0x0a, 0x00, 0x00,
888 }