Skip to content

Commit

Permalink
Fix jetty context leak (#1966)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored Jan 5, 2021
1 parent d9dc07c commit 1671951
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ public static boolean shouldAttachStateToTask(Object task) {
// TODO Workaround for
// https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/787
&& !taskClass.getName().equals("org.apache.tomcat.util.net.NioEndpoint$SocketProcessor")
// Don't instrument the executor's own runnables. These runnables may never return until
// Avoid context leak on jetty. Runnable submitted from SelectChannelEndPoint is used to
// process a new request which should not have context from them current request.
&& (enclosingClass == null
|| !enclosingClass.getName().equals("org.eclipse.jetty.io.nio.SelectChannelEndPoint"))
// Don't instrument the executor's own runnables. These runnables may never return until
// netty shuts down.
&& (enclosingClass == null
|| !enclosingClass
Expand Down

0 comments on commit 1671951

Please sign in to comment.