You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OTLP protobuf marshalers maintain a bunch of state as they transform SpanData, MetricData, LogRecordData to an intermediate representation before serializing. We should investigate whether we can eliminate this state to produce zero allocation marshalers.
Protocol Buffers forces you to know the size of an embedded message before you write its binary encoding.
This means you must:
Encode the embedded message to a temporary buffer
Grab the length of the buffer
Write the size of the buffer
Write the buffer (encoding of the message).
The intermediate classes' primary goal (i.e., Marshaler*) is to contain the size for each. Another goal is mapping the protobuf schema since the schema and the MetricData are not entirely 1:1 mapping.
I spent two days and had yet to do the serialization in a streaming fashion; hence, the only way out I saw was the reusable objects and object pooling. A very rough idea is at #6171.
The OTLP protobuf marshalers maintain a bunch of state as they transform
SpanData
,MetricData
,LogRecordData
to an intermediate representation before serializing. We should investigate whether we can eliminate this state to produce zero allocation marshalers.Discussed in #5105 and in discussion #5724.
The text was updated successfully, but these errors were encountered: