Skip to content

Commit

Permalink
Fix npe in apache http client 4.0 instrumentation (#4913)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored Dec 16, 2021
1 parent bd0ff33 commit 98d3f88
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ public static void methodEnter(
@Advice.Local("otelContext") Context context,
@Advice.Local("otelScope") Scope scope) {
Context parentContext = currentContext();

otelRequest = new ApacheHttpClientRequest(host, request);

if (!instrumenter().shouldStart(parentContext, otelRequest)) {
return;
}
Expand Down

0 comments on commit 98d3f88

Please sign in to comment.