Package io.opentelemetry.sdk.logs.data
Class StringBody
- java.lang.Object
-
- io.opentelemetry.sdk.logs.data.StringBody
-
- All Implemented Interfaces:
Body
- Direct Known Subclasses:
AutoValue_StringBody
@Immutable abstract class StringBody extends java.lang.Object implements Body
-
-
Constructor Summary
Constructors Constructor Description StringBody()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.String
asString()
Returns the String value of thisBody
.(package private) static Body
create(java.lang.String stringValue)
Body.Type
getType()
Returns the type of theBody
.
-
-
-
Method Detail
-
create
static Body create(java.lang.String stringValue)
-
getType
public final Body.Type getType()
Description copied from interface:Body
Returns the type of theBody
.
-
asString
public abstract java.lang.String asString()
Description copied from interface:Body
Returns the String value of thisBody
.If the log record body is some
ValueType
other thanValueType.STRING
, this returnsValue.asString()
. Consumers should useLogRecordData.getBodyValue()
instead.
-
-