Class MetricMarshaler
- java.lang.Object
-
- io.opentelemetry.exporter.internal.marshal.Marshaler
-
- io.opentelemetry.exporter.internal.marshal.MarshalerWithSize
-
- io.opentelemetry.exporter.internal.otlp.metrics.MetricMarshaler
-
final class MetricMarshaler extends MarshalerWithSize
-
-
Field Summary
Fields Modifier and Type Field Description private ProtoFieldInfo
dataField
private Marshaler
dataMarshaler
private byte[]
descriptionUtf8
private byte[]
nameUtf8
private byte[]
unitUtf8
-
Constructor Summary
Constructors Modifier Constructor Description private
MetricMarshaler(byte[] nameUtf8, byte[] descriptionUtf8, byte[] unitUtf8, Marshaler dataMarshaler, ProtoFieldInfo dataField)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static int
calculateSize(byte[] nameUtf8, byte[] descriptionUtf8, byte[] unitUtf8, Marshaler dataMarshaler, ProtoFieldInfo dataField)
(package private) static Marshaler
create(MetricData metric)
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 Detail
-
nameUtf8
private final byte[] nameUtf8
-
descriptionUtf8
private final byte[] descriptionUtf8
-
unitUtf8
private final byte[] unitUtf8
-
dataMarshaler
private final Marshaler dataMarshaler
-
dataField
private final ProtoFieldInfo dataField
-
-
Constructor Detail
-
MetricMarshaler
private MetricMarshaler(byte[] nameUtf8, byte[] descriptionUtf8, byte[] unitUtf8, Marshaler dataMarshaler, ProtoFieldInfo dataField)
-
-
Method Detail
-
create
static Marshaler create(MetricData metric)
-
writeTo
public void writeTo(Serializer output) throws java.io.IOException
-
calculateSize
private static int calculateSize(byte[] nameUtf8, byte[] descriptionUtf8, byte[] unitUtf8, Marshaler dataMarshaler, ProtoFieldInfo dataField)
-
-