RestTemplate observation instrumentation has been introduced in #28341 and is using a RequestReplySenderContext for propagating the observation over the wire (tracing). The current implementation starts the observation before the context contains the request information, which makes it impossible to reliably add HTTP headers to the request before the request is sent.

Some client HTTP libraries might perform I/O operations when we create the actual request using the ClientHttpRequestFactory; for example, creating a connection to the origin server or fetching one from the connection pool. While we could include this in the observation measurement, this behavior is not consistent in all client libraries and this instrumentation is really about individual requests at the RestTemplate and we cannot infer behavior of the underlying HTTP client library.