RestClient exchange allow the extension of ClientRequestObservationContext #32153
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: declined
A suggestion or change that we don't feel we should currently apply
theme: observability
An issue related to observability and tracing
Hi guys, I'm trying to use
RestClient
together with Micrometer's Observation API,what i'm trying to do is to supply some additional context, the "senderServiceName", that i'd like to exist as a tag in my metrics.
Today, the
internalExchange
looks the following way:As you can see, the observationContext is being composed from the request carrier, and directly sent to the observation.
As the logic of the request creation has its complexity, I've thought of just passing an UnaryOperator which will allow me the take the initialized context, modify it (maybe to an extension of ClientRequestObservationContext) and return the modified version.
Something like:
Should I issue a PR which allows it?
Thanks.
The text was updated successfully, but these errors were encountered: