Skip to content

Commit

Permalink
Fix NPE in rmi server instrumentation (open-telemetry#5042)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored and RashmiRam committed May 23, 2022
1 parent b37d323 commit a089ffc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public static void onEnter(

// TODO review and unify with all other SERVER instrumentation
Context parentContext = THREAD_LOCAL_CONTEXT.getAndResetContext();
if (parentContext == null) {
return;
}
request = ClassAndMethod.create(declaringClass, methodName);
if (!instrumenter().shouldStart(parentContext, request)) {
return;
Expand Down

0 comments on commit a089ffc

Please sign in to comment.