Class Serializer

java.lang.Object
io.opentelemetry.exporter.internal.marshal.Serializer
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
JsonSerializer, ProtoSerializer

public abstract class Serializer extends Object implements AutoCloseable
Serializer to use when converting from an SDK data object into a protobuf output format. Unlike CodedOutputStream, which strictly encodes data into the protobuf binary format, this
  • Handles proto3 semantics of not outputting the value when it matches the default of a field
  • Can be implemented to serialize into protobuf JSON format (not binary)

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