// https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html#api-segmentdocuments-fields
absl::StrCat(XRaySerializationVersion, "-", Hex::uint32ToHex(epoch), "-", uuid.substr(0, 24));
// X-Ray expects timestamps to be in epoch seconds with milli/micro-second precision as a fraction
s.set_start_time(time_point_cast<SecondsWithFraction>(startTime()).time_since_epoch().count());
void Span::injectContext(Tracing::TraceContext& trace_context, const Tracing::UpstreamContext&) {
Tracing::SpanPtr Span::spawnChild(const Tracing::Config& config, const std::string& operation_name,
Tracing::SpanPtr Tracer::startSpan(const Tracing::Config& config, const std::string& operation_name,
// Even though we have a TimeSource member in the tracer, we assume the start_time argument has a
XRay::SpanPtr Tracer::createNonSampledSpan(const absl::optional<XRayHeader>& xray_header) const {
// https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html#api-segmentdocuments-http
addToHttpResponseAnnotations(Tracing::Tags::get().Status, ValueUtil::numberValue(status_code));