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

Remove special handling of 404/301 from JDK HTTP client instrumentation #5838

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

izeye
Copy link
Contributor

@izeye izeye commented Jan 29, 2025

This PR removes special handling of 404/301 from JDK HTTP client instrumentation.

See gh-5812

Comment on lines 56 to 58
String getUri(HttpRequest request, @Nullable HttpResponse<?> httpResponse,
Function<HttpRequest, String> uriMapper) {
return httpResponse != null && (httpResponse.statusCode() == 404 || httpResponse.statusCode() == 301)
? "NOT_FOUND" : uriMapper.apply(request);
return uriMapper.apply(request);
Copy link
Contributor

@big-cir big-cir Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@izeye
How about removing the unused @Nullable HttpResponse<?> httpResponse parameter as it's not utilized in the method?
Is there a reason you didn't remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@big-cir Thanks!

I fixed it in 9d25b5e.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@izeye
thanks :)

Signed-off-by: Johnny Lim <[email protected]>
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.

2 participants