/** * Use this to create a span for processing the given record. Note: the result has no name and is * not started. * * <p>This creates a child from identifiers extracted from the record headers, or a new span if * one couldn't be extracted. */ public Span nextSpan(ConsumerRecord<?, ?> record) { TraceContextOrSamplingFlags extracted = extractAndClearHeaders(record.headers()); Span result = tracing.tracer().nextSpan(extracted); if (extracted.context() == null && !result.isNoop()) { addTags(record, result); } return result; }
/** * Use this to create a span for processing the given record. Note: the result has no name and is * not started. * * <p>This creates a child from identifiers extracted from the record headers, or a new span if * one couldn't be extracted. */ public Span nextSpan(ConsumerRecord<?, ?> record) { TraceContextOrSamplingFlags extracted = extractAndClearHeaders(record.headers()); Span result = tracing.tracer().nextSpan(extracted); if (extracted.context() == null && !result.isNoop()) { addTags(record, result); } return result; }