Skip to content

Deprecate Apache HttpComponents 4.x instrumentation #3932

Closed

Description

@bclozel

Several important issues have been reported against our instrumentation for HttpComponents: a memory leak in #3920 and NPEs in #3797.

This seems to come from the very extension points being used for the instrumentation: the MicrometerHttpClientInterceptor might not be a good fit for instrumentation and according to the library author, a proper instrumentation would require subclassing the HttpClientBuilder and asking all Micrometer users to use it. This is a major breaking change, and a quite invasive one.

With this issue, we should consider whether we should deprecate the instrumentation of the async variant of HttpComponents (it looks like the sync variant, MicrometerHttpRequestExecutor, is not suffering from the same issues). According to the official website:

HttpCore 4.4.x branch is considered stable and production ready. Please note the 4.x release series will be receiving fixes for major defects and security issues only.

Users of HttpCore 4.x are strongly encouraged to migrate to HttpCore 5.x

Inflicting a major breaking change to our users for a library that should be upgraded in the first place seems like a good discussion to have before rushing to implementing fixes.

Note that we'll fix the instrumentation for HttpComponents 5.x in #3800. There, the new ExecChainHandler and AsyncExecChainHandler contracts and the recent introduction of the instrumentation make this choice easier.

Activity

  1. added
    waiting for team
    type: task
    on Jun 23, 2023
  2. added this to the 1.12 backlog milestone on Jun 23, 2023
  3. self-assigned this
    on Jun 23, 2023
  4. cachescrubber commented on Jun 23, 2023

    @cachescrubber
    Contributor

    @bclozel Thanks for your summary of the situation. I second your arguments to deprecate HttpCore 4.x instrumentation.

  5. added
    instrumentation
    and removed
    waiting for team
    on Jun 27, 2023
  6. changed the title [-]Consider dropping HttpComponents 4.x async instrumentation[/-] [+]Deprecate Apache HttpComponents 4.x instrumentation[/+] on Jul 6, 2023
  7. added a commit that references this issue on Feb 5, 2024
    89cacbe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

instrumentationtype: task

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions