Line data Source code
1 : #include "source/extensions/tracers/zipkin/span_context.h" 2 : 3 : #include "source/common/common/macros.h" 4 : #include "source/common/common/utility.h" 5 : #include "source/extensions/tracers/zipkin/zipkin_core_constants.h" 6 : 7 : namespace Envoy { 8 : namespace Extensions { 9 : namespace Tracers { 10 : namespace Zipkin { 11 : 12 : SpanContext::SpanContext(const Span& span, bool inner_context) 13 : : trace_id_high_(span.isSetTraceIdHigh() ? span.traceIdHigh() : 0), trace_id_(span.traceId()), 14 : id_(span.id()), parent_id_(span.isSetParentId() ? span.parentId() : 0), 15 0 : sampled_(span.sampled()), inner_context_(inner_context) {} 16 : 17 : } // namespace Zipkin 18 : } // namespace Tracers 19 : } // namespace Extensions 20 : } // namespace Envoy