Package io.opentelemetry.sdk.logs.data
Interface Body
@Immutable
public interface Body
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 ClassesModifier and TypeInterfaceDescriptionstatic enumAn enum that represents all the possible value types for anBody. -
Method Summary
-
Method Details
-
string
Returns anBodywith a string value.- Parameters:
stringValue- The new value.- Returns:
- a
Bodywith a string value.
-
empty
Return an emptyBody.- Returns:
- a
Bodywithout a value.
-
asString
String asString()Returns the String value of thisBody. -
getType
Body.Type getType()Returns the type of theBody.
-