Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
kcenon::monitoring::jaeger_proto Namespace Reference

Classes

struct  batch
 
struct  key_value
 
struct  process
 
struct  span
 
struct  span_ref
 

Enumerations

enum class  value_type : std::int32_t {
  string_type = 0 , bool_type = 1 , int64_type = 2 , float64_type = 3 ,
  binary_type = 4
}
 

Functions

std::vector< std::uint8_t > encode_timestamp (std::int64_t seconds, std::int32_t nanos)
 
std::vector< std::uint8_t > encode_duration (std::int64_t seconds, std::int32_t nanos)
 
std::vector< std::uint8_t > encode_key_value (const key_value &kv)
 
std::vector< std::uint8_t > encode_process (const process &p)
 
std::vector< std::uint8_t > encode_span_ref (const span_ref &ref)
 
std::vector< std::uint8_t > encode_span (const span &s)
 
std::vector< std::uint8_t > encode_batch (const batch &b)
 
bool decode_key_value (const std::uint8_t *data, std::size_t size, key_value &out)
 
bool decode_process (const std::uint8_t *data, std::size_t size, process &out)
 
bool decode_timestamp (const std::uint8_t *data, std::size_t size, std::int64_t &seconds, std::int32_t &nanos)
 
bool decode_span_ref (const std::uint8_t *data, std::size_t size, span_ref &out)
 
bool decode_span (const std::uint8_t *data, std::size_t size, span &out)
 
bool decode_batch (const std::uint8_t *data, std::size_t size, batch &out)
 

Enumeration Type Documentation

◆ value_type

enum class kcenon::monitoring::jaeger_proto::value_type : std::int32_t
strong
Enumerator
string_type 
bool_type 
int64_type 
float64_type 
binary_type 

Definition at line 37 of file jaeger_proto.h.

Function Documentation

◆ decode_batch()

bool kcenon::monitoring::jaeger_proto::decode_batch ( const std::uint8_t * data,
std::size_t size,
batch & out )
inline

Definition at line 407 of file jaeger_proto.h.

408 {
409 protobuf_wire::reader r(data, size);
410 while (!r.eof()) {
411 std::uint32_t field_number;
413 if (!protobuf_wire::decode_tag(r, field_number, wt)) return false;
414 switch (field_number) {
415 case 1: {
416 if (wt != protobuf_wire::wire_type::length_delimited) return false;
417 const std::uint8_t* ptr; std::size_t len;
418 if (!r.read_length_delimited(&ptr, &len)) return false;
419 span s;
420 if (!decode_span(ptr, len, s)) return false;
421 out.spans.push_back(std::move(s));
422 break;
423 }
424 case 2: {
425 if (wt != protobuf_wire::wire_type::length_delimited) return false;
426 const std::uint8_t* ptr; std::size_t len;
427 if (!r.read_length_delimited(&ptr, &len)) return false;
428 if (!decode_process(ptr, len, out.proc)) return false;
429 out.has_process = true;
430 break;
431 }
432 default:
433 if (!r.skip_field(wt)) return false;
434 }
435 }
436 return true;
437}
Minimal protobuf wire reader used for round-trip tests.
bool decode_span(const std::uint8_t *data, std::size_t size, span &out)

References decode_process(), decode_span(), kcenon::monitoring::protobuf_wire::decode_tag(), kcenon::monitoring::protobuf_wire::reader::eof(), kcenon::monitoring::jaeger_proto::batch::has_process, kcenon::monitoring::protobuf_wire::length_delimited, kcenon::monitoring::jaeger_proto::batch::proc, kcenon::monitoring::protobuf_wire::reader::read_length_delimited(), kcenon::monitoring::protobuf_wire::reader::skip_field(), and kcenon::monitoring::jaeger_proto::batch::spans.

Referenced by TEST_F().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_key_value()

bool kcenon::monitoring::jaeger_proto::decode_key_value ( const std::uint8_t * data,
std::size_t size,
key_value & out )
inline

Definition at line 194 of file jaeger_proto.h.

195 {
196 protobuf_wire::reader r(data, size);
197 while (!r.eof()) {
198 std::uint32_t field_number;
200 if (!protobuf_wire::decode_tag(r, field_number, wt)) return false;
201 switch (field_number) {
202 case 1:
203 if (wt != protobuf_wire::wire_type::length_delimited) return false;
204 if (!r.read_string(out.key)) return false;
205 break;
206 case 2: {
207 if (wt != protobuf_wire::wire_type::varint) return false;
208 auto v = r.read_varint();
209 if (!v) return false;
210 out.v_type = static_cast<value_type>(*v);
211 break;
212 }
213 case 3:
214 if (wt != protobuf_wire::wire_type::length_delimited) return false;
215 if (!r.read_string(out.v_str)) return false;
216 break;
217 case 4: {
218 if (wt != protobuf_wire::wire_type::varint) return false;
219 auto v = r.read_varint();
220 if (!v) return false;
221 out.v_bool = (*v != 0);
222 break;
223 }
224 case 5: {
225 if (wt != protobuf_wire::wire_type::varint) return false;
226 auto v = r.read_varint();
227 if (!v) return false;
228 out.v_int64 = static_cast<std::int64_t>(*v);
229 break;
230 }
231 case 6: {
232 if (wt != protobuf_wire::wire_type::fixed64) return false;
233 auto v = r.read_fixed64();
234 if (!v) return false;
235 std::uint64_t bits = *v;
236 std::memcpy(&out.v_float64, &bits, sizeof(out.v_float64));
237 break;
238 }
239 case 7:
240 if (wt != protobuf_wire::wire_type::length_delimited) return false;
241 if (!r.read_bytes(out.v_binary)) return false;
242 break;
243 default:
244 if (!r.skip_field(wt)) return false;
245 }
246 }
247 return true;
248}
std::vector< std::uint8_t > v_binary

References kcenon::monitoring::protobuf_wire::decode_tag(), kcenon::monitoring::protobuf_wire::reader::eof(), kcenon::monitoring::protobuf_wire::fixed64, kcenon::monitoring::jaeger_proto::key_value::key, kcenon::monitoring::protobuf_wire::length_delimited, kcenon::monitoring::protobuf_wire::reader::read_bytes(), kcenon::monitoring::protobuf_wire::reader::read_fixed64(), kcenon::monitoring::protobuf_wire::reader::read_string(), kcenon::monitoring::protobuf_wire::reader::read_varint(), kcenon::monitoring::protobuf_wire::reader::skip_field(), kcenon::monitoring::jaeger_proto::key_value::v_binary, kcenon::monitoring::jaeger_proto::key_value::v_bool, kcenon::monitoring::jaeger_proto::key_value::v_float64, kcenon::monitoring::jaeger_proto::key_value::v_int64, kcenon::monitoring::jaeger_proto::key_value::v_str, kcenon::monitoring::jaeger_proto::key_value::v_type, and kcenon::monitoring::protobuf_wire::varint.

Referenced by decode_process(), and decode_span().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_process()

bool kcenon::monitoring::jaeger_proto::decode_process ( const std::uint8_t * data,
std::size_t size,
process & out )
inline

Definition at line 250 of file jaeger_proto.h.

251 {
252 protobuf_wire::reader r(data, size);
253 while (!r.eof()) {
254 std::uint32_t field_number;
256 if (!protobuf_wire::decode_tag(r, field_number, wt)) return false;
257 switch (field_number) {
258 case 1:
259 if (wt != protobuf_wire::wire_type::length_delimited) return false;
260 if (!r.read_string(out.service_name)) return false;
261 break;
262 case 2: {
263 if (wt != protobuf_wire::wire_type::length_delimited) return false;
264 const std::uint8_t* ptr; std::size_t len;
265 if (!r.read_length_delimited(&ptr, &len)) return false;
266 key_value kv;
267 if (!decode_key_value(ptr, len, kv)) return false;
268 out.tags.push_back(std::move(kv));
269 break;
270 }
271 default:
272 if (!r.skip_field(wt)) return false;
273 }
274 }
275 return true;
276}
bool decode_key_value(const std::uint8_t *data, std::size_t size, key_value &out)

References decode_key_value(), kcenon::monitoring::protobuf_wire::decode_tag(), kcenon::monitoring::protobuf_wire::reader::eof(), kcenon::monitoring::protobuf_wire::length_delimited, kcenon::monitoring::protobuf_wire::reader::read_length_delimited(), kcenon::monitoring::protobuf_wire::reader::read_string(), kcenon::monitoring::jaeger_proto::process::service_name, kcenon::monitoring::protobuf_wire::reader::skip_field(), and kcenon::monitoring::jaeger_proto::process::tags.

Referenced by decode_batch(), and decode_span().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_span()

bool kcenon::monitoring::jaeger_proto::decode_span ( const std::uint8_t * data,
std::size_t size,
span & out )
inline

Definition at line 328 of file jaeger_proto.h.

329 {
330 protobuf_wire::reader r(data, size);
331 while (!r.eof()) {
332 std::uint32_t field_number;
334 if (!protobuf_wire::decode_tag(r, field_number, wt)) return false;
335 switch (field_number) {
336 case 1:
337 if (wt != protobuf_wire::wire_type::length_delimited) return false;
338 if (!r.read_bytes(out.trace_id)) return false;
339 break;
340 case 2:
341 if (wt != protobuf_wire::wire_type::length_delimited) return false;
342 if (!r.read_bytes(out.span_id)) return false;
343 break;
344 case 3:
345 if (wt != protobuf_wire::wire_type::length_delimited) return false;
346 if (!r.read_string(out.operation_name)) return false;
347 break;
348 case 4: {
349 if (wt != protobuf_wire::wire_type::length_delimited) return false;
350 const std::uint8_t* ptr; std::size_t len;
351 if (!r.read_length_delimited(&ptr, &len)) return false;
352 span_ref ref;
353 if (!decode_span_ref(ptr, len, ref)) return false;
354 out.references.push_back(std::move(ref));
355 break;
356 }
357 case 5: {
358 if (wt != protobuf_wire::wire_type::varint) return false;
359 auto v = r.read_varint();
360 if (!v) return false;
361 out.flags = static_cast<std::uint32_t>(*v);
362 break;
363 }
364 case 6: {
365 if (wt != protobuf_wire::wire_type::length_delimited) return false;
366 const std::uint8_t* ptr; std::size_t len;
367 if (!r.read_length_delimited(&ptr, &len)) return false;
368 if (!decode_timestamp(ptr, len,
370 out.start_time_nanos))
371 return false;
372 break;
373 }
374 case 7: {
375 if (wt != protobuf_wire::wire_type::length_delimited) return false;
376 const std::uint8_t* ptr; std::size_t len;
377 if (!r.read_length_delimited(&ptr, &len)) return false;
378 if (!decode_timestamp(ptr, len,
380 out.duration_nanos))
381 return false;
382 break;
383 }
384 case 8: {
385 if (wt != protobuf_wire::wire_type::length_delimited) return false;
386 const std::uint8_t* ptr; std::size_t len;
387 if (!r.read_length_delimited(&ptr, &len)) return false;
388 key_value kv;
389 if (!decode_key_value(ptr, len, kv)) return false;
390 out.tags.push_back(std::move(kv));
391 break;
392 }
393 case 10: {
394 if (wt != protobuf_wire::wire_type::length_delimited) return false;
395 const std::uint8_t* ptr; std::size_t len;
396 if (!r.read_length_delimited(&ptr, &len)) return false;
397 if (!decode_process(ptr, len, out.proc)) return false;
398 break;
399 }
400 default:
401 if (!r.skip_field(wt)) return false;
402 }
403 }
404 return true;
405}
bool decode_span_ref(const std::uint8_t *data, std::size_t size, span_ref &out)
bool decode_process(const std::uint8_t *data, std::size_t size, process &out)
std::vector< span_ref > references
std::vector< std::uint8_t > trace_id
std::vector< std::uint8_t > span_id

References decode_key_value(), decode_process(), decode_span_ref(), kcenon::monitoring::protobuf_wire::decode_tag(), decode_timestamp(), kcenon::monitoring::jaeger_proto::span::duration_nanos, kcenon::monitoring::jaeger_proto::span::duration_seconds, kcenon::monitoring::protobuf_wire::reader::eof(), kcenon::monitoring::jaeger_proto::span::flags, kcenon::monitoring::protobuf_wire::length_delimited, kcenon::monitoring::jaeger_proto::span::operation_name, kcenon::monitoring::jaeger_proto::span::proc, kcenon::monitoring::protobuf_wire::reader::read_bytes(), kcenon::monitoring::protobuf_wire::reader::read_length_delimited(), kcenon::monitoring::protobuf_wire::reader::read_string(), kcenon::monitoring::protobuf_wire::reader::read_varint(), kcenon::monitoring::jaeger_proto::span::references, kcenon::monitoring::protobuf_wire::reader::skip_field(), kcenon::monitoring::jaeger_proto::span::span_id, kcenon::monitoring::jaeger_proto::span::start_time_nanos, kcenon::monitoring::jaeger_proto::span::start_time_seconds, kcenon::monitoring::jaeger_proto::span::tags, kcenon::monitoring::jaeger_proto::span::trace_id, and kcenon::monitoring::protobuf_wire::varint.

