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

Simplify HttpUrlConnection instrumentation #5673

Merged
merged 1 commit into from
Mar 23, 2022

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Mar 23, 2022

Simplify stack overflow prevention, also avoids Calling end() on an ended Span in debug log.

@laurit laurit requested a review from a team March 23, 2022 10:09
Comment on lines +113 to +116
// prevent infinite recursion in case end() captures response headers due to
// HttpUrlConnection.getHeaderField() calling HttpUrlConnection.getInputStream() which then
// enters this advice again
callDepth.getAndIncrement();
Copy link
Member

Choose a reason for hiding this comment

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

much nicer 👍

@trask trask merged commit 875b7fe into open-telemetry:main Mar 23, 2022
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
@laurit laurit deleted the simplify-http-url-connection branch July 6, 2023 17:47
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