Interface SingleLineValue
public interface SingleLineValue
Wrapper for supporting injecting and extracting single-string values.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Formats the provided trace information.static String
Formats the provided trace information.static String
Formats the provided trace information.get()
Gets the value.static SingleLineValue
Returns aSingleLineValue
backed by a fixed string.void
Sets the value.static SingleLineValue
Returns aSingleLineValue
which supports injection.
-
Method Details
-
get
Gets the value.- Returns:
- the value
-
set
Sets the value.- Parameters:
value
- the value
-
of
Returns aSingleLineValue
backed by a fixed string.- Parameters:
value
- string value- Returns:
- a read-only
SingleLineValue
-
to
Returns aSingleLineValue
which supports injection.- Parameters:
consumer
- consumer to call when a value is injected- Returns:
- a write-only
SingleLineValue
-
format
Formats the provided trace information.- Parameters:
traceId
- the trace ID.spanId
- the span ID.parentSpanId
- the parent span ID, ornull
if none available.- Returns:
- the formatted trace information as
String
.
-
format
Formats the provided trace information. -
format
static String format(String traceIdHex, String spanIdHex, @Nullable String parentSpanIdHex, boolean isSampled) Formats the provided trace information.
-