Referenced by decode_batch(), TEST_F(), and TEST_F().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_span_ref()

bool kcenon::monitoring::jaeger_proto::decode_span_ref ( const std::uint8_t * data,
std::size_t size,
span_ref & out )
inline

Definition at line 298 of file jaeger_proto.h.

299 {
300 protobuf_wire::reader r(data, size);
301 while (!r.eof()) {
302 std::uint32_t field_number;
304 if (!protobuf_wire::decode_tag(r, field_number, wt)) return false;
305 switch (field_number) {
306 case 1:
307 if (wt != protobuf_wire::wire_type::length_delimited) return false;
308 if (!r.read_bytes(out.trace_id)) return false;
309 break;
310 case 2:
311 if (wt != protobuf_wire::wire_type::length_delimited) return false;
312 if (!r.read_bytes(out.span_id)) return false;
313 break;
314 case 3: {
315 if (wt != protobuf_wire::wire_type::varint) return false;
316 auto v = r.read_varint();
317 if (!v) return false;
318 out.ref_type = static_cast<std::int32_t>(*v);
319 break;
320 }
321 default:
322 if (!r.skip_field(wt)) return false;
323 }
324 }
325 return true;
326}
std::vector< std::uint8_t > trace_id
std::vector< std::uint8_t > span_id

References kcenon::monitoring::protobuf_wire::decode_tag(), kcenon::monitoring::protobuf_wire::reader::eof(), kcenon::monitoring::protobuf_wire::length_delimited, kcenon::monitoring::protobuf_wire::reader::read_bytes(), kcenon::monitoring::protobuf_wire::reader::read_varint(), kcenon::monitoring::jaeger_proto::span_ref::ref_type, kcenon::monitoring::protobuf_wire::reader::skip_field(), kcenon::monitoring::jaeger_proto::span_ref::span_id, kcenon::monitoring::jaeger_proto::span_ref::trace_id, and kcenon::monitoring::protobuf_wire::varint.

Referenced by decode_span().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_timestamp()

bool kcenon::monitoring::jaeger_proto::decode_timestamp ( const std::uint8_t * data,
std::size_t size,
std::int64_t & seconds,
std::int32_t & nanos )
inline

Definition at line 278 of file jaeger_proto.h.

279 {
280 protobuf_wire::reader r(data, size);
281 seconds = 0; nanos = 0;
282 while (!r.eof()) {
283 std::uint32_t field_number;
285 if (!protobuf_wire::decode_tag(r, field_number, wt)) return false;
286 if (wt != protobuf_wire::wire_type::varint) {
287 if (!r.skip_field(wt)) return false;
288 continue;
289 }
290 auto v = r.read_varint();
291 if (!v) return false;
292 if (field_number == 1) seconds = static_cast<std::int64_t>(*v);
293 else if (field_number == 2) nanos = static_cast<std::int32_t>(*v);
294 }
295 return true;
296}

References kcenon::monitoring::protobuf_wire::decode_tag(), kcenon::monitoring::protobuf_wire::reader::eof(), kcenon::monitoring::protobuf_wire::reader::read_varint(), kcenon::monitoring::protobuf_wire::reader::skip_field(), and kcenon::monitoring::protobuf_wire::varint.

Referenced by decode_span().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_batch()

std::vector< std::uint8_t > kcenon::monitoring::jaeger_proto::encode_batch ( const batch & b)
inline

Definition at line 177 of file jaeger_proto.h.

177 {
178 std::vector<std::uint8_t> out;
179 for (const auto& s : b.spans) {
180 auto serialized = encode_span(s);
181 protobuf_wire::encode_message_field(out, 1, serialized);
182 }
183 if (b.has_process) {
184 auto serialized = encode_process(b.proc);
185 protobuf_wire::encode_message_field(out, 2, serialized);
186 }
187 return out;
188}
std::vector< std::uint8_t > encode_span(const span &s)

References kcenon::monitoring::protobuf_wire::encode_message_field(), encode_process(), encode_span(), kcenon::monitoring::jaeger_proto::batch::has_process, kcenon::monitoring::jaeger_proto::batch::proc, and kcenon::monitoring::jaeger_proto::batch::spans.

