Package io.opentelemetry.sdk.logs.data
Interface Body
- All Known Implementing Classes:
AutoValue_StringBody
,EmptyBody
,StringBody
Deprecated.
This represents all the possible values for a log message body. A
Body
can currently only
have 1 type of values: String
, represented through Body.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 -
Method Summary
-
Method Details
-
string
Deprecated.Returns anBody
with a string value.- Parameters:
stringValue
- The new value.- Returns:
- a
Body
with a string value.
-
empty
Deprecated.Return an emptyBody
.- Returns:
- a
Body
without a value.
-
asString
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.UseValue.getType()
.Returns the type of theBody
.
-
LogRecordData.getBodyValue()
andValue
.