Class LowAllocationTraceRequestMarshaler
java.lang.Object
io.opentelemetry.exporter.internal.marshal.Marshaler
io.opentelemetry.exporter.internal.otlp.traces.LowAllocationTraceRequestMarshaler
Marshaler to convert SDK SpanData to OTLP ExportTraceServiceRequest. See TraceRequestMarshaler.
Example usage:
void marshal(LowAllocationTraceRequestMarshaler requestMarshaler, OutputStream output,
List<SpanData> spanList) throws IOException {
requestMarshaler.initialize(spanList);
try {
requestMarshaler.writeBinaryTo(output);
} finally {
requestMarshaler.reset();
}
}
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of bytes this Marshaler will write in proto binary format.voidinitialize(Collection<SpanData> spanDataList) voidreset()voidwriteTo(Serializer output) Methods inherited from class Marshaler
writeBinaryTo, writeJsonTo, writeJsonTo, writeJsonWithNewline
-
Constructor Details
-
LowAllocationTraceRequestMarshaler
public LowAllocationTraceRequestMarshaler()
-
-
Method Details
-
initialize
-
reset
public void reset() -
getBinarySerializedSize
public int getBinarySerializedSize()Description copied from class:MarshalerReturns the number of bytes this Marshaler will write in proto binary format.- Specified by:
getBinarySerializedSizein classMarshaler
-
writeTo
- Specified by:
writeToin classMarshaler- Throws:
IOException
-