Referenced by kcenon::monitoring::encode_jaeger_batch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_duration()

std::vector< std::uint8_t > kcenon::monitoring::jaeger_proto::encode_duration ( std::int64_t seconds,
std::int32_t nanos )
inline

Definition at line 100 of file jaeger_proto.h.

101 {
102 std::vector<std::uint8_t> out;
103 protobuf_wire::encode_uint64_field(out, 1, static_cast<std::uint64_t>(seconds));
104 protobuf_wire::encode_uint64_field(out, 2, static_cast<std::uint64_t>(nanos));
105 return out;
106}

References kcenon::monitoring::protobuf_wire::encode_uint64_field().

Referenced by encode_span().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_key_value()

std::vector< std::uint8_t > kcenon::monitoring::jaeger_proto::encode_key_value ( const key_value & kv)
inline

Definition at line 108 of file jaeger_proto.h.

108 {
109 std::vector<std::uint8_t> out;
110 protobuf_wire::encode_string_field(out, 1, kv.key);
111 protobuf_wire::encode_enum_field(out, 2, static_cast<std::int32_t>(kv.v_type));
112 protobuf_wire::encode_string_field(out, 3, kv.v_str);
113 protobuf_wire::encode_bool_field(out, 4, kv.v_bool);
114 if (kv.v_int64 != 0) {
115 protobuf_wire::encode_tag(out, 5, protobuf_wire::wire_type::varint);
116 protobuf_wire::encode_varint(out, static_cast<std::uint64_t>(kv.v_int64));
117 }
118 if (kv.v_float64 != 0.0) {
119 std::uint64_t bits;
120 static_assert(sizeof(bits) == sizeof(kv.v_float64),
121 "double must be 64 bits");
122 std::memcpy(&bits, &kv.v_float64, sizeof(bits));
123 protobuf_wire::encode_tag(out, 6, protobuf_wire::wire_type::fixed64);
124 protobuf_wire::encode_fixed64(out, bits);
125 }
126 protobuf_wire::encode_bytes_field(out, 7, kv.v_binary);
127 return out;
128}

References kcenon::monitoring::protobuf_wire::encode_bool_field(), kcenon::monitoring::protobuf_wire::encode_bytes_field(), kcenon::monitoring::protobuf_wire::encode_enum_field(), kcenon::monitoring::protobuf_wire::encode_fixed64(), kcenon::monitoring::protobuf_wire::encode_string_field(), kcenon::monitoring::protobuf_wire::encode_tag(), kcenon::monitoring::protobuf_wire::encode_varint(), kcenon::monitoring::protobuf_wire::fixed64, kcenon::monitoring::jaeger_proto::key_value::key, kcenon::monitoring::jaeger_proto::key_value::v_binary, kcenon::monitoring::jaeger_proto::key_value::v_bool, kcenon::monitoring::jaeger_proto::key_value::v_float64, kcenon::monitoring::jaeger_proto::key_value::v_int64, kcenon::monitoring::jaeger_proto::key_value::v_str, kcenon::monitoring::jaeger_proto::key_value::v_type, and kcenon::monitoring::protobuf_wire::varint.

Referenced by encode_process(), and encode_span().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_process()

std::vector< std::uint8_t > kcenon::monitoring::jaeger_proto::encode_process ( const process & p)
inline

Definition at line 130 of file jaeger_proto.h.

130 {
131 std::vector<std::uint8_t> out;
132 protobuf_wire::encode_string_field(out, 1, p.service_name);
133 for (const auto& tag : p.tags) {
134 auto serialized = encode_key_value(tag);
135 protobuf_wire::encode_message_field(out, 2, serialized);
136 }
137 return out;
138}
std::vector< std::uint8_t > encode_key_value(const key_value &kv)

References encode_key_value(), kcenon::monitoring::protobuf_wire::encode_message_field(), kcenon::monitoring::protobuf_wire::encode_string_field(), kcenon::monitoring::jaeger_proto::process::service_name, and kcenon::monitoring::jaeger_proto::process::tags.

Referenced by encode_batch(), and encode_span().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_span()

std::vector< std::uint8_t > kcenon::monitoring::jaeger_proto::encode_span ( const span & s)
inline

Definition at line 148 of file jaeger_proto.h.

