opentelemetry-exporter-jaeger 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,17 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.12.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'jaeger_types'
9
+
10
+ module OpenTelemetry
11
+ module Exporter
12
+ module Jaeger
13
+ module Thrift
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,229 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.12.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+
9
+ module OpenTelemetry
10
+ module Exporter
11
+ module Jaeger
12
+ module Thrift
13
+ module TagType
14
+ STRING = 0
15
+ DOUBLE = 1
16
+ BOOL = 2
17
+ LONG = 3
18
+ BINARY = 4
19
+ VALUE_MAP = {0 => "STRING", 1 => "DOUBLE", 2 => "BOOL", 3 => "LONG", 4 => "BINARY"}
20
+ VALID_VALUES = Set.new([STRING, DOUBLE, BOOL, LONG, BINARY]).freeze
21
+ end
22
+
23
+ module SpanRefType
24
+ CHILD_OF = 0
25
+ FOLLOWS_FROM = 1
26
+ VALUE_MAP = {0 => "CHILD_OF", 1 => "FOLLOWS_FROM"}
27
+ VALID_VALUES = Set.new([CHILD_OF, FOLLOWS_FROM]).freeze
28
+ end
29
+
30
+ class Tag; end
31
+
32
+ class Log; end
33
+
34
+ class SpanRef; end
35
+
36
+ class Span; end
37
+
38
+ class Process; end
39
+
40
+ class Batch; end
41
+
42
+ class BatchSubmitResponse; end
43
+
44
+ class Tag
45
+ include ::Thrift::Struct, ::Thrift::Struct_Union
46
+ KEY = 1
47
+ VTYPE = 2
48
+ VSTR = 3
49
+ VDOUBLE = 4
50
+ VBOOL = 5
51
+ VLONG = 6
52
+ VBINARY = 7
53
+
54
+ FIELDS = {
55
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
56
+ VTYPE => {:type => ::Thrift::Types::I32, :name => 'vType', :enum_class => ::OpenTelemetry::Exporter::Jaeger::Thrift::TagType},
57
+ VSTR => {:type => ::Thrift::Types::STRING, :name => 'vStr', :optional => true},
58
+ VDOUBLE => {:type => ::Thrift::Types::DOUBLE, :name => 'vDouble', :optional => true},
59
+ VBOOL => {:type => ::Thrift::Types::BOOL, :name => 'vBool', :optional => true},
60
+ VLONG => {:type => ::Thrift::Types::I64, :name => 'vLong', :optional => true},
61
+ VBINARY => {:type => ::Thrift::Types::STRING, :name => 'vBinary', :binary => true, :optional => true}
62
+ }
63
+
64
+ def struct_fields; FIELDS; end
65
+
66
+ def validate
67
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
68
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field vType is unset!') unless @vType
69
+ unless @vType.nil? || ::OpenTelemetry::Exporter::Jaeger::Thrift::TagType::VALID_VALUES.include?(@vType)
70
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field vType!')
71
+ end
72
+ end
73
+
74
+ ::Thrift::Struct.generate_accessors self
75
+ end
76
+
77
+ class Log
78
+ include ::Thrift::Struct, ::Thrift::Struct_Union
79
+ TIMESTAMP = 1
80
+ FIELDS = 2
81
+
82
+ FIELDS = {
83
+ TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'},
84
+ FIELDS => {:type => ::Thrift::Types::LIST, :name => 'fields', :element => {:type => ::Thrift::Types::STRUCT, :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Tag}}
85
+ }
86
+
87
+ def struct_fields; FIELDS; end
88
+
89
+ def validate
90
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timestamp is unset!') unless @timestamp
91
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fields is unset!') unless @fields
92
+ end
93
+
94
+ ::Thrift::Struct.generate_accessors self
95
+ end
96
+
97
+ class SpanRef
98
+ include ::Thrift::Struct, ::Thrift::Struct_Union
99
+ REFTYPE = 1
100
+ TRACEIDLOW = 2
101
+ TRACEIDHIGH = 3
102
+ SPANID = 4
103
+
104
+ FIELDS = {
105
+ REFTYPE => {:type => ::Thrift::Types::I32, :name => 'refType', :enum_class => ::OpenTelemetry::Exporter::Jaeger::Thrift::SpanRefType},
106
+ TRACEIDLOW => {:type => ::Thrift::Types::I64, :name => 'traceIdLow'},
107
+ TRACEIDHIGH => {:type => ::Thrift::Types::I64, :name => 'traceIdHigh'},
108
+ SPANID => {:type => ::Thrift::Types::I64, :name => 'spanId'}
109
+ }
110
+
111
+ def struct_fields; FIELDS; end
112
+
113
+ def validate
114
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field refType is unset!') unless @refType
115
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field traceIdLow is unset!') unless @traceIdLow
116
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field traceIdHigh is unset!') unless @traceIdHigh
117
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field spanId is unset!') unless @spanId
118
+ unless @refType.nil? || ::OpenTelemetry::Exporter::Jaeger::Thrift::SpanRefType::VALID_VALUES.include?(@refType)
119
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field refType!')
120
+ end
121
+ end
122
+
123
+ ::Thrift::Struct.generate_accessors self
124
+ end
125
+
126
+ class Span
127
+ include ::Thrift::Struct, ::Thrift::Struct_Union
128
+ TRACEIDLOW = 1
129
+ TRACEIDHIGH = 2
130
+ SPANID = 3
131
+ PARENTSPANID = 4
132
+ OPERATIONNAME = 5
133
+ REFERENCES = 6
134
+ FLAGS = 7
135
+ STARTTIME = 8
136
+ DURATION = 9
137
+ TAGS = 10
138
+ LOGS = 11
139
+
140
+ FIELDS = {
141
+ TRACEIDLOW => {:type => ::Thrift::Types::I64, :name => 'traceIdLow'},
142
+ TRACEIDHIGH => {:type => ::Thrift::Types::I64, :name => 'traceIdHigh'},
143
+ SPANID => {:type => ::Thrift::Types::I64, :name => 'spanId'},
144
+ PARENTSPANID => {:type => ::Thrift::Types::I64, :name => 'parentSpanId'},
145
+ OPERATIONNAME => {:type => ::Thrift::Types::STRING, :name => 'operationName'},
146
+ REFERENCES => {:type => ::Thrift::Types::LIST, :name => 'references', :element => {:type => ::Thrift::Types::STRUCT, :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::SpanRef}, :optional => true},
147
+ FLAGS => {:type => ::Thrift::Types::I32, :name => 'flags'},
148
+ STARTTIME => {:type => ::Thrift::Types::I64, :name => 'startTime'},
149
+ DURATION => {:type => ::Thrift::Types::I64, :name => 'duration'},
150
+ TAGS => {:type => ::Thrift::Types::LIST, :name => 'tags', :element => {:type => ::Thrift::Types::STRUCT, :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Tag}, :optional => true},
151
+ LOGS => {:type => ::Thrift::Types::LIST, :name => 'logs', :element => {:type => ::Thrift::Types::STRUCT, :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Log}, :optional => true}
152
+ }
153
+
154
+ def struct_fields; FIELDS; end
155
+
156
+ def validate
157
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field traceIdLow is unset!') unless @traceIdLow
158
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field traceIdHigh is unset!') unless @traceIdHigh
159
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field spanId is unset!') unless @spanId
160
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field parentSpanId is unset!') unless @parentSpanId
161
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationName is unset!') unless @operationName
162
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field flags is unset!') unless @flags
163
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field startTime is unset!') unless @startTime
164
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field duration is unset!') unless @duration
165
+ end
166
+
167
+ ::Thrift::Struct.generate_accessors self
168
+ end
169
+
170
+ class Process
171
+ include ::Thrift::Struct, ::Thrift::Struct_Union
172
+ SERVICENAME = 1
173
+ TAGS = 2
174
+
175
+ FIELDS = {
176
+ SERVICENAME => {:type => ::Thrift::Types::STRING, :name => 'serviceName'},
177
+ TAGS => {:type => ::Thrift::Types::LIST, :name => 'tags', :element => {:type => ::Thrift::Types::STRUCT, :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Tag}, :optional => true}
178
+ }
179
+
180
+ def struct_fields; FIELDS; end
181
+
182
+ def validate
183
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field serviceName is unset!') unless @serviceName
184
+ end
185
+
186
+ ::Thrift::Struct.generate_accessors self
187
+ end
188
+
189
+ class Batch
190
+ include ::Thrift::Struct, ::Thrift::Struct_Union
191
+ PROCESS = 1
192
+ SPANS = 2
193
+
194
+ FIELDS = {
195
+ PROCESS => {:type => ::Thrift::Types::STRUCT, :name => 'process', :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Process},
196
+ SPANS => {:type => ::Thrift::Types::LIST, :name => 'spans', :element => {:type => ::Thrift::Types::STRUCT, :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Span}}
197
+ }
198
+
199
+ def struct_fields; FIELDS; end
200
+
201
+ def validate
202
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field process is unset!') unless @process
203
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field spans is unset!') unless @spans
204
+ end
205
+
206
+ ::Thrift::Struct.generate_accessors self
207
+ end
208
+
209
+ class BatchSubmitResponse
210
+ include ::Thrift::Struct, ::Thrift::Struct_Union
211
+ OK = 1
212
+
213
+ FIELDS = {
214
+ OK => {:type => ::Thrift::Types::BOOL, :name => 'ok'}
215
+ }
216
+
217
+ def struct_fields; FIELDS; end
218
+
219
+ def validate
220
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field ok is unset!') if @ok.nil?
221
+ end
222
+
223
+ ::Thrift::Struct.generate_accessors self
224
+ end
225
+
226
+ end
227
+ end
228
+ end
229
+ end
@@ -0,0 +1,88 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.12.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'zipkincore_types'
9
+
10
+ module OpenTelemetry
11
+ module Exporter
12
+ module Jaeger
13
+ module Thrift
14
+ module Zipkin
15
+ module ZipkinCollector
16
+ class Client
17
+ include ::Thrift::Client
18
+
19
+ def submitZipkinBatch(spans)
20
+ send_submitZipkinBatch(spans)
21
+ return recv_submitZipkinBatch()
22
+ end
23
+
24
+ def send_submitZipkinBatch(spans)
25
+ send_message('submitZipkinBatch', SubmitZipkinBatch_args, :spans => spans)
26
+ end
27
+
28
+ def recv_submitZipkinBatch()
29
+ result = receive_message(SubmitZipkinBatch_result)
30
+ return result.success unless result.success.nil?
31
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'submitZipkinBatch failed: unknown result')
32
+ end
33
+
34
+ end
35
+
36
+ class Processor
37
+ include ::Thrift::Processor
38
+
39
+ def process_submitZipkinBatch(seqid, iprot, oprot)
40
+ args = read_args(iprot, SubmitZipkinBatch_args)
41
+ result = SubmitZipkinBatch_result.new()
42
+ result.success = @handler.submitZipkinBatch(args.spans)
43
+ write_result(result, oprot, 'submitZipkinBatch', seqid)
44
+ end
45
+
46
+ end
47
+
48
+ # HELPER FUNCTIONS AND STRUCTURES
49
+
50
+ class SubmitZipkinBatch_args
51
+ include ::Thrift::Struct, ::Thrift::Struct_Union
52
+ SPANS = 1
53
+
54
+ FIELDS = {
55
+ SPANS => {:type => ::Thrift::Types::LIST, :name => 'spans', :element => {:type => ::Thrift::Types::STRUCT, :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Zipkin::Span}}
56
+ }
57
+
58
+ def struct_fields; FIELDS; end
59
+
60
+ def validate
61
+ end
62
+
63
+ ::Thrift::Struct.generate_accessors self
64
+ end
65
+
66
+ class SubmitZipkinBatch_result
67
+ include ::Thrift::Struct, ::Thrift::Struct_Union
68
+ SUCCESS = 0
69
+
70
+ FIELDS = {
71
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Zipkin::Response}}
72
+ }
73
+
74
+ def struct_fields; FIELDS; end
75
+
76
+ def validate
77
+ end
78
+
79
+ ::Thrift::Struct.generate_accessors self
80
+ end
81
+
82
+ end
83
+
84
+ end
85
+ end
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,51 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.12.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'zipkincore_types'
9
+
10
+ module OpenTelemetry
11
+ module Exporter
12
+ module Jaeger
13
+ module Thrift
14
+ module Zipkin
15
+ CLIENT_SEND = %q"cs"
16
+
17
+ CLIENT_RECV = %q"cr"
18
+
19
+ SERVER_SEND = %q"ss"
20
+
21
+ SERVER_RECV = %q"sr"
22
+
23
+ MESSAGE_SEND = %q"ms"
24
+
25
+ MESSAGE_RECV = %q"mr"
26
+
27
+ WIRE_SEND = %q"ws"
28
+
29
+ WIRE_RECV = %q"wr"
30
+
31
+ CLIENT_SEND_FRAGMENT = %q"csf"
32
+
33
+ CLIENT_RECV_FRAGMENT = %q"crf"
34
+
35
+ SERVER_SEND_FRAGMENT = %q"ssf"
36
+
37
+ SERVER_RECV_FRAGMENT = %q"srf"
38
+
39
+ LOCAL_COMPONENT = %q"lc"
40
+
41
+ CLIENT_ADDR = %q"ca"
42
+
43
+ SERVER_ADDR = %q"sa"
44
+
45
+ MESSAGE_ADDR = %q"ma"
46
+
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,241 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.12.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+
9
+ module OpenTelemetry
10
+ module Exporter
11
+ module Jaeger
12
+ module Thrift
13
+ module Zipkin
14
+ module AnnotationType
15
+ BOOL = 0
16
+ BYTES = 1
17
+ I16 = 2
18
+ I32 = 3
19
+ I64 = 4
20
+ DOUBLE = 5
21
+ STRING = 6
22
+ VALUE_MAP = {0 => "BOOL", 1 => "BYTES", 2 => "I16", 3 => "I32", 4 => "I64", 5 => "DOUBLE", 6 => "STRING"}
23
+ VALID_VALUES = Set.new([BOOL, BYTES, I16, I32, I64, DOUBLE, STRING]).freeze
24
+ end
25
+
26
+ class Endpoint; end
27
+
28
+ class Annotation; end
29
+
30
+ class BinaryAnnotation; end
31
+
32
+ class Span; end
33
+
34
+ class Response; end
35
+
36
+ # Indicates the network context of a service recording an annotation with two
37
+ # exceptions.
38
+ #
39
+ # When a BinaryAnnotation, and key is CLIENT_ADDR or SERVER_ADDR,
40
+ # the endpoint indicates the source or destination of an RPC. This exception
41
+ # allows zipkin to display network context of uninstrumented services, or
42
+ # clients such as web browsers.
43
+ class Endpoint
44
+ include ::Thrift::Struct, ::Thrift::Struct_Union
45
+ IPV4 = 1
46
+ PORT = 2
47
+ SERVICE_NAME = 3
48
+ IPV6 = 4
49
+
50
+ FIELDS = {
51
+ # IPv4 host address packed into 4 bytes.
52
+ #
53
+ # Ex for the ip 1.2.3.4, it would be (1 << 24) | (2 << 16) | (3 << 8) | 4
54
+ IPV4 => {:type => ::Thrift::Types::I32, :name => 'ipv4'},
55
+ # IPv4 port
56
+ #
57
+ # Note: this is to be treated as an unsigned integer, so watch for negatives.
58
+ #
59
+ # Conventionally, when the port isn't known, port = 0.
60
+ PORT => {:type => ::Thrift::Types::I16, :name => 'port'},
61
+ # Service name in lowercase, such as "memcache" or "zipkin-web"
62
+ #
63
+ # Conventionally, when the service name isn't known, service_name = "unknown".
64
+ SERVICE_NAME => {:type => ::Thrift::Types::STRING, :name => 'service_name'},
65
+ # IPv6 host address packed into 16 bytes. Ex Inet6Address.getBytes()
66
+ IPV6 => {:type => ::Thrift::Types::STRING, :name => 'ipv6', :binary => true, :optional => true}
67
+ }
68
+
69
+ def struct_fields; FIELDS; end
70
+
71
+ def validate
72
+ end
73
+
74
+ ::Thrift::Struct.generate_accessors self
75
+ end
76
+
77
+ # An annotation is similar to a log statement. It includes a host field which
78
+ # allows these events to be attributed properly, and also aggregatable.
79
+ class Annotation
80
+ include ::Thrift::Struct, ::Thrift::Struct_Union
81
+ TIMESTAMP = 1
82
+ VALUE = 2
83
+ HOST = 3
84
+
85
+ FIELDS = {
86
+ # Microseconds from epoch.
87
+ #
88
+ # This value should use the most precise value possible. For example,
89
+ # gettimeofday or syncing nanoTime against a tick of currentTimeMillis.
90
+ TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'},
91
+ VALUE => {:type => ::Thrift::Types::STRING, :name => 'value'},
92
+ # Always the host that recorded the event. By specifying the host you allow
93
+ # rollup of all events (such as client requests to a service) by IP address.
94
+ HOST => {:type => ::Thrift::Types::STRUCT, :name => 'host', :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Zipkin::Endpoint, :optional => true}
95
+ }
96
+
97
+ def struct_fields; FIELDS; end
98
+
99
+ def validate
100
+ end
101
+
102
+ ::Thrift::Struct.generate_accessors self
103
+ end
104
+
105
+ # Binary annotations are tags applied to a Span to give it context. For
106
+ # example, a binary annotation of "http.uri" could the path to a resource in a
107
+ # RPC call.
108
+ #
109
+ # Binary annotations of type STRING are always queryable, though more a
110
+ # historical implementation detail than a structural concern.
111
+ #
112
+ # Binary annotations can repeat, and vary on the host. Similar to Annotation,
113
+ # the host indicates who logged the event. This allows you to tell the
114
+ # difference between the client and server side of the same key. For example,
115
+ # the key "http.uri" might be different on the client and server side due to
116
+ # rewriting, like "/api/v1/myresource" vs "/myresource. Via the host field,
117
+ # you can see the different points of view, which often help in debugging.
118
+ class BinaryAnnotation
119
+ include ::Thrift::Struct, ::Thrift::Struct_Union
120
+ KEY = 1
121
+ VALUE = 2
122
+ ANNOTATION_TYPE = 3
123
+ HOST = 4
124
+
125
+ FIELDS = {
126
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
127
+ VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true},
128
+ ANNOTATION_TYPE => {:type => ::Thrift::Types::I32, :name => 'annotation_type', :enum_class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Zipkin::AnnotationType},
129
+ # The host that recorded tag, which allows you to differentiate between
130
+ # multiple tags with the same key. There are two exceptions to this.
131
+ #
132
+ # When the key is CLIENT_ADDR or SERVER_ADDR, host indicates the source or
133
+ # destination of an RPC. This exception allows zipkin to display network
134
+ # context of uninstrumented services, or clients such as web browsers.
135
+ HOST => {:type => ::Thrift::Types::STRUCT, :name => 'host', :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Zipkin::Endpoint, :optional => true}
136
+ }
137
+
138
+ def struct_fields; FIELDS; end
139
+
140
+ def validate
141
+ unless @annotation_type.nil? || ::OpenTelemetry::Exporter::Jaeger::Thrift::Zipkin::AnnotationType::VALID_VALUES.include?(@annotation_type)
142
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field annotation_type!')
143
+ end
144
+ end
145
+
146
+ ::Thrift::Struct.generate_accessors self
147
+ end
148
+
149
+ # A trace is a series of spans (often RPC calls) which form a latency tree.
150
+ #
151
+ # The root span is where trace_id = id and parent_id = Nil. The root span is
152
+ # usually the longest interval in the trace, starting with a SERVER_RECV
153
+ # annotation and ending with a SERVER_SEND.
154
+ class Span
155
+ include ::Thrift::Struct, ::Thrift::Struct_Union
156
+ TRACE_ID = 1
157
+ NAME = 3
158
+ ID = 4
159
+ PARENT_ID = 5
160
+ ANNOTATIONS = 6
161
+ BINARY_ANNOTATIONS = 8
162
+ DEBUG = 9
163
+ TIMESTAMP = 10
164
+ DURATION = 11
165
+ TRACE_ID_HIGH = 12
166
+
167
+ FIELDS = {
168
+ TRACE_ID => {:type => ::Thrift::Types::I64, :name => 'trace_id'},
169
+ # Span name in lowercase, rpc method for example
170
+ #
171
+ # Conventionally, when the span name isn't known, name = "unknown".
172
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
173
+ ID => {:type => ::Thrift::Types::I64, :name => 'id'},
174
+ PARENT_ID => {:type => ::Thrift::Types::I64, :name => 'parent_id', :optional => true},
175
+ ANNOTATIONS => {:type => ::Thrift::Types::LIST, :name => 'annotations', :element => {:type => ::Thrift::Types::STRUCT, :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Zipkin::Annotation}},
176
+ BINARY_ANNOTATIONS => {:type => ::Thrift::Types::LIST, :name => 'binary_annotations', :element => {:type => ::Thrift::Types::STRUCT, :class => ::OpenTelemetry::Exporter::Jaeger::Thrift::Zipkin::BinaryAnnotation}},
177
+ DEBUG => {:type => ::Thrift::Types::BOOL, :name => 'debug', :default => false, :optional => true},
178
+ # Microseconds from epoch of the creation of this span.
179
+ #
180
+ # This value should be set directly by instrumentation, using the most
181
+ # precise value possible. For example, gettimeofday or syncing nanoTime
182
+ # against a tick of currentTimeMillis.
183
+ #
184
+ # For compatibilty with instrumentation that precede this field, collectors
185
+ # or span stores can derive this via Annotation.timestamp.
186
+ # For example, SERVER_RECV.timestamp or CLIENT_SEND.timestamp.
187
+ #
188
+ # This field is optional for compatibility with old data: first-party span
189
+ # stores are expected to support this at time of introduction.
190
+ TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true},
191
+ # Measurement of duration in microseconds, used to support queries.
192
+ #
193
+ # This value should be set directly, where possible. Doing so encourages
194
+ # precise measurement decoupled from problems of clocks, such as skew or NTP
195
+ # updates causing time to move backwards.
196
+ #
197
+ # For compatibilty with instrumentation that precede this field, collectors
198
+ # or span stores can derive this by subtracting Annotation.timestamp.
199
+ # For example, SERVER_SEND.timestamp - SERVER_RECV.timestamp.
200
+ #
201
+ # If this field is persisted as unset, zipkin will continue to work, except
202
+ # duration query support will be implementation-specific. Similarly, setting
203
+ # this field non-atomically is implementation-specific.
204
+ #
205
+ # This field is i64 vs i32 to support spans longer than 35 minutes.
206
+ DURATION => {:type => ::Thrift::Types::I64, :name => 'duration', :optional => true},
207
+ # Optional unique 8-byte additional identifier for a trace. If non zero, this
208
+ # means the trace uses 128 bit traceIds instead of 64 bit.
209
+ TRACE_ID_HIGH => {:type => ::Thrift::Types::I64, :name => 'trace_id_high', :optional => true}
210
+ }
211
+
212
+ def struct_fields; FIELDS; end
213
+
214
+ def validate
215
+ end
216
+
217
+ ::Thrift::Struct.generate_accessors self
218
+ end
219
+
220
+ class Response
221
+ include ::Thrift::Struct, ::Thrift::Struct_Union
222
+ OK = 1
223
+
224
+ FIELDS = {
225
+ OK => {:type => ::Thrift::Types::BOOL, :name => 'ok'}
226
+ }
227
+
228
+ def struct_fields; FIELDS; end
229
+
230
+ def validate
231
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field ok is unset!') if @ok.nil?
232
+ end
233
+
234
+ ::Thrift::Struct.generate_accessors self
235
+ end
236
+
237
+ end
238
+ end
239
+ end
240
+ end
241
+ end