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