You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: instrumentation/http-url-connection/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/HttpUrlConnectionInstrumentation.java
+37-22Lines changed: 37 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,11 @@ public static void methodEnter(
74
74
// top-level HttpURLConnection calls
75
75
return;
76
76
}
77
+
// double increment on first entry is used to prevent infinite recursion in case end()
78
+
// captures response headers due to HttpUrlConnection.getHeaderField() calling
79
+
// HttpUrlConnection.getInputStream() which then enters this advice again
80
+
callDepth.getAndIncrement();
81
+
77
82
ContextparentContext = currentContext();
78
83
if (!instrumenter().shouldStart(parentContext, connection)) {
79
84
return;
@@ -108,35 +113,45 @@ public static void methodExit(
Copy file name to clipboardExpand all lines: instrumentation/http-url-connection/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/HttpUrlHttpAttributesExtractor.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,7 @@ protected Long responseContentLengthUncompressed(
0 commit comments