-
Notifications
You must be signed in to change notification settings - Fork 879
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 attrs from http client attributes extractor #4210
Remove attrs from http client attributes extractor #4210
Conversation
@@ -23,23 +23,6 @@ protected String url(ApacheHttpClientRequest request) { | |||
return request.getUrl(); | |||
} | |||
|
|||
@Override | |||
protected String target(ApacheHttpClientRequest request) { | |||
return request.getTarget(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove these method from ApacheHttpClientRequest
too? They should all be unused now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(also applies to other Apache HTTP instrumentations)
StringBuilder result = new StringBuilder(); | ||
String path = httpRequest.getUri().getPath(); | ||
if (path != null) { | ||
result.append(path); | ||
} | ||
String query = httpRequest.getUri().getQuery(); | ||
if (query != null) { | ||
result.append('?'); | ||
result.append(query); | ||
} | ||
String fragment = httpRequest.getUri().getFragment(); | ||
if (fragment != null) { | ||
result.append('#'); | ||
result.append(fragment); | ||
} | ||
return result.length() > 0 ? result.toString() : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
…ttp-client-attributes-extractor
follow-up to #4195