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 attrs from http client attributes extractor #4210

Merged
merged 4 commits into from
Sep 28, 2021
Merged

Remove attrs from http client attributes extractor #4210

merged 4 commits into from
Sep 28, 2021

Conversation

trask
Copy link
Member

@trask trask commented Sep 28, 2021

follow-up to #4195

@trask trask marked this pull request as ready for review September 28, 2021 06:11
@@ -23,23 +23,6 @@ protected String url(ApacheHttpClientRequest request) {
return request.getUrl();
}

@Override
protected String target(ApacheHttpClientRequest request) {
return request.getTarget();
Copy link
Member

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

Copy link
Member

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)

Comment on lines -29 to -44
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;
Copy link
Member

Choose a reason for hiding this comment

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

🚀

@trask trask merged commit 9ea33ed into open-telemetry:main Sep 28, 2021
@trask trask deleted the remove-attrs-from-http-client-attributes-extractor branch September 28, 2021 19:58
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.

3 participants