Package io.opentelemetry.sdk.logs.data
Interface Body
-
- All Known Implementing Classes:
AutoValue_StringBody,EmptyBody,StringBody
@Immutable @Deprecated public interface BodyDeprecated.UseLogRecordData.getBodyValue()andValue.This represents all the possible values for a log message body. ABodycan 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 classBody.TypeDeprecated.UseValue.getType().
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.StringasString()Deprecated.Returns the String value of thisBody.static Bodyempty()Deprecated.Return an emptyBody.Body.TypegetType()Deprecated.UseValue.getType().static Bodystring(java.lang.String stringValue)Deprecated.Returns anBodywith a string value.
-
-
-
Method Detail
-
string
static Body string(java.lang.String stringValue)
Deprecated.Returns anBodywith a string value.- Parameters:
stringValue- The new value.- Returns:
- a
Bodywith a string value.
-
empty
static Body empty()
Deprecated.Return an emptyBody.- Returns:
- a
Bodywithout a value.
-
asString
java.lang.String asString()
Deprecated.Returns the String value of thisBody.If the log record body is some
ValueTypeother thanValueType.STRING, this returnsValue.asString(). Consumers should useLogRecordData.getBodyValue()instead.
-
getType
@Deprecated Body.Type getType()
Deprecated.UseValue.getType().Returns the type of theBody.
-
-