public interface SingleLineValue
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
format(long traceId,
long spanId,
java.lang.Long parentSpanId)
Formats the provided trace information.
|
static java.lang.String |
format(java.lang.String traceIdHex,
java.lang.String spanIdHex,
java.lang.String parentSpanIdHex)
Formats the provided trace information.
|
static java.lang.String |
format(java.lang.String traceIdHex,
java.lang.String spanIdHex,
java.lang.String parentSpanIdHex,
boolean isSampled)
Formats the provided trace information.
|
java.lang.String |
get()
Gets the value.
|
static SingleLineValue |
of(java.lang.String value)
Returns a
SingleLineValue backed by a fixed string. |
void |
set(java.lang.String value)
Sets the value.
|
static SingleLineValue |
to(java.util.function.Consumer<java.lang.String> consumer)
Returns a
SingleLineValue which supports injection. |
@Nullable java.lang.String get()
void set(java.lang.String value)
value - the valuestatic SingleLineValue of(@Nullable java.lang.String value)
SingleLineValue backed by a fixed string.value - string valueSingleLineValuestatic SingleLineValue to(java.util.function.Consumer<java.lang.String> consumer)
SingleLineValue which supports injection.consumer - consumer to call when a value is injectedSingleLineValuestatic java.lang.String format(long traceId,
long spanId,
@Nullable
java.lang.Long parentSpanId)
traceId - the trace ID.spanId - the span ID.parentSpanId - the parent span ID, or null if none available.String.static java.lang.String format(java.lang.String traceIdHex,
java.lang.String spanIdHex,
@Nullable
java.lang.String parentSpanIdHex)
traceIdHex - the trace ID as HEX String.spanIdHex - the span ID as HEX String.parentSpanIdHex - the parent span ID as HEX String, or null if none available.String.static java.lang.String format(java.lang.String traceIdHex,
java.lang.String spanIdHex,
@Nullable
java.lang.String parentSpanIdHex,
boolean isSampled)
traceIdHex - the trace ID as HEX String.spanIdHex - the span ID as HEX String.parentSpanIdHex - the parent span ID as HEX String, or null if none available.isSampled - true if the span is sampled.String.