Package io.opentelemetry.sdk.logs.data
Interface Body
-
- All Known Implementing Classes:
AutoValue_StringBody
,EmptyBody
,StringBody
@Immutable @Deprecated public interface Body
Deprecated.UseLogRecordData.getBodyValue()
andValue
.This represents all the possible values for a log message body. ABody
can currently only have 1 type of values:String
, represented throughBody.Type
. This class will likely be extended in the future to include additional body types supported by the OpenTelemetry log data model.- Since:
- 1.27.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Body.Type
Deprecated.UseValue.getType()
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.String
asString()
Deprecated.Returns the String value of thisBody
.static Body
empty()
Deprecated.Return an emptyBody
.Body.Type
getType()
Deprecated.UseValue.getType()
.static Body
string(java.lang.String stringValue)
Deprecated.Returns anBody
with a string value.
-
-
-
Method Detail
-
string
static Body string(java.lang.String stringValue)
Deprecated.Returns anBody
with a string value.- Parameters:
stringValue
- The new value.- Returns:
- a
Body
with a string value.
-
empty
static Body empty()
Deprecated.Return an emptyBody
.- Returns:
- a
Body
without a value.
-
asString
java.lang.String asString()
Deprecated.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.
-
getType
@Deprecated Body.Type getType()
Deprecated.UseValue.getType()
.Returns the type of theBody
.
-
-