Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Apache HttpComponents Client 5.3.0 #4089

Open
cachescrubber opened this issue Sep 18, 2023 · 8 comments
Open

Upgrade to Apache HttpComponents Client 5.3.0 #4089

cachescrubber opened this issue Sep 18, 2023 · 8 comments
Labels
dependency-upgrade A dependency upgrade enhancement A general enhancement

Comments

@cachescrubber
Copy link
Contributor

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 of httpclient5.

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 of ObservationExecChainHandler 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

@cachescrubber cachescrubber changed the title Apache HttpComponents follow-up Upgrade to Apache HttpComponents Client 5.3.0 Nov 17, 2023
@cachescrubber
Copy link
Contributor Author

cachescrubber commented Nov 17, 2023

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.

@marcingrzejszczak marcingrzejszczak added enhancement A general enhancement dependency-upgrade A dependency upgrade and removed waiting-for-triage labels Dec 28, 2023
@marcingrzejszczak
Copy link
Contributor

Hey @cachescrubber, are you willing to file a PR?

@cachescrubber
Copy link
Contributor Author

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?

@marcingrzejszczak
Copy link
Contributor

Correct on both questions. Target 1.13, and reference instrumentations section :)

@cachescrubber
Copy link
Contributor Author

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.

@marcingrzejszczak
Copy link
Contributor

@shakuzen @jonatan-ivanov I don't remember what was the decision about the deprecation time line, do you?

@jonatan-ivanov
Copy link
Member

jonatan-ivanov commented Feb 7, 2024

fyi: We have 5.3.x in main: #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

@cachescrubber
Copy link
Contributor Author

I finally managed to create the discussed documentation section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency-upgrade A dependency upgrade enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants