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 int
calculateSize
(byte[] keyUtf8, Marshaler value) private static KeyValueMarshaler
create
(AttributeKey<?> attributeKey, Object value) static KeyValueMarshaler[]
createForAttributes
(Attributes attributes) Returns Marshalers for the given Attributes.static KeyValueMarshaler
createForKeyValue
(KeyValue keyValue) Returns Marshaler for the given KeyValue.void
writeTo
(Serializer output) Methods inherited from class io.opentelemetry.exporter.internal.marshal.MarshalerWithSize
getBinarySerializedSize
Methods inherited from class io.opentelemetry.exporter.internal.marshal.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:
writeTo
in classMarshaler
- Throws:
IOException
-
calculateSize
-