Class KeyValueMarshaler
java.lang.Object
io.opentelemetry.exporter.internal.marshal.Marshaler
io.opentelemetry.exporter.internal.marshal.MarshalerWithSize
io.opentelemetry.exporter.internal.otlp.KeyValueMarshaler
A Marshaler of key value pairs.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]private static final KeyValueMarshaler[]private final byte[]private final Marshaler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcalculateSize(byte[] keyUtf8, Marshaler value) private static KeyValueMarshalercreate(AttributeKey<?> attributeKey, Object value) static KeyValueMarshaler[]createForAttributes(Attributes attributes) Returns Marshalers for the given Attributes.static KeyValueMarshalercreateForKeyValue(KeyValue keyValue) Returns Marshaler for the given KeyValue.voidwriteTo(Serializer output) Methods inherited from class MarshalerWithSize
getBinarySerializedSizeMethods inherited from class Marshaler
writeBinaryTo, writeJsonTo, writeJsonTo, writeJsonWithNewline
-
Field Details
-
EMPTY_BYTES
private static final byte[] EMPTY_BYTES -
EMPTY_REPEATED
-
keyUtf8
private final byte[] keyUtf8 -
value
-
-
Constructor Details
-
KeyValueMarshaler
-
-
Method Details
-
createForKeyValue
Returns Marshaler for the given KeyValue. -
createForAttributes
Returns Marshalers for the given Attributes. -
create
-
writeTo
- Specified by:
writeToin classMarshaler- Throws:
IOException
-
calculateSize
-