Interface SingleLineValue
public interface SingleLineValue
Wrapper for supporting injecting and extracting single-string values.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringFormats the provided trace information.static StringFormats the provided trace information.static StringFormats the provided trace information.get()Gets the value.static SingleLineValueReturns aSingleLineValuebacked by a fixed string.voidSets the value.static SingleLineValueReturns aSingleLineValuewhich supports injection.
-
Method Details
-
get
Gets the value.- Returns:
- the value
-
set
Sets the value.- Parameters:
value- the value
-
of
Returns aSingleLineValuebacked by a fixed string.- Parameters:
value- string value- Returns:
- a read-only
SingleLineValue
-
to
Returns aSingleLineValuewhich 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, ornullif 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.
-