001package io.prometheus.client.exemplars.tracer.common; 002 003public interface SpanContextSupplier { 004 005 /** 006 * @return the current trace id, or {@code null} if this call is not happening within a span context. 007 */ 008 String getTraceId(); 009 010 /** 011 * @return the current span id, or {@code null} if this call is not happening within a span context. 012 */ 013 String getSpanId(); 014 015 /** 016 * @return the state of the current Span. If this value is false a component before in the chain take the decision to not record it. Subsequent calling service have 017 * to respect this value in order not to have partial TraceID with only some Span in it. This value is important to be sure to choose a recorded Trace in Examplar 018 * sampling process 019 */ 020 boolean isSampled(); 021}