Open creiterer opened 3 years ago
Encoding the baggage items of a span context using DefaultMetadataEncoder.encode() can lead to an error if the baggage items are too huge to fit in the default buffer capacity (which seems to be 256). The problem is that Tracing.mapToByteBuf uses keyLength instead of valueLength for writing value to byteBuf: https://github.com/rsocket/rsocket-rpc-java/blob/c3c47723ad85af9c7ba2edbf27494c7f1835a893/rsocket-ipc-core/src/main/java/io/rsocket/ipc/tracing/Tracing.java#L80
DefaultMetadataEncoder.encode()
Tracing.mapToByteBuf
keyLength
valueLength
value
byteBuf
Encoding the baggage items of a span context using
DefaultMetadataEncoder.encode()
can lead to an error if the baggage items are too huge to fit in the default buffer capacity (which seems to be 256). The problem is thatTracing.mapToByteBuf
useskeyLength
instead ofvalueLength
for writingvalue
tobyteBuf
: https://github.com/rsocket/rsocket-rpc-java/blob/c3c47723ad85af9c7ba2edbf27494c7f1835a893/rsocket-ipc-core/src/main/java/io/rsocket/ipc/tracing/Tracing.java#L80