rsocket / rsocket-rpc-java

Standard RSocket RPC Java Implementation
http://rsocket.io/
Apache License 2.0
172 stars 41 forks source link

Tracing.mapToByteBuf uses wrong value length for writing to byteBuf #74

Open creiterer opened 3 years ago

creiterer commented 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