FeignContext enriches the headers providing Propagator.Setter<C> as of Request::header which modifies the headers in place as opposed to make an immutable copy.
In our case the underlining Feign Request is coming with the headers immutable. The headers were created with Collections.unmodifiableMap(headers) by an underlining library which rewrites the request.
Upon trying to enrich the header with the trace ids we face java.lang.UnsupportedOperationException.
Did you encounter this issue before, have you consider not changing headers in place and instead to a immutable copy of the Map<String, Collection<String>> headers; object?
FeignContext
enriches the headers providingPropagator.Setter<C>
as ofRequest::header
which modifies the headers in place as opposed to make an immutable copy.In our case the underlining Feign Request is coming with the headers immutable. The headers were created with
Collections.unmodifiableMap(headers)
by an underlining library which rewrites the request.Upon trying to enrich the header with the trace ids we face
java.lang.UnsupportedOperationException
.Did you encounter this issue before, have you consider not changing headers in place and instead to a immutable copy of the
Map<String, Collection<String>> headers;
object?