Skip to content

Commit ed6471f

Browse files
committed
minor changes for consistency
1 parent a88177b commit ed6471f

File tree

1 file changed

+6
-5
lines changed
  • instrumentation/servlet/servlet-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/servlet/v3_0

1 file changed

+6
-5
lines changed

instrumentation/servlet/servlet-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/servlet/v3_0/Servlet3Advice.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@
3131
@SuppressWarnings("unused")
3232
public class Servlet3Advice {
3333

34-
// TODO
3534
public static class AdviceScope {
36-
public CallDepth callDepth;
37-
public ServletRequestContext<HttpServletRequest> requestContext;
38-
public Context context;
39-
public Scope scope;
35+
private final CallDepth callDepth;
36+
private final ServletRequestContext<HttpServletRequest> requestContext;
37+
private final Context context;
38+
private final Scope scope;
4039

4140
public AdviceScope(
4241
CallDepth callDepth,
@@ -61,9 +60,11 @@ && helper().needsRescoping(currentContext, attachedContext)) {
6160
// Given request already has a context associated with it.
6261
// see the needsRescoping() javadoc for more explanation
6362
contextToUpdate = attachedContext;
63+
context = null;
6464
} else {
6565
// We are inside nested servlet/filter/app-server span, don't create new span
6666
contextToUpdate = currentContext;
67+
context = null;
6768
}
6869

6970
// Update context with info from current request to ensure that server span gets the best

0 commit comments

Comments
 (0)