Closed cachescrubber closed 3 weeks ago
I renamed the issue to Upgrade to Apache HttpComponents Client 5.3.0. The release is scheduled for the coming weeks, obviously too late for 1.12.0.
Hey @cachescrubber, are you willing to file a PR?
Hi @marcingrzejszczak I can file a PR.
Ideally I could create a Section on Apache HttpComponents instrumentation in the Reference Instrumentations section of the documentation. Would that be feasible?
Target version would be 1.13, right?
Correct on both questions. Target 1.13, and reference instrumentations section :)
Ok, fine. One more question - I there a timeline for removal of the deprecated http-client 4 supports and the initial Interceptor / requestExecutor? The deprecations are not marked forRemoval and no further information is given in the javadoc.
@shakuzen @jonatan-ivanov I don't remember what was the decision about the deprecation time line, do you?
fyi: We have 5.3.x
in main
: https://github.com/micrometer-metrics/micrometer/pull/4470.
I'm not sure we do have such a deprecation timeline.
I would say we should keep the 4.x support as long as 4.x is supported by Apache (assuming Micrometer users use it). The last release of 4.x was back in 2022 November though from their status page, it seems the version is still supported: https://hc.apache.org/status.html
I finally managed to create the discussed documentation section.
As pointed out by @jonatan-ivanov, we've already upgraded to Apache HC 5.3 in Micrometer 1.13. I'm closing this. Let me know if I've missed something and there is more to do.
All good, issue should have been closed with #4860
Apache HttpComponents follow-up.
This is a follow-up to the changes made to the HttpComponents instrumentation in #3800 and #3941, specially to the latter. To solve the issues left I filed HTTPCLIENT-2291 and asked for clarification of the documentation in regard to the exec chain behavior in case of retries. The javadoc for
(Async)ExecChainHandler
has been updated in this pr. Both changes are scheduled with the release 5.3.0 ofhttpclient5
.With the changes in 5.3.0 the
ObservationExecChainHandler
could be safely positioned before or after the retry exec chain element. Async or classic exec chain behavior would be identical. In micrometer, only the javadoc ofObservationExecChainHandler
had to be adjusted accordingly, the current implementation would be just fine.As an opinionated version of the instrumentation I would recommend to document the following:
meter request as a whole, without individual retries
addExecInterceptorFirst("micrometer", new ObservationExecChainHandler(observationRegistry));
meter retries individually
addExecInterceptorAfter(ChainElement.RETRY.name(), "micrometer", new ObservationExecChainHandler(observationRegistry));
I don't know exactly when httpclient5 5.3.0 will be released, but IMO it will be rather short term. So with a bit of luck it might be picked up by micrometer 1.12.0.
@bclozel FYI