/** * Creates a new {@code SpanContext} with the given identifiers and options. * * @param traceId the trace identifier of the span context. * @param spanId the span identifier of the span context. * @param traceOptions the trace options for the span context. * @return a new {@code SpanContext} with the given identifiers and options. */ public static SpanContext create(TraceId traceId, SpanId spanId, TraceOptions traceOptions) { return new SpanContext(traceId, spanId, traceOptions); }
/** * Creates a new {@code SpanContext} with the given identifiers and options. * * @param traceId the trace identifier of the span context. * @param spanId the span identifier of the span context. * @param traceOptions the trace options for the span context. * @param tracestate the trace state for the span context. * @return a new {@code SpanContext} with the given identifiers and options. * @since 0.16 */ public static SpanContext create( TraceId traceId, SpanId spanId, TraceOptions traceOptions, Tracestate tracestate) { return new SpanContext(traceId, spanId, traceOptions, tracestate); }