OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation.Serializer.SerializationBuffer
Manages the buffer used to serialize a single OTLP export request. The buffer
is sized from the previous export's serialized length (to avoid resizing without
preserving excess capacity) and is sourced via ProtobufSerializer
from an array pool, the shared pool unless one is supplied.
namespace OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation.Serializer
{
internal sealed class SerializationBuffer
{
public SerializationBuffer(int initialSize, ArrayPool<byte> pool = null);
public byte[] Rent();
public void Return(byte[] buffer, int serializedLength, int dirtyLength);
public void Release();
public void Discard(byte[] buffer);
}
}