Skip to content

Commit 5768f33

Browse files
committed
rename
1 parent f2e4560 commit 5768f33

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

instrumentation/pekko/pekko-http-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/pekkohttp/v1_0/server/GraphInterpreterInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static class PushAdvice {
3535
public static Scope onEnter(@Advice.Argument(0) GraphInterpreter.Connection connection) {
3636
// processPush is called when execution passes to application or server. Here we propagate the
3737
// context to the application code.
38-
Context context = PekkoFlowWrapper.getContext(connection.outHandler());
38+
Context context = PekkoFlowWrapper.getAndRemoveContext(connection.outHandler());
3939
if (context != null) {
4040
return context.makeCurrent();
4141
}

instrumentation/pekko/pekko-http-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/pekkohttp/v1_0/server/PekkoFlowWrapper.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@ public class PekkoFlowWrapper
3636
return handler.join(new PekkoFlowWrapper());
3737
}
3838

39-
public static Context getContext(OutHandler outHandler) {
39+
public static Context getAndRemoveContext(OutHandler outHandler) {
4040
if (outHandler instanceof TracingLogic.ApplicationOutHandler) {
4141
// We have multiple requests here only when requests are pipelined on the same connection.
42-
// It appears that these requests are processed one by one so processing next request won't
43-
// be started before the first one has returned a response, because of this the first request
44-
// in the queue is always the one that is currently being processed.
42+
// We remove the context off of the queue so that the next request can get its context.
4543
PekkoTracingRequest request =
4644
((TracingLogic.ApplicationOutHandler) outHandler).getRequests().poll();
4745
if (request != null) {

0 commit comments

Comments
 (0)