Skip to content

Observable FeignContext with immutable Headers #2438

@johnnywiller

Description

@johnnywiller

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    feedback providedFeedback has been provided to the author

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions