1 // Copyright 2019 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 type ExportTraceServiceRequest struct {
8 Node *Node `json:"node,omitempty"`
9 Spans []*Span `json:"spans,omitempty"`
10 Resource *Resource `json:"resource,omitempty"`
14 TraceID []byte `json:"trace_id,omitempty"`
15 SpanID []byte `json:"span_id,omitempty"`
16 TraceState *TraceState `json:"tracestate,omitempty"`
17 ParentSpanID []byte `json:"parent_span_id,omitempty"`
18 Name *TruncatableString `json:"name,omitempty"`
19 Kind SpanKind `json:"kind,omitempty"`
20 StartTime Timestamp `json:"start_time,omitempty"`
21 EndTime Timestamp `json:"end_time,omitempty"`
22 Attributes *Attributes `json:"attributes,omitempty"`
23 StackTrace *StackTrace `json:"stack_trace,omitempty"`
24 TimeEvents *TimeEvents `json:"time_events,omitempty"`
25 Links *Links `json:"links,omitempty"`
26 Status *Status `json:"status,omitempty"`
27 Resource *Resource `json:"resource,omitempty"`
28 SameProcessAsParentSpan bool `json:"same_process_as_parent_span,omitempty"`
29 ChildSpanCount bool `json:"child_span_count,omitempty"`
32 type TraceState struct {
33 Entries []*TraceStateEntry `json:"entries,omitempty"`
36 type TraceStateEntry struct {
37 Key string `json:"key,omitempty"`
38 Value string `json:"value,omitempty"`
44 UnspecifiedSpanKind SpanKind = 0
45 ServerSpanKind SpanKind = 1
46 ClientSpanKind SpanKind = 2
49 type TimeEvents struct {
50 TimeEvent []TimeEvent `json:"timeEvent,omitempty"`
51 DroppedAnnotationsCount int32 `json:"dropped_annotations_count,omitempty"`
52 DroppedMessageEventsCount int32 `json:"dropped_message_events_count,omitempty"`
55 type TimeEvent struct {
56 Time Timestamp `json:"time,omitempty"`
57 MessageEvent *MessageEvent `json:"messageEvent,omitempty"`
58 Annotation *Annotation `json:"annotation,omitempty"`
61 type Annotation struct {
62 Description *TruncatableString `json:"description,omitempty"`
63 Attributes *Attributes `json:"attributes,omitempty"`
66 type MessageEvent struct {
67 Type MessageEventType `json:"type,omitempty"`
68 ID uint64 `json:"id,omitempty"`
69 UncompressedSize uint64 `json:"uncompressed_size,omitempty"`
70 CompressedSize uint64 `json:"compressed_size,omitempty"`
73 type MessageEventType int32
76 UnspecifiedMessageEvent MessageEventType = iota
81 type TimeEventValue interface {
85 func (Annotation) labelTimeEventValue() {}
86 func (MessageEvent) labelTimeEventValue() {}
89 Link []*Link `json:"link,omitempty"`
90 DroppedLinksCount int32 `json:"dropped_links_count,omitempty"`
94 TraceID []byte `json:"trace_id,omitempty"`
95 SpanID []byte `json:"span_id,omitempty"`
96 Type LinkType `json:"type,omitempty"`
97 Attributes *Attributes `json:"attributes,omitempty"`
98 TraceState *TraceState `json:"tracestate,omitempty"`
104 UnspecifiedLinkType LinkType = 0
105 ChildLinkType LinkType = 1
106 ParentLinkType LinkType = 2
110 Code int32 `json:"code,omitempty"`
111 Message string `json:"message,omitempty"`