148 {
149 std::vector<std::uint8_t> out;
150 protobuf_wire::encode_bytes_field(out, 1, s.trace_id);
151 protobuf_wire::encode_bytes_field(out, 2, s.span_id);
152 protobuf_wire::encode_string_field(out, 3, s.operation_name);
153 for (const auto& ref : s.references) {
154 auto serialized = encode_span_ref(ref);
155 protobuf_wire::encode_message_field(out, 4, serialized);
156 }
157 protobuf_wire::encode_uint64_field(out, 5, s.flags);
158 if (s.start_time_seconds != 0 || s.start_time_nanos != 0) {
159 auto ts = encode_timestamp(s.start_time_seconds, s.start_time_nanos);
160 protobuf_wire::encode_message_field(out, 6, ts);
161 }
162 if (s.duration_seconds != 0 || s.duration_nanos != 0) {
163 auto du = encode_duration(s.duration_seconds, s.duration_nanos);
164 protobuf_wire::encode_message_field(out, 7, du);
165 }
166 for (const auto& tag : s.tags) {
167 auto serialized = encode_key_value(tag);
168 protobuf_wire::encode_message_field(out, 8, serialized);
169 }
170 if (!s.proc.service_name.empty() || !s.proc.tags.empty()) {
171 auto serialized = encode_process(s.proc);
172 protobuf_wire::encode_message_field(out, 10, serialized);
173 }
174 return out;
175}
std::vector< std::uint8_t > encode_process(const process &p)
std::vector< std::uint8_t > encode_span_ref(const span_ref &ref)

References kcenon::monitoring::jaeger_proto::span::duration_nanos, kcenon::monitoring::jaeger_proto::span::duration_seconds, kcenon::monitoring::protobuf_wire::encode_bytes_field(), encode_duration(), encode_key_value(), kcenon::monitoring::protobuf_wire::encode_message_field(), encode_process(), encode_span_ref(), kcenon::monitoring::protobuf_wire::encode_string_field(), encode_timestamp(), kcenon::monitoring::protobuf_wire::encode_uint64_field(), kcenon::monitoring::jaeger_proto::span::flags, kcenon::monitoring::jaeger_proto::span::operation_name, kcenon::monitoring::jaeger_proto::span::proc, kcenon::monitoring::jaeger_proto::span::references, kcenon::monitoring::jaeger_proto::process::service_name, kcenon::monitoring::jaeger_proto::span::span_id, kcenon::monitoring::jaeger_proto::span::start_time_nanos, kcenon::monitoring::jaeger_proto::span::start_time_seconds, kcenon::monitoring::jaeger_proto::process::tags, kcenon::monitoring::jaeger_proto::span::tags, and kcenon::monitoring::jaeger_proto::span::trace_id.

Referenced by encode_batch(), and kcenon::monitoring::jaeger_span_data::to_protobuf().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_span_ref()

std::vector< std::uint8_t > kcenon::monitoring::jaeger_proto::encode_span_ref ( const span_ref & ref)
inline

Definition at line 140 of file jaeger_proto.h.

140 {
141 std::vector<std::uint8_t> out;
142 protobuf_wire::encode_bytes_field(out, 1, ref.trace_id);
143 protobuf_wire::encode_bytes_field(out, 2, ref.span_id);
144 protobuf_wire::encode_enum_field(out, 3, ref.ref_type);
145 return out;
146}

References kcenon::monitoring::protobuf_wire::encode_bytes_field(), kcenon::monitoring::protobuf_wire::encode_enum_field(), kcenon::monitoring::jaeger_proto::span_ref::ref_type, kcenon::monitoring::jaeger_proto::span_ref::span_id, and kcenon::monitoring::jaeger_proto::span_ref::trace_id.

Referenced by encode_span().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode_timestamp()

std::vector< std::uint8_t > kcenon::monitoring::jaeger_proto::encode_timestamp ( std::int64_t seconds,
std::int32_t nanos )
inline

Definition at line 92 of file jaeger_proto.h.

93 {
94 std::vector<std::uint8_t> out;
95 protobuf_wire::encode_uint64_field(out, 1, static_cast<std::uint64_t>(seconds));
96 protobuf_wire::encode_uint64_field(out, 2, static_cast<std::uint64_t>(nanos));
97 return out;
98}

References kcenon::monitoring::protobuf_wire::encode_uint64_field().

Referenced by encode_span().

Here is the call graph for this function:
Here is the caller graph for this function: