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

Introduce HttpJakartaServletRequestTags #3923

Closed
wants to merge 1 commit into from

Conversation

bclozel
Copy link
Contributor

@bclozel bclozel commented Jun 20, 2023

Prior to this commit, HttpRequestTags would provide Tags for both
javax.* and jakarta.* variants of HttpServletRequest. While the
HttpServletRequestTagsProvider and
HttpJakartaServletRequestTagsProvider are separate interfaces, they
both use HttpRequestTags and import all types exposed on its methods.

It is strongly advised not to import both javax.* and jakarta.*
variants in a typical application and the current arrangement prevents
this best practice.

This commit deprecates Jakarta methods variants in HttpRequestTags and
moves them to HttpJakartaServletRequestTags. This allows a clean
dependency setup for Jakarta apps and a migration path for all in the
meantime.

Closes gh-3804

@bclozel bclozel self-assigned this Jun 23, 2023
Prior to this commit, `HttpRequestTags` would provide Tags for both
"javax.*" and "jakarta.*" variants of `HttpServletRequest`. While the
`HttpServletRequestTagsProvider` and
`HttpJakartaServletRequestTagsProvider` are separate interfaces, they
both use `HttpRequestTags` and import all types exposed on its methods.

It is strongly advised not to import both "javax.*" and "jakarta.*"
variants in a typical application and the current arrangement prevents
this best practice.

This commit deprecates Jakarta methods variants in `HttpRequestTags` and
moves them to `HttpJakartaServletRequestTags`. This allows a clean
dependency setup for Jakarta apps and a migration path for all in the
meantime.

Closes micrometer-metricsgh-3804
@bclozel
Copy link
Contributor Author

bclozel commented Jun 26, 2023

Closed with 70e328f

@bclozel bclozel closed this Jun 26, 2023
@bclozel bclozel deleted the gh-3804 branch June 26, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HttpRequestTags depends on both jakarta and javax Servlet variants
2 participants