java.lang.Object
io.opentelemetry.exporter.internal.marshal.Marshaler
Direct Known Subclasses:
LowAllocationLogsRequestMarshaler, LowAllocationMetricsRequestMarshaler, LowAllocationTraceRequestMarshaler, MarshalerWithSize

public abstract class Marshaler extends Object
Marshaler from an SDK structure to protobuf wire format.

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

  • Constructor Details

    • Marshaler

      public Marshaler()
  • Method Details

    • writeBinaryTo

      public final void writeBinaryTo(OutputStream output) throws IOException
      Marshals into the OutputStream in proto binary format.
      Throws:
      IOException
    • writeJsonTo

      public final void writeJsonTo(OutputStream output) throws IOException
      Marshals into the OutputStream in proto JSON format.
      Throws:
      IOException
    • writeJsonTo

      public final void writeJsonTo(com.fasterxml.jackson.core.JsonGenerator output) throws IOException
      Marshals into the JsonGenerator in proto JSON format.
      Throws:
      IOException
    • writeJsonWithNewline

      public final void writeJsonWithNewline(com.fasterxml.jackson.core.JsonGenerator output) throws IOException
      Marshals into the JsonGenerator in proto JSON format and adds a newline.
      Throws:
      IOException
    • getBinarySerializedSize

      public abstract int getBinarySerializedSize()
      Returns the number of bytes this Marshaler will write in proto binary format.
    • writeTo

      protected abstract void writeTo(Serializer output) throws IOException
      Throws:
      IOException