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

Optimize tomcat uri construction #4008

Merged
merged 3 commits into from
Aug 30, 2021
Merged

Optimize tomcat uri construction #4008

merged 3 commits into from
Aug 30, 2021

Conversation

trask
Copy link
Member

@trask trask commented Aug 28, 2021

Part of #3699

At least until we resolve #3700

(this particular one is showing up in my benchmarks)

@trask trask marked this pull request as ready for review August 29, 2021 02:48
length += 1 + query.length();
}

StringBuilder url = new StringBuilder(length);
Copy link
Contributor

Choose a reason for hiding this comment

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

I initially thought that as this does not encode any characters it could result in an invalid url (would that actually matter?), but javadoc for HttpServletRequest.getQueryString states that "The value is not decoded by the container" and the same for getRequestURI so as far as I understand this looks good.

Copy link
Member Author

Choose a reason for hiding this comment

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

good point, I added a TODO to this method to investigate and document encoding requirement

@trask trask merged commit 0f9308b into open-telemetry:main Aug 30, 2021
@trask trask deleted the optimize-tomcat-uri-construction branch August 30, 2021 20:34
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.

Don't capture http.scheme, http.host and http.target if already capturing http.url
4